Skip to content

Add $ as a surround character (#8895) #9525

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

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

Conversation

cjohnson19
Copy link

What this PR does / why we need it:

This PR adds $ as a "quote"-like character to support surround and bracket-like actions (e.g. yi$, ysi$}). These actions are supported by vim surround, so users expect this to line up when interacting with VSCodeVim.

Which issue(s) this PR fixes

Fixes #8895

Special notes for your reviewer:

This creates a weird mismatch between the names for Quote behavior, since it now supports a $. The naming for "quotes" makes sense given things like diq, but I think in essense the quote matching really lines up with a "directionless" behavior.

@J-Fields
Copy link
Member

Is $ a special character treated like a quote, or does this work for any character in Vim surround?

@cjohnson19
Copy link
Author

That's a great question, and one I didn't consider previously. Looks like vim-surround will treat any non-alphabetic character as a valid surrounding target. From the documentation:

Undefined replacement characters (with the exception of alphabetic characters) default to placing themselves at the beginning and end of the destination, which can be useful for characters like / and |.

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.

Surround Input mode (ys in Normal or S in Visual) doesn't recognize dollar sign
2 participants