Skip to content

Conversation

@hansonchar
Copy link

@hansonchar hansonchar commented Jun 10, 2025

Motivation

VS Code currently has a helpful behavior where, if a block of text is selected and the user presses the backtick ("`"), the selected text is wrapped in backticks rather than replaced.

This PR extends that behavior to the dollar sign ($) for markdown contexts. Specifically, when text is selected and the user presses $, the editor would wrap the selection in $...$, rather than replacing it with a single dollar sign.

Testing

Locally built, installed, and tested the changes. It appears to work as expected.

@hansonchar hansonchar changed the title Add '$' to surroundingPairs configuration Add $ to surroundingPairs configuration Jun 10, 2025
@adomani
Copy link

adomani commented Jun 11, 2025

Relavant Zulip discussion.

@adomani
Copy link

adomani commented Jun 11, 2025

In particular, I would rather this be opt-in: I would like this to be in place for latex files, but I would prefer if this were not the default behaviour for lean files.

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.

2 participants