Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

miseran
Copy link

@miseran miseran commented Mar 27, 2015

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.

@tommcdo
Copy link
Contributor

tommcdo commented Mar 28, 2015

👍 Nicely done!

@Hotschke
Copy link

👍

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.

If the function name ends in "{", "[" or "<", use that as a delimiter
instead of "(".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants