Custom surround.vim ability to wrap #{ruby} variables using s# motion

This commit is contained in:
yan
2011-12-17 13:27:01 -08:00
committed by Yan Pritzker
parent f3a3ef7713
commit b125a96fb8
3 changed files with 51 additions and 18 deletions

View 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 %>" " =