I mentioned in a tweet recently that I’ve been using some form of Vi for about twenty years. It all started in college where we had highly advanced green screen monitors attached to a large Unix box. I can’t remember what Unix it was ran on that machine (it may have been UnixWare) but it was a far cry from the nice GNU interface we’re used to on modern Unix systems. Vim certainly was not a part of the default install.
However, Vim has been my editor of choice all my working life. All this time I’ve known I’m only scratching the surface of it’s functionality but only recently has it become clear how much. I can navigate through it with ease, open numerous files in separate splits, search/replace and of course vimdiff was partly responsible for every single WordPress MU release as I used it to pull over changes from WordPress.
So, thanks to /r/vim I discovered the following today:
- /r/vim_magic is indeed full of magic.
- More Instantly Better Vim is a great talk on some insane things to do with Vim.
- I had no idea Vim had tabs but I still prefer splits.
- snipMate.vim is a snippet plugin for Vim based on the snippets in TextMate. Around the turn of the century I had messed with abbreviations but this is way better. Found that here where there’s plenty more tips to read.
- Coming home to Vim is the story of the return of a TextMate user to Vim. Why didn’t I know about daX and diX?
- Since I use split files, I’m always tapping CTRL-w w or CTRL-w UP/DOWN to switch between splits. It never occurred to me that I could map the TAB like this to switch split files. TAB switches to the next split file, SHIFT-TAB hops back.
map <Tab> <C-W>w
map <S-Tab> <C-W>p
- I am tentatively mapping ; to : with
nnoremap ; :but I probably won’t use it. My fingers are too used to LSHIFT-; to stop now. I’ve never used the ; command, I had to look it up to see what it did!
From my tweet comes some productivity tips. I have never used the Leader key. The shame, the shame!
So much to learn. I’ll probably leave comments on this post linking to all the bits and pieces I find. Yes, I’m excited about a bloody text editor. Haha!