If I create multiple buffers on gVim (gnome interface for vim), how do I switch buffer ?
Vim doc says it's F8
key but it doesn't work...
Any idea ?
Switching buffers is done in general with :bp[revious]
and :bn[ext]
(the part in the brackets being optional). If you don't feel like typing that every time, you can map it to some key, or key combination.
nnoremap <F1> :bp<cr>
nnoremap <F2> :bn<cr>
(feel free to modify to your needs)
If you're thinking about switching between splits, that is done with <C-W> some key
, depending on where you want to go. They're all really nicely described in help CTRL-W
, but the most commonly used are V
and S
for splitting, and then C-W C-W
(twice) for switching between open splits.
It depends on how you create those multiple buffers. If they are in multiple windows, then you can switch between windows with Ctrl-W Ctrl-W
and related commands. See
:help window-move-cursor
If the bvffers are in multiple tabs, you can switch between tabs with gt
and related commands. See
:help gt
Using :helpgrep f8
and :helpgrep F8
, I don't find any mention in the Vim docs of F8 being used to switch buffers. What Vim docs are you referring to?
:split:
or :vsplit:
. I have found it on a Vim wiki in fact...
Ctrl-W Ctrl-W
to jump to the next window, or Ctrl-W k
to jump to the window above the current one, for example. There is no default mapping for F8, but you could make your own. Perhaps the wiki mentions such a mapping.