Using the following mappings in normal mode provides a convenient way to easily switch between the next and previous buffers.
nmap <tab> :bn<cr>
nmap <s-tab> :bp<cr>
Thanks to Chris for the tip!
Monday, March 9, 2009
Subscribe to:
Post Comments (Atom)
7 comments:
Here's a buffer gem I found today:
http://gist.github.com/76540
This will set [tab] for command completion and ,, to browse the buffers in a non-intrusive way.
Hope you didn't plan on using the jumplist, because remapping <Tab> (aka <C-i>) takes away the ability to move forward.
I remap <C-Right> and <C-Left> to :bn<CR> and :bp<CR>, respectively.
Good tips guys... thanks!
I like to use shift-[hl] to move back/forward in the bufferlist. It works great with minibufexpl because that is like moving left/right in the list of "tabs". Also it complements ctrl-[hjkl] for moving between windows.
from my vimrc:
nnoremap <silent><C-j> <C-w>j
nnoremap <silent><C-k> <C-w>k
nnoremap <silent><C-l> <C-w>l
nnoremap <silent><C-h> <C-w>h
nnoremap <silent><S-h> :bp<CR>
nnoremap <silent><S-l> :bn<CR>
PS- Is there any way to avoid using < for < in blogger comments?
Really simple and very useful.
Thanks
Thanks, I love this tip.
Post a Comment