Monday, July 24, 2006

OSCON 06 Day 1 - Afternoon Tutorials

Mastering VIM - Damien Conway

Alright, I've been in the tutorial session 5 minutes and I've given up on taking coherent notes. He's so smart, and so fast, and jumps around and covers material so quickly. I strongly prefer vi to emacs (I usually never install it). Over time, I've drifted away from vi, (I'm taking notes in and am just getting used to KDE's Kate) thinking, "Oh, it's too hard to worry with... Kate (or whatever) is so much easier". Damien has proven me wrong, and has shown me so many easy, powerful things to do with vim, that I'm excited and curious to give it a another go.

My favorite bits were:

  • Using do-it-yourself marks and vim's native marks to make jumping and editing easier.

  • The idea of binding a key to the :nohilite to hide the search hilighting when you're done.

  • Actually *getting* cut(d)/copy(y)/paste(p) by the vi keys (I always wimp and drop back to mouse/xwin click-drag-middleclick to do it)

  • ]p to paste something at the current level of indentation

  • Branched undo in vim7, producing the "Trousers of Time"

  • Autocompletion!! (Well, I knew that it has always done it for filenames, but it can do it for vim commands and body text as well.) This gives us language-specific completions!

  • You can use vim as a file browser!

  • set autowrite - always save before quit

  • :options|resize - browse and set all options, then you can :mkvimrec to make a .vimrc to save all your current settings.

  • set shiftround

  • Damien's Total Tabular Control function. Very nice.

  • Automatic, self-cleaning backup files.

  • Visual Block Mode - swoon.

  • vipJ - Join all the lines in a paragraph together.

  • Abbreviations, tho they're not as good as insertion maps because they don't need the extra space after. This can be good and bad.

  • :nmap <Space> <something useful> - Make normal-mode space do something useful.



It was a great talk (a very difficult choice over the Asterix talk), and he's put together 50 tips - each a broad topic group of commands - in the handouts that are the real take-home goodies from this talk.

And a quick word on Damien: he's a great presenter. I got hooked on him at last year's OSCON, where he redefined Perl to work in Latin, with Roman numerals for results.

-Bill

Tags:

No comments: