The Switch to VIM
I’m been meaning to try out Vim for a while, especially since I now use two different platforms/editors for development (mac/textmate at work, linux/jedit at home). Finally got some time to try it out this weekend, and initial reports are positive! The thing that strikes me the most is how quickly you can navigate/select things without using the mouse. Vim’s navigation shortcuts are like CTRL-(LEFT|RIGHT) on crack. Regex search forward and back, move by multiple lines, seek to next/prev char. I haven’t internalized this navigation yet and already I’m loving it. Give me some experience and I’ll become an absolute machine. It’s a bit weird because I’m using colemak, so the “stick to the home row” mantra doesn’t really apply, but overall it’s still quite bearable. I need to figure out how to replicate the Apple-T shortcut in textmate (quick swith to file) and I think I’ll be sold. I’ll use it at work for the week and see how things go. For reference, I found the tutorial on the vi-improved site to be quite helpful.
September 08, 2007 at 8:55 PM
you can re-map the home row keys to match your keyboard, in your ~/.vimrc add
:map j n
:map k e
:map l i
but then you would have to map n e and i to something else :P
i have something like this to move between "buffers" or open files (ctrl+L moves to the file right, ctrl+k moves to the file left), also :ls will print the open buffers and :b<number> will move you to that buffer.
:imap <C-l> <ESC>:bn<CR>
:imap <C-k> <ESC>:bp<CR>
:map <C-l> :bn<CR>
:map <C-k> :bp<CR>
mapping info here:
http://www.vim.org/htmldoc/map.html
October 28, 2007 at 9:39 PM
Wow, I’ve only been using jEdit for the past 5 minutes and already I’m loving it! I’m so sick of switching between PSPad, Notepad++, Bluefish, and Textmate (most of those are Windows programs I run in Wine).