Another great feature in vim, is the ability to work with several files at the same time. Add this to .vimrc:
" Allow editing of several files without having to save the current one, before moving to another
set hidden
" map F12 to close a buffer
map :db^M
" Move to next buffer
map ^N :bn^M
" Move to previous buffer
map ^B :bp^M
" List open buffers
map ^L :ls^M
Then use the 'e' command like:
e: text.php
This will open text.php in a seperat buffer, and with CTRL-n or CTRL-p you can navigate between them.
↧