vim-surround
vim-surround copied to clipboard
Allow using {}, [] and <> for function surround
With this patch, if a function name ends in the character "[", "{" or "<", that is used as the delimiter instead of "(".
The main use case for me is in LaTeX, where functions use the "{" delimiters. For example, ysiwf\textbf{<CR>
to make a word bold. I think this may be useful in other situations as well, for example array indexing.
:+1: Nicely done!
:+1:
Currently I have defined let b:surround_{char2nr("c")} = "\\\1command: \1{\r}"
.
Since dot-repeating of ysgnctextbf<CR>
does not work , it's possible to use ysgnf\textbf{
and dot repeat it.