From 4a7df20fd141debe10fe09e4bc067f40063a44f7 Mon Sep 17 00:00:00 2001 From: yan Date: Fri, 20 Jan 2012 18:01:06 -0800 Subject: [PATCH] Leader is now comma; General keymap cleanup - see README --- README.md | 14 ++++++-------- vim/plugin/settings/NERDtree.vim | 4 ++-- vim/plugin/settings/lusty-juggler.vim | 21 --------------------- vim/plugin/settings/persistent-undo.vim | 2 +- vim/plugin/settings/skwp-keymap.vim | 17 +++++++++++------ 5 files changed, 20 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index 5ffd64e..1bb5a80 100644 --- a/README.md +++ b/README.md @@ -166,16 +166,13 @@ files contain key mappings as well (TODO: probably will move them out to skwp-ke * \mm - set the next available mark (set a mark with mX where X is a letter, navigate to mark using 'X). Uppercase marks to mark files, lowercase marks to use within a file. * \ma - clear all marks * \mh - clear current mark - * ,bb - toggle local anonymous bookmark at current location - * ,bn ,bp - next and previous anonymous bookmark - * ,bc - clear anonymous bookmarks + * ,Bt - toggle local anonymous bookmark at current location + * ,Bn ,Bp - next and previous anonymous bookmark + * ,Bc - clear anonymous bookmarks **LustyJuggler** - * ,b - show buffers (LustyJuggler buffer search), just type to fuzzy match a buffer name - * ,s - Show buffers in LustyJuggler (use asdfjkl home row keys to then select buffer) - * ,lf - lusty file finder - * ,lr - lusty file finder from current folder + * ,lj - show buffers (LustyJuggler buffer search), just type to fuzzy match a buffer name **Rails** @@ -203,6 +200,7 @@ files contain key mappings as well (TODO: probably will move them out to skwp-ke **File Navigation** * ,t - Command-T fuzzy file selector + * ,b - Command-T buffer selector * ,jm jump (command-t) app/models * ,jc app/controllers * ,jv app/views @@ -244,7 +242,7 @@ files contain key mappings as well (TODO: probably will move them out to skwp-ke **NERDTree Project Tree** - * ,m - NERDTree toggle + * Cmd-N - NERDTree toggle * Ctrl-\ - Show current file tree **Utility** diff --git a/vim/plugin/settings/NERDtree.vim b/vim/plugin/settings/NERDtree.vim index 394d2b9..a79e9cc 100644 --- a/vim/plugin/settings/NERDtree.vim +++ b/vim/plugin/settings/NERDtree.vim @@ -1,4 +1,4 @@ " Make nerdtree look nice -let NERDTreeMinimalUI = 1 +let NERDTreeMinimalUI = 1 let NERDTreeDirArrows = 1 -let g:NERDTreeWinSize = 30 +let g:NERDTreeWinSize = 30 diff --git a/vim/plugin/settings/lusty-juggler.vim b/vim/plugin/settings/lusty-juggler.vim index 6bddda2..d1d7823 100644 --- a/vim/plugin/settings/lusty-juggler.vim +++ b/vim/plugin/settings/lusty-juggler.vim @@ -1,24 +1,3 @@ -" LustyJuggler -" ======================================== -" better triggers for buffer switching -" B to use the a/s/d/f juggler, S to search the buffers -nmap ,b \lj -nmap ,s \lb - -" Remap using comma for the leader -" lusty file explorer -nmap ,lf \lf - -" lusty file explorer from current location -nmap ,lr \lr - -" lusty buffer juggler (alternative mapping) -nmap ,lb \lb - -" lusty buffer juggler (alternative mapping) -nmap ,lj \lj - - let g:LustyJugglerSuppressRubyWarning = 1 let g:LustyJugglerAltTabMode = 1 let g:LustyJugglerShowKeys = 'a' " show a/s/d/f keys diff --git a/vim/plugin/settings/persistent-undo.vim b/vim/plugin/settings/persistent-undo.vim index 16df15e..e22bd8d 100644 --- a/vim/plugin/settings/persistent-undo.vim +++ b/vim/plugin/settings/persistent-undo.vim @@ -1,7 +1,7 @@ " persistent undos - undo after you re-open the file " but this gives warnings under command line vim " use only in macvim -if has('gui_running') +if v:version > '702' set undodir=~/.vim/backups set undofile endif diff --git a/vim/plugin/settings/skwp-keymap.vim b/vim/plugin/settings/skwp-keymap.vim index 1906d1f..b28b0d4 100644 --- a/vim/plugin/settings/skwp-keymap.vim +++ b/vim/plugin/settings/skwp-keymap.vim @@ -2,6 +2,11 @@ " General vim sanity improvements " ======================================== " +" +" Change leader to a comma because the backslash is too far away +" That means all \x commands turn into ,x +let mapleader="," + " alias yw to yank the entire word 'yank inner word' " even if the cursor is halfway inside the word " FIXME: will not properly repeat when you use a dot (tie into repeat.vim) @@ -49,8 +54,8 @@ nnoremap ,. '. nmap ,ru :AV " ==== NERD tree -" ,m is less stressful on the fingers than ,n -nmap ,m :NERDTreeToggle +" Cmd-Shift-N for nerd tree +nmap :NERDTreeToggle " ,q to toggle quickfix window (where you have stuff like GitGrep) " ,oq to open it back up (rare) @@ -179,10 +184,10 @@ nmap sk :SplitjoinJoin " ============================ " " Set anonymous bookmarks -nmap ,bb :ToggleBookmark -nmap ,bn :NextBookmark -nmap ,bp :PreviousBookmark -nmap ,bc :ClearBookmarks +nmap ,Bb :ToggleBookmark +nmap ,Bn :NextBookmark +nmap ,Bp :PreviousBookmark +nmap ,Bc :ClearBookmarks " " ============================ " Abbreviations to use...