vim mappings for multiple files.

2012-08-06 102 words 1 min read

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

author

Authored By Amit Agarwal

Amit Agarwal, Linux and Photography are my hobbies.Creative Commons Attribution 4.0 International License.

We notice you're using an adblocker. If you like our webite please keep us running by whitelisting this site in your ad blocker. We’re serving quality, related ads only. Thank you!

I've whitelisted your website.

Not now
This website uses cookies to ensure you get the best experience on our website. Learn more Got it