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…
On Monday, March 4th, 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 $150), but there’s an £80 earlybird offer (approx. US $127) running until February 25th.Continue reading…
On Tuesday, 29th January, we held the 3rd meeting of Vim London. We had 5 short talks on the theme of Speak Vim – operators and motions. The talks weren’t recorded, so I’m posting a retrospective here.Continue reading…
- Tom Cammann, Intro to Vim Grammar
- Drew Neil, When and why you should stay out of visual mode
- Jack Franklin, Meet easymotion
- Kris Jenkins, Meet surround
- Alex Young, Creating custom motions
I’m looking forward to this event, because the subject of Vim’s Grammar fascinates me. If you’d like to attend, RSVP on Meetup.com. The event is kindly being hosted by Funding Circle. You can also find the event listed on lanyrd.