More vim surround shortcuts ,} ,] ,) ,' etc
This commit is contained in:
parent
6cefaf13f7
commit
5b8742e226
@ -333,7 +333,7 @@ files contain key mappings as well (TODO: probably will move them out to skwp-ke
|
|||||||
* `Cmd-'` and `Cmd-"` to change content inside quotes
|
* `Cmd-'` and `Cmd-"` to change content inside quotes
|
||||||
* Cmd-Space to autocomplete. Tab for snipmate snippets.
|
* Cmd-Space to autocomplete. Tab for snipmate snippets.
|
||||||
* `,ci` to change inside any set of quotes/brackets/etc
|
* `,ci` to change inside any set of quotes/brackets/etc
|
||||||
* `,#` and ',"' to surround a word in #{ruby interpolation} or "quotes"
|
* `,#` `,"` `,'` `,]` `,)` `,}` to surround a word in these common wrappers. the # does #{ruby interpolation}. works in visual mode (thanks @cj)
|
||||||
|
|
||||||
#### Tab Navigation
|
#### Tab Navigation
|
||||||
|
|
||||||
|
@ -40,8 +40,34 @@ imap <silent> <D-D> -
|
|||||||
|
|
||||||
" ,# Surround a word with #{ruby interpolation}
|
" ,# Surround a word with #{ruby interpolation}
|
||||||
map ,# ysiw#
|
map ,# ysiw#
|
||||||
" ,# Surround a word with quotes
|
vmap ,# c#{<C-R>"}<ESC>
|
||||||
|
|
||||||
|
" ," Surround a word with "quotes"
|
||||||
map ," ysiw"
|
map ," ysiw"
|
||||||
|
vmap ," c"<C-R>""<ESC>
|
||||||
|
|
||||||
|
" ,' Surround a word with 'single quotes'
|
||||||
|
map ,' ysiw'
|
||||||
|
vmap ,' c'<C-R>"'<ESC>
|
||||||
|
|
||||||
|
" ,) or ,( Surround a word with (parens)
|
||||||
|
" The difference is in whether a space is put in
|
||||||
|
map ,( ysiw(
|
||||||
|
map ,) ysiw)
|
||||||
|
vmap ,( c( <C-R>" )<ESC>
|
||||||
|
vmap ,) c(<C-R>")<ESC>
|
||||||
|
|
||||||
|
" ,[ Surround a word with [brackets]
|
||||||
|
map ,] ysiw]
|
||||||
|
map ,[ ysiw[
|
||||||
|
vmap ,[ c[ <C-R>" ]<ESC>
|
||||||
|
vmap ,] c[<C-R>"]<ESC>
|
||||||
|
|
||||||
|
" ,{ Surround a word with {braces}
|
||||||
|
map ,} ysiw}
|
||||||
|
map ,{ ysiw{
|
||||||
|
vmap ,} c{ <C-R>" }<ESC>
|
||||||
|
vmap ,{ c{<C-R>"}<ESC>
|
||||||
|
|
||||||
" gary bernhardt's hashrocket
|
" gary bernhardt's hashrocket
|
||||||
imap <c-l> <space>=><space>
|
imap <c-l> <space>=><space>
|
||||||
|
Loading…
Reference in New Issue
Block a user