diff --git a/README.md b/README.md index c9a8de9..20e6674 100644 --- a/README.md +++ b/README.md @@ -326,14 +326,14 @@ files contain key mappings as well (TODO: probably will move them out to skwp-ke #### RSI-reduction + * Cmd-Space to autocomplete. Tab for snipmate snippets. * `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 * `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 * `Ctrl-l` to insert a => hashrocket (thanks @garybernhardt) * `,.` to go to last edit location (same as `'.`) because the apostrophe is hard on the pinky - * `Cmd-'` and `Cmd-"` to change content inside quotes - * Cmd-Space to autocomplete. Tab for snipmate snippets. * `,ci` to change inside any set of quotes/brackets/etc * `,#` `,"` `,'` `,]` `,)` `,}` to surround a word in these common wrappers. the # does #{ruby interpolation}. works in visual mode (thanks @cj) + * `Cmd-'`, `Cmd-"`, `Cmd-]`, `Cmd-)`, etc to change content inside those surrounding marks. You don't have to be inside them. #### Tab Navigation diff --git a/vim/plugin/settings/yadr-keymap.vim b/vim/plugin/settings/yadr-keymap.vim index a4aa466..aef23b5 100644 --- a/vim/plugin/settings/yadr-keymap.vim +++ b/vim/plugin/settings/yadr-keymap.vim @@ -72,12 +72,15 @@ vmap ,{ c{"} " gary bernhardt's hashrocket imap => -" Change inside quotes with Cmd-" and Cmd-' -nnoremap ci' -nnoremap ci" - -" Add spaces around a symbol with Ctrl-Space -nnoremap i a +" Change inside various enclosures with Cmd-" and Cmd-' +" The f makes it find the enclosure so you don't have +" to be standing inside it +nnoremap f'ci' +nnoremap f"ci" +nnoremap f(ci( +nnoremap f)ci) +nnoremap f[ci[ +nnoremap f]ci] "Go to last edit location with ,. nnoremap ,. '. @@ -150,7 +153,7 @@ nnoremap l nnoremap k nnoremap j -" Zoom in and out of current window with ,, +" Zoom in and out of current window with ,gz map ,gz o " Use numbers to pick the tab you want (like iTerm) @@ -228,22 +231,6 @@ vmap :Tabularize / nmap sj :SplitjoinSplit nmap sk :SplitjoinJoin -" ============================ -" VimBookmarking -" ============================ -" -" Set anonymous bookmarks -nmap ,Bb :ToggleBookmark -nmap ,Bn :NextBookmark -nmap ,Bp :PreviousBookmark -nmap ,Bc :ClearBookmarks -" -" ============================ -" Abbreviations to use... -" ============================ -" snippets that are expanded with space -abbr pry! require 'pry'; binding.pry - " ============================ " vim-ruby-conque " ============================ @@ -256,3 +243,6 @@ nmap , :call RunLastConqueCommand() " Get the current highlight group. Useful for then remapping the color map ,hi :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">" . " FG:" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"fg#") + +" Source current file Cmd-% (good for vim development) +map :so %