diff --git a/doc/surround.txt b/doc/surround.txt index b1c386c..30a642a 100644 --- a/doc/surround.txt +++ b/doc/surround.txt @@ -133,6 +133,9 @@ attributes here and they will be stripped from the closing tag. End your input by pressing or >. If is used, the tags will appear on lines by themselves. +If s is used, a leading but not trailing space is added. This is useful for +removing parentheses from a function call with csbs. + CUSTOMIZING *surround-customizing* The following adds a potential replacement on "-" (ASCII 45) in PHP files. diff --git a/plugin/surround.vim b/plugin/surround.vim index f6b9407..0ec6427 100644 --- a/plugin/surround.vim +++ b/plugin/surround.vim @@ -159,6 +159,9 @@ function! s:wrap(string,char,type,...) elseif newchar ==# "p" let before = "\n" let after = "\n\n" + elseif newchar ==# 's' + let before = ' ' + let after = '' elseif newchar =~# "[tT\<,]" let dounmapp = 0 let dounmapb = 0