One way to select a buffer in Vim could be to browse the buffers list, using standard commands as :ls
, or with some external plugin / vimscript code to browse a list in a window.
Let's say I want to jump to a buffer directly, as fast as possible.
To traverse the buffer list in sequential mode, I now use <C-J>
<C-K>
shortcuts, having set in my .vimrc:
" move among buffers with CTRL
map <C-J> :bnext<CR>
map <C-K> :bprev<CR>
Another way (direct access) could be switching by number: knowing the buffer number, it is possible to switch directly by entering the buffer number followed by <C-^>
. So if I want to switch to buffer number 5, I would press 5<C-^>
.
But this seem not working for me (I use vim 7.4 on ubuntu box, from a Windows guest, with Italian keyboard). I suspect that's because the ^
character is in the upper case key ^ì
in the Italian keyboard, so in fact to got ^
I need to press SHIFT-^
Any ideas?
<c-6>
instead of<c-^>
?1<C-6>
switchs to buffer number 1. Thanks!Ctrl-w 5 Ctrl-6
where 5 is the alternative buffer you want to open and alsoCtrl-w Ctrl-6
.