mirror of
https://github.com/tpope/vim-surround.git
synced 2026-09-10 07:16:17 -04:00
Added support to surround Ruby Blocks
Use 'R' or '<C-R>' to trigger addition of a ruby block around the selected object either in visual mode or while using with ys commands. TODO: Need to add support to allow deletion (via ds) of a ruby block.
This commit is contained in:
parent
02199ea008
commit
a208a6e669
|
|
@ -224,6 +224,12 @@ function! s:wrap(string,char,type,...)
|
|||
let after = ' ' . after
|
||||
endif
|
||||
endif
|
||||
elseif newchar ==# "R" || newchar == "\<C-R>"
|
||||
let blk = input('block: ')
|
||||
if blk != ""
|
||||
let before = blk . "\n\t"
|
||||
let after = "\nend"
|
||||
endif
|
||||
elseif newchar ==# "\<C-F>"
|
||||
let fnc = input('function: ')
|
||||
let before = '('.fnc.' '
|
||||
|
|
|
|||
Loading…
Reference in a new issue