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

Vim commands such as y, r and ~ result in invalid cursor positions #10

Open
RyotaUshio opened this issue Nov 11, 2024 · 1 comment
Open
Labels
bug Something isn't working vim Related to vim keybindings

Comments

@RyotaUshio
Copy link
Owner

See #9 (comment)

@RyotaUshio RyotaUshio added bug Something isn't working vim Related to vim keybindings labels Nov 11, 2024
@carpetdev
Copy link
Contributor

carpetdev commented Nov 11, 2024

Interestingly, repeatedly alternating the keypresses ~ followed by <C-z> has the following effect: The first time the cursor jumps back two positions, and all subsequent times it jumps back three positions. (Note that <C-z> is obsidian/codemirror's native undo. Vim's undo key of u actually jumps to the start of the expression with this plugin - presumably because it detects the brace insertion being the most recent change)

I wonder if a cheap fix for all of this would be to have a plugin option of just persisting the braces beside the dollars from the moment the dollar is inserted instead of automatically removing them every time the expression is deselected and then reinserting them when needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working vim Related to vim keybindings
Projects
None yet
Development

No branches or pull requests

2 participants