Files A, B, and C are called "buffers" in the Vim language. What you want is the ability to directly jump from buffer to buffer or the ability to select the buffer you want to jump to.
Jumping from one buffer to another is easy. This is done using the command :b or its cousins:
:b filename<CR> " jump directly to the named buffer :b fil<tab> " select from <tab>-navigable menu if " more than one match, completes the " filename otherwise :b <tab> " select from <tab>-navigable menu :2b " go to buffer number 2 :bfirst<CR> (or :bf) " self-descriptive :blast<CR> (or :bl) " self-descriptive :bnext<CR> (or :bn) " self-descriptive :bprevious<CR> (or :bp) " self-descriptive
Selecting a buffer from the list is also simple:: :ls<CR> displays a numbered list of buffers and waits for a command. At this point, enter :b <number><CR> or :<number>b<CR> to jump to the selected buffer. You can add the following conversion to your ~/.vimrc to speed up the whole process:
nnoremap <leader>b :ls<CR>:b<space>
You also have a fairly large number of plugins for switching buffers (the rest of the page is also filled with interesting information).
I use CtrlP , which is not specified when I can, and displayed above when I can not.
source share