]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
vimrc: Add gb and gB to go to next/previous buffer.
authorSimon Ruderich <simon@ruderich.org>
Sat, 10 Jul 2010 11:13:07 +0000 (13:13 +0200)
committerSimon Ruderich <simon@ruderich.org>
Sat, 10 Jul 2010 11:13:07 +0000 (13:13 +0200)
vimrc

diff --git a/vimrc b/vimrc
index 0940c45b58ab203cc364c50d5e949de4898ca355..caa7a023883d0dc0ad2a0ac23e33b53caa260ab1 100644 (file)
--- a/vimrc
+++ b/vimrc
@@ -204,6 +204,11 @@ cnoremap <C-n> <down>
 nnoremap <Space> <C-f>
 nnoremap - <C-b>
 
+" Go to next and previous buffer. Thanks to elik in #vim on Freenode
+" (2010-05-16 18:38) for this idea.
+nnoremap <silent> gb :bnext<CR>
+nnoremap <silent> gB :bprev<CR>
+
 " Fast access to buffers.
 nnoremap <Leader>1 :1b<CR>
 nnoremap <Leader>2 :2b<CR>