Closed bogdan closed 14 years ago
An idea to have the 'sif' command that surrounds selected text with if conditional statement like
Ruby example. Before: article.publish!
After: if article.publish! end
The problem is that it depends on the current buffer file type e.g. Ruby, ERB, JavaScrit etc. Is that possible to implement with surround.vim?
You should read the help on |surround-customizing|.
Yes, the referenced help does explain how to do custom surroundings on a per file-type basis.
An idea to have the 'sif' command that surrounds selected text with if conditional statement like
Ruby example. Before: article.publish!
After: if
article.publish!
end
The problem is that it depends on the current buffer file type e.g. Ruby, ERB, JavaScrit etc. Is that possible to implement with surround.vim?