Add leading space replacement

This commit is contained in:
Tim Pope 2013-01-01 01:32:10 -05:00
parent ac67c1a738
commit 1c9d8e660c
2 changed files with 6 additions and 0 deletions

View File

@ -133,6 +133,9 @@ attributes here and they will be stripped from the closing tag. End your
input by pressing <CR> or >. If <C-T> 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.

View File

@ -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\<C-T><,]"
let dounmapp = 0
let dounmapb = 0