From 5e2665a797d28c53cab04205ef4b8415966f1cad Mon Sep 17 00:00:00 2001 From: Danny Olson & Yan Pritzker Date: Fri, 10 Feb 2012 14:59:48 -0800 Subject: [PATCH] ,z and ,x bindings to move back and forth through buffers --- README.md | 3 ++- vim/plugin/settings/yadr-keymap.vim | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8cc0069..025efc6 100644 --- a/README.md +++ b/README.md @@ -240,7 +240,8 @@ files contain key mappings as well (TODO: probably will move them out to skwp-ke #### Navigation - * `,z` - jump back and forth between last two buffers + * `,z` - go to previous buffer (:bp) + * `,x` - go to next buffer (:bn) * `Ctrl-j` and `Ctrl-k` to move up and down roughly by functions * `Ctrl-o` - Old cursor position - this is a standard mapping but very useful, so included here * `Ctrl-i` - opposite of Ctrl-O (again, this is standard) diff --git a/vim/plugin/settings/yadr-keymap.vim b/vim/plugin/settings/yadr-keymap.vim index d648ff4..cea0a5d 100644 --- a/vim/plugin/settings/yadr-keymap.vim +++ b/vim/plugin/settings/yadr-keymap.vim @@ -98,8 +98,10 @@ nnoremap ,f nnoremap ,F :let word=expand(""):vsp:wincmd w:exec("tag ". word) -"toggle between last two buffers with Z (normally ctrl-shift-6) -nnoremap ,z +"Move back and forth through previous and next buffers +"with ,z and ,x +nnoremap ,z :bp +nnoremap ,x :bn " ============================== " Window/Tab/Split Manipulation