Skip to content

Add <plug>(vimtex-env-toggle) for toggling environments#3075

Merged
lervag merged 1 commit intomasterfrom
feat/add-toggle-env
Jan 13, 2025
Merged

Add <plug>(vimtex-env-toggle) for toggling environments#3075
lervag merged 1 commit intomasterfrom
feat/add-toggle-env

Conversation

@lervag
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown
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
@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