Custom surround.vim ability to wrap #{ruby} variables using s# motion
This commit is contained in:
@@ -33,6 +33,9 @@ imap <silent> <D-D> -
|
||||
" Don't have to use Shift to get into command mode, just hit semicolon
|
||||
nnoremap ; :
|
||||
|
||||
"Go to last edit location with ,.
|
||||
nnoremap ,. '.
|
||||
|
||||
" ================== rails.vim
|
||||
"
|
||||
" Open corresponding unittest (or spec), alias for :AV in rails.vim
|
||||
|
||||
12
vim/plugin/settings/surround.vim
Normal file
12
vim/plugin/settings/surround.vim
Normal file
@@ -0,0 +1,12 @@
|
||||
" via: http://whynotwiki.com/Vim
|
||||
" Ruby
|
||||
" Use v or # to get a variable interpolation (inside of a string)}
|
||||
" ysiw# Wrap the token under the cursor in #{}
|
||||
" v...s# Wrap the selection in #{}
|
||||
let g:surround_113 = "#{\r}" " v
|
||||
let g:surround_35 = "#{\r}" " #
|
||||
|
||||
" Select text in an ERb file with visual mode and then press s- or s=
|
||||
" Or yss- to do entire line.
|
||||
let g:surround_45 = "<% \r %>" " -
|
||||
let g:surround_61 = "<%= \r %>" " =
|
||||
Reference in New Issue
Block a user