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 <plug>(vimtex-env-toggle) for toggling environments #3075

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

lervag
Copy link
Owner

@lervag lervag commented Jan 13, 2025

This implements a solution for #3072

The `tse` is a natural mapping for this, and `tss` seems like a more
natural mapping for "toggle environment starred".

refer: #3072
@firubat
Copy link

firubat commented Jan 13, 2025

This works for me as I expect :) Thanks a lot!

By the way, I personally remap the toggle commands because the default interferes with the t movement. I remap them to cx.... But I guess that might be too big a change from what people are already used to.

Regarding your question about other toggles, I can't really think of something I use so often. Maybe toggling different align environments? Not sure if it's standard enough to be in the plugin. I'll update if I think of something else.

@lervag
Copy link
Owner Author

lervag commented Jan 13, 2025

This works for me as I expect :) Thanks a lot!

Great, thanks for testing and for the feedback!

By the way, I personally remap the toggle commands because the default interferes with the t movement. I remap them to cx.... But I guess that might be too big a change from what people are already used to.

Ah, yes. I've found ts to be quite safe here, but some people use s for motion plugins as well. In any case, it's easy to remap so.

Regarding your question about other toggles, I can't really think of something I use so often. Maybe toggling different align environments? Not sure if it's standard enough to be in the plugin. I'll update if I think of something else.

The point is that it is trivial to add toggles here. But then, it is also trivial to add more as a user. So I guess I could merge now and possibly add more default maps later.

@lervag lervag merged commit c8412f4 into master Jan 13, 2025
2 checks passed
@lervag lervag deleted the feat/add-toggle-env branch January 13, 2025 21:34
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