From 34b0c445e54fd851fb8c47f39b1f8e45eca8342c Mon Sep 17 00:00:00 2001 From: yan Date: Sat, 17 Dec 2011 00:46:02 -0800 Subject: [PATCH] Added ,oq for open quickfix, and ,q to close it --- README.md | 5 +++-- vim/plugin/settings/skwp-keymap.vim | 5 +++++ vimrc | 3 --- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 5fa95d45..f10e5f23 100644 --- a/README.md +++ b/README.md @@ -158,7 +158,7 @@ files contain key mappings as well (TODO: probably will move them out to skwp-ke Search/Code Navigation * ,f - instantly Find definition of class (must have exuberant ctags installed) - * K - GitGrep the current word under the cursor + * K - GitGrep the current word under the cursor and show results in quickfix window * Cmd-* - highlight all occurrences of current word (similar to regular * except doesn't move) * ,hl - toggle search highlight on and off * ,gg - GitGrep command line with a quote pretyped (close the quote yourself) @@ -182,6 +182,7 @@ files contain key mappings as well (TODO: probably will move them out to skwp-ke * Cmd-H and Cmd-L - left an right on tabs * ,, to zoom a window to max size and again to unzoom it (ZoomWin standard Ctrl-w,o) * Use Cmd-1..Cmd-0 to switch to a specific tab number (like iTerm) - and tabs have been set up to show numbers + * ,q to close the quickfix and ,oq to open the quickfix (great for lookin at Ack or GitGrep results) Utility @@ -189,7 +190,7 @@ files contain key mappings as well (TODO: probably will move them out to skwp-ke * ,cc - (Current command) copies the command under your cursor and executes it in vim. Great for testing single line changes to vimrc. * ,yw - yank a word from anywhere within the word (so you don't have to go to the beginning of it) * ,ow - overwrite a word with whatever is in your yank buffer - you can be anywhere on the word. saves having to visually select it - * gcc (comment a line) via tComment (standard) + * Cmd-/ - toggle comments (usually gcc from tComment) * gcp (comment a paragraph) added * ,t - Command-T fuzzy file selector (alternative to PeepOpen / LustyJuggler) diff --git a/vim/plugin/settings/skwp-keymap.vim b/vim/plugin/settings/skwp-keymap.vim index a7e1d968..129e2a02 100644 --- a/vim/plugin/settings/skwp-keymap.vim +++ b/vim/plugin/settings/skwp-keymap.vim @@ -42,6 +42,11 @@ nmap ,ru :AV " ,m is less stressful on the fingers than ,n nmap ,m :NERDTreeToggle +" ,q to toggle quickfix window (where you have stuff like GitGrep) +" ,oq to open it back up (rare) +nmap ,q :cclose +nmap ,oq :copen + " move up/down quickly by using Ctrl-j, Ctrl-k " which will move us around by functions nnoremap } diff --git a/vimrc b/vimrc index 33d7f23d..89a71ad3 100644 --- a/vimrc +++ b/vimrc @@ -126,6 +126,3 @@ set viminfo='100,f1 " term for running tests " autocmd WinEnter * stopinsert - -" Auto save when we go elsewhere -au FocusLost * :wa