syntax highlight

Tuesday 19 November 2013

Vim tim: quickly switch from header to impl

Switching from header to implementation in vim takes up precious milliseconds of typing and thinking, so we'd better delegate that to a computer. Instead of typing :tabnew FOO.cpp, just download A (for alternate) from this url: http://www.vim.org/scripts/script.php?script_id=31

Add it to your bundles in vim and, for extra magic, just map some key to :AT in your vimrc. I have added this one:

map <F4> :AT<CR>

I don't know how I lived without this for such a long time.

2 comments:

  1. I've not tried A, but fswitch offers similar functionality: http://www.vim.org/scripts/script.php?script_id=2590

    ReplyDelete