From 10ce30d8111f2f196d949611aca5a59c3d04524c Mon Sep 17 00:00:00 2001 From: yan Date: Mon, 12 Mar 2012 12:05:56 -0500 Subject: [PATCH] Change window navigation to Ctrl-h,j,k,l to avoid overriding vim defaults [Close #42] --- README.md | 4 ++-- vim/plugin/settings/yadr-keymap.vim | 19 +++++++++---------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 48e78d4..35d5560 100644 --- a/README.md +++ b/README.md @@ -254,7 +254,7 @@ files contain key mappings as well (TODO: probably will move them out to skwp-ke * `,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 + * `Cmd-j` and `Cmd-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) @@ -335,7 +335,7 @@ files contain key mappings as well (TODO: probably will move them out to skwp-ke #### Window Navigation - * `H` `L` `I` `M` - to move left, right, up, down between windows + * `Ctrl-h,l,j,k` - to move left, right, down, up between windows * `Q` - Intelligent Window Killer. Close window `wincmd c` if there are multiple windows to same buffer, or kill the buffer `bwipeout` if this is the last window into it. * `+` and `-` for resizing vertical windows diff --git a/vim/plugin/settings/yadr-keymap.vim b/vim/plugin/settings/yadr-keymap.vim index c3fe175..f6f96a2 100644 --- a/vim/plugin/settings/yadr-keymap.vim +++ b/vim/plugin/settings/yadr-keymap.vim @@ -71,13 +71,12 @@ nmap :NERDTreeToggle nmap ,qc :cclose nmap ,qo :copen -" move up/down quickly by using Ctrl-j, Ctrl-k +" move up/down quickly by using Cmd-j, Cmd-k " which will move us around by functions -nnoremap } -nnoremap { - -autocmd FileType ruby map ]m -autocmd FileType ruby map [m +nnoremap } +nnoremap { +autocmd FileType ruby map ]m +autocmd FileType ruby map [m " Open the project tree and expose current file in the nerdtree with Ctrl-\ nnoremap :NERDTreeFind @@ -112,10 +111,10 @@ nnoremap ,x :bn " Move between split windows by using the four directions H, L, I, N " (note that I use I and N instead of J and K because J already does " line joins and K is mapped to GitGrep the current word -nnoremap H h -nnoremap L l -nnoremap I k -nnoremap M j +nnoremap h +nnoremap l +nnoremap k +nnoremap j " Move between tabs with Ctrl-Shift-H and Ctrl-Shift-L map :tabprevious