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

Add support for more characters for the vim mode pair handling #547

Open
freundTech opened this issue Feb 17, 2025 · 1 comment
Open

Add support for more characters for the vim mode pair handling #547

freundTech opened this issue Feb 17, 2025 · 1 comment
Labels
feature request New feature or request.

Comments

@freundTech
Copy link

Description

Vim handles certain characters, such as (, ), [, ], ", and more as pairs.
This means that you can, for example, use % to jump between corresponding opening and closing delimiters or use i and a to affect code surrounded by delimiters, as in ci", which changes everything within the selected quotes or da(, which deleted everything within the selected parenthesis, including the parenthesis themselves.
The Typst web app vim mode replicates this behaviour.

In Typst some characters can be used as delimiters, but are not recognized by the web app vim mode as delimiters, such as * (bold) and _ (italics) and $ (math mode).
In normal vim it would be possible to add those characters as delimiters using the .vimrc configuration file.
I believe the Typst web app should threat them as delimiters by default, allowing users to use, for example, ci* to change the text between two * characters.

Use Case

Supporting this would make editing in vim mode more efficient and intuitive. Those characters are semantically paired delimiters but are not treated as such by the current vim mode.

@freundTech freundTech added the feature request New feature or request. label Feb 17, 2025
@laurmaedje
Copy link
Member

See also #37

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request.
Projects
None yet
Development

No branches or pull requests

2 participants