vim-surround icon indicating copy to clipboard operation
vim-surround copied to clipboard

Allow using {}, [] and <> for function surround

Open miseran opened this issue 9 years ago • 2 comments

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.

miseran avatar Mar 27 '15 22:03 miseran

:+1: Nicely done!

tommcdo avatar Mar 28 '15 00:03 tommcdo

:+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.

Hotschke avatar Oct 20 '15 12:10 Hotschke