vim mappings for multiple files.

2012-08-06 1 min read Vim Tips

If you open multiple files in vim with command line option. Then the only way to move between the files is “:n” and “:N”. There is a easier way to do this. Just add mappings for this in vimrc. Here is what you can use.

map  :N
map  :n

And if you want to make sure that you move to the prev or next file after saving the file, then you modifyt the mapping like this:

map <c-left> <Esc>:w|N<CR>
map <c-right> <Esc>:w|n<CR>
Enhanced by Zemanta
comments powered by Disqus