diff --git a/README.md b/README.md index b0c5a19..b98996e 100644 --- a/README.md +++ b/README.md @@ -176,7 +176,6 @@ files contain key mappings as well (TODO: probably will move them out to skwp-ke * ,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 - * ,lm ,lc ,ls - rails specific lusty juggler file finders (models, controllers, specs, etc) - just use the letter for what you want after ,l **Rails** @@ -201,6 +200,22 @@ files contain key mappings as well (TODO: probably will move them out to skwp-ke * // - clear the search * ,T - Tag list (list of methods in a class) + **File Navigation** + * ,t - Command-T fuzzy file selector + * ,jm jump (command-t) app/models + * ,jc app/controllers + * ,jv app/views + * ,jh app/helpers + * ,jl lib + * ,jp public + * ,js spec + * ,jf fast_spec + * ,jt test + * ,jd db + * ,jC config + * ,jV vendor + * ,jF factories + **RSI-reduction** * Cmd-k and Cmd-d to type underscores and dashes (use Shift), since they are so common in code but so far away from home row * ; instead of : - avoid Shift for common tasks, just hit semicolon to get to ex mode @@ -235,7 +250,6 @@ 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 - * ,t - Command-T fuzzy file selector * sj - split a line such as a hash {:foo => {:bar => :baz}} into a multiline hash (j = down) * sk - unsplit a link (k = up) * Cmd-Shift-A - align things (type a character/expression to align by, works in visual mode or by itself) diff --git a/vim/plugin/settings/command-t.vim b/vim/plugin/settings/command-t.vim index 6af8560..19c2327 100644 --- a/vim/plugin/settings/command-t.vim +++ b/vim/plugin/settings/command-t.vim @@ -6,3 +6,19 @@ let g:CommandTMatchWindowReverse = 1 nmap ,t :CommandT nmap ,T :CommandTBuffer +" Idea from : http://www.charlietanksley.net/blog/blog/2011/10/18/vim-navigation-with-lustyexplorer-and-lustyjuggler/ +" Open CommandT starting from a particular path, making it much +" more likely to find the correct thing first. mnemonic 'jump to [something]' +map ,jm :CommandT app/models +map ,jc :CommandT app/controllers +map ,jv :CommandT app/views +map ,jh :CommandT app/helpers +map ,jl :CommandT lib +map ,jp :CommandT public +map ,js :CommandT spec +map ,jf :CommandT fast_spec +map ,jt :CommandT test +map ,jd :CommandT db +map ,jC :CommandT config +map ,jV :CommandT vendor +map ,jF :CommandT factories diff --git a/vim/plugin/settings/lusty-juggler.vim b/vim/plugin/settings/lusty-juggler.vim index 38cdcb4..6bddda2 100644 --- a/vim/plugin/settings/lusty-juggler.vim +++ b/vim/plugin/settings/lusty-juggler.vim @@ -18,17 +18,6 @@ nmap ,lb \lb " lusty buffer juggler (alternative mapping) nmap ,lj \lj -"idea from : http://www.charlietanksley.net/blog/blog/2011/10/18/vim-navigation-with-lustyexplorer-and-lustyjuggler/ -" open lusty file explorer from specific rails-friendly places -map ,lm :LustyFilesystemExplorer app/models -map ,lc :LustyFilesystemExplorer app/controllers -map ,lv :LustyFilesystemExplorer app/views -map ,lh :LustyFilesystemExplorer app/helpers -map ,ll :LustyFilesystemExplorer lib -map ,lp :LustyFilesystemExplorer public -map ,ls :LustyFilesystemExplorer specs -map ,lf :LustyFilesystemExplorer fast_spec -map ,lt :LustyFilesystemExplorer test let g:LustyJugglerSuppressRubyWarning = 1 let g:LustyJugglerAltTabMode = 1