-
Hey guys, this is Steve Losh.
-
If you're watching this screencast you probably already know that I've been writing a book
-
called "Learn Vimscript the Hard Way".
-
I figured I'd do a screencast while I wrote one of the shorter chapters
-
just to show you kind of how I work and how I'm making the book.
-
So first what I'm going to do is open an iTerm window...
-
and let's make it nice and big... okay.
-
I'm going to open DVTM, which is -- it's a terminal multiplexer, kind of like Tmux or Screen,
-
just a lot simpler. I don't really use all the functionality of Tmux or Screen,
-
so DVTM does pretty much everything I need.
-
And I'm going to open three splits with one of them a little smaller.
-
I'm going to go into the repo for the book in each of them.
-
In this window I'm going to run a little script -- a little program called "kicker",
-
which is open source, it's Ruby so you can just "gem install kicker".
-
What it does is it basically monitors all the files that you tell it
-
and whenever any one of them changes it just runs a command.
-
Any shell command you want.
-
So in this case I'm the command that builds the book,
-
so any time I make a change to the book it will automatically get built, which is really handy.
-
So I'm going to run that, and it fires off -- oops, sorry, I need to be in the virtualenv.
-
"workon" the virtualenv... okay. Now I'm going to run kicker... okay.
-
And it goes ahead and does it once to begin with,
-
and then any time I touch a file that I told it to watch,
-
so if I go here and say "touch preface" you can it executes again.
-
Okay. The other thing I'm going to do is "cd" into the "build" directory,
-
where the output of Bookmarkdown is going to put the HTML files,
-
and I'm just going to run "serve_this", which is a little alias
-
that basically serves the current directory on port 8000.
-
And if you want to see what it is, it's just a Python module -- it's just
-
"python -m SimpleHTTPServer"
-
SimpleHTTPServer is a built-in Python module,
-
so anywhere that has Python, I mean a relatively recent version, will have this.
-
So it's just a simple command to serve a directory on port 8000.
-
And I'm going to open Firefox and open localhost:8000.
-
Alright, so this is our book, right, this is what I've got so far.
-
I'm going to move that over here... okay,
-
ah, we don't need it that big.
-
Alright, we've got a book. And now I'm just going to open Vim and start working.
-
I'm not going to comment on everything and explain how I do everything
-
because that would just take forever.
-
Everything's in my muscle memory and I'd have to stop and think about every key I press
-
so if you see something that I do and you're kinda wondering how I did it
-
just leave a comment with the time in the video that it appears and I'll do my best to explain it for you.
-
With that said, I'm just going to put my headphones on and start typing. Cool.
-
Okay guys, I think that's about it.
-
I'm going to encode this screencast and upload it to Vimeo and that should be about it.
-
Like I said, if there's anything that you saw and you liked and you want to know how I did it
-
or you think I have a special mapping,
-
just post a comment on the video and -- or just tweet at me, either one --
-
and just let me know the time and what it looks like and I'll let you know.
-
Otherwise I guess that's it. Alright, cool. Thanks guys.