Skip to content

Commit ca58a2d

Browse files
catleetpope
authored andcommitted
Documentation for function name replacements (fixes #222)
1 parent 5970688 commit ca58a2d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

doc/surround.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,16 @@ tag, its attributes are kept in the new tag. End your input with > to discard
135135
the those attributes. If <C-T> is used, the tags will appear on lines by
136136
themselves.
137137

138+
If f, F, or <C-F> is used, Vim prompts for a function name to insert. The target
139+
text will be wrapped in a function call. If f is used, the text is wrapped with
140+
() parentheses; F adds additional spaces inside the parentheses. <C-F> inserts the
141+
function name inside the parentheses.
142+
143+
Old text Command New text ~
144+
"hello" ysWfprint<cr> print("hello")
145+
"hello" ysWFprint<cr> print( "hello" )
146+
"hello" ysW<C-f>print<cr> (print "hello")
147+
138148
If s is used, a leading but not trailing space is added. This is useful for
139149
removing parentheses from a function call with csbs.
140150

0 commit comments

Comments
 (0)