Added Cmd-), Cmd-] and etc for modifying content inside surrounds
This commit is contained in:
parent
beed6abf55
commit
5d7cf73799
@ -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
|
||||
|
||||
|
@ -72,12 +72,15 @@ vmap ,{ c{<C-R>"}<ESC>
|
||||
" gary bernhardt's hashrocket
|
||||
imap <c-l> <space>=><space>
|
||||
|
||||
" Change inside quotes with Cmd-" and Cmd-'
|
||||
nnoremap <D-'> ci'
|
||||
nnoremap <D-"> ci"
|
||||
|
||||
" Add spaces around a symbol with Ctrl-Space
|
||||
nnoremap <C-Space> i <esc><right>a <esc>
|
||||
" 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 <D-'> f'ci'
|
||||
nnoremap <D-"> f"ci"
|
||||
nnoremap <D-(> f(ci(
|
||||
nnoremap <D-)> f)ci)
|
||||
nnoremap <D-[> f[ci[
|
||||
nnoremap <D-]> f]ci]
|
||||
|
||||
"Go to last edit location with ,.
|
||||
nnoremap ,. '.
|
||||
@ -150,7 +153,7 @@ nnoremap <silent> <C-l> <C-w>l
|
||||
nnoremap <silent> <C-k> <C-w>k
|
||||
nnoremap <silent> <C-j> <C-w>j
|
||||
|
||||
" Zoom in and out of current window with ,,
|
||||
" Zoom in and out of current window with ,gz
|
||||
map <silent> ,gz <C-w>o
|
||||
|
||||
" Use numbers to pick the tab you want (like iTerm)
|
||||
@ -228,22 +231,6 @@ vmap <D-A> :Tabularize /
|
||||
nmap sj :SplitjoinSplit<cr>
|
||||
nmap sk :SplitjoinJoin<cr>
|
||||
|
||||
" ============================
|
||||
" VimBookmarking
|
||||
" ============================
|
||||
"
|
||||
" Set anonymous bookmarks
|
||||
nmap ,Bb :ToggleBookmark<cr>
|
||||
nmap ,Bn :NextBookmark<cr>
|
||||
nmap ,Bp :PreviousBookmark<cr>
|
||||
nmap ,Bc :ClearBookmarks<cr>
|
||||
"
|
||||
" ============================
|
||||
" Abbreviations to use...
|
||||
" ============================
|
||||
" snippets that are expanded with space
|
||||
abbr pry! require 'pry'; binding.pry
|
||||
|
||||
" ============================
|
||||
" vim-ruby-conque
|
||||
" ============================
|
||||
@ -256,3 +243,6 @@ nmap <silent> ,<D-R> :call RunLastConqueCommand()<CR>
|
||||
|
||||
" 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#")<CR>
|
||||
|
||||
" Source current file Cmd-% (good for vim development)
|
||||
map <D-%> :so %<CR>
|
||||
|
Loading…
Reference in New Issue
Block a user