Permalink
Browse files

Add leading space replacement

  • Loading branch information...
1 parent ac67c1a commit 1c9d8e660ca65f38339b69d0c4481781eea5066c @tpope committed Jan 1, 2013
Showing with 6 additions and 0 deletions.
  1. +3 −0 doc/surround.txt
  2. +3 −0 plugin/surround.vim
View
@@ -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
@@ -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

0 comments on commit 1c9d8e6

Please sign in to comment.