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 ?

link|improve this question

60% accept rate
Possible duplicate: how-do-i-edit-an-existing-buffer-in-a-new-tab-in-vim – hesse Jan 15 at 17:33
feedback

2 Answers

up vote 2 down vote accepted

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.

link|improve this answer
Thank you a lot :) – Skydreamer Jan 15 at 19:08
feedback

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?

link|improve this answer
I create buffers using :split: or :vsplit:. I have found it on a Vim wiki in fact... – Skydreamer Jan 15 at 18:46
In that case you have created new windows, so you can use 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. – garyjohn Jan 15 at 19:05
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.