On Monday, June 3rd, I’m going to teach my Core Vim Masterclass Online. It will run for 4 hours, from 18:00 GMT. That’s 10:00 if you live in San Fransisco, or 13:00 if you live in New York. Tickets cost £95 (approximately US $140), but there’s an £80 earlybird offer (approx. US $120) running until May 24th.
One year ago today, Practical Vim was released as a beta book. I’m thrilled with how the book has been received and I’d like to thank everybody who has purchased a copy. After a year of sales, I’m happy to report that Practical Vim is a best-seller!Continue reading…
In case you hadn’t noticed, Vimcasts.org is back from hibernation! I’m publishing new screencasts and blog posts regularly. If you can’t keep up with the RSS feeds, or via Twitter, then you might want to subscribe to the Vimcasts.org newsletter. I’ll send an email digest once a month containing links to all of the material published over the course of the previous month.Continue reading…
On Tuesday, April 16th, I’m going to teach my Vim Masterclass Online. It will run for 4 hours, from 17:00 GMT. That’s 09:00 if you live in San Fransisco, or 12:00 if you live in New York. Tickets cost £95 (approximately US $140), but there’s an £80 earlybird offer (approx. US $120) running until April 5th.Continue reading…
I always announce my Online Vim Masterclasses here on the Vimcasts blog as well as on Twitter. Some of you have indicated that you’d prefer to get announcements in your email inbox, so I’ve set up a mailing list for announcements. Sign up for the newsletter and you’ll be the first to hear about upcoming Vim classes.Continue reading…
vimgrep command uses Vim’s native regular expressions to search the contents of multiple files. There are several ways that we can specify the list of files to look inside, including
** wildcards. It would be handy if we could instruct
vimgrep to look inside all of the files in the current project, excluding those listed in the
.gitignore file. That’s where the
git ls-files command comes in.
I love the way that ack let’s me specify the files to search inside. For starters, ack does the right thing by ignoring the contents of VCS directories, backup files, core dumps etc., which gives a good signal to noise ratio. On top of that, ack provides a convenient syntax for specifying filetypes to include or exclude from the set (see
ack --help-types). I can target ruby files only with the
--ruby option, or everything but ruby files with
I also love using
:vimgrep, because it lets me use Vim’s native regular expressions. For me, the ideal project-wide search would combine Vim’s regex with ack’s method of specifying the set of files to search through. I recently learned about ack’s
-f flag, which makes this combination possible.
For a limited time, the Pragmatic Bookshelf is offering a 30% discount on Practical Vim. To claim this deal, use the coupon: DrewNeilVimMarchMadness. The offer runs until midnight (PST) on March 8th. Please help me spread the word wide and far by Tweeting, Liking, +1-ing and so on.Continue reading…
Here’s a quick tip: if you can’t find what you’re looking for in Vim’s built-in documentation, use a search engine instead. All of Vim’s documentation is online at vimdoc.sourceforge.net, so it’s indexed by Google & Co. If you create a custom search engine for your browser, then you can easily limit your searches to only return results from vimdoc.sourceforge.net.Continue reading…
Moving your Vim cursor around using the arrow keys is a bad habit, and like many bad habits it’s a difficult one to break! Putting these lines into your vimrc can help:
noremap <Up> <NOP> noremap <Down> <NOP> noremap <Left> <NOP> noremap <Right> <NOP>
This snippet causes each of the arrow keys to execute no operation, or in other words: it disables them. Next time you move your hand to the arrow keys you’ll find that nothing happens when you press them. That should remind you to move your hand back where it belongs: on the home row, where
l keys are waiting for you. Alternatively, you could use the konami code version of this snippet.
Learning to operate Vim without leaving the home row is the first rite of passage. If you’re still in the habit of moving around using the arrow keys, then you should disable them today.Continue reading…