-
Notifications
You must be signed in to change notification settings - Fork 391
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
Toggle different styles of fraction, arrow etc. support request #2402
Comments
In my view, we can use
for
for
for |
You want something like this: let g:vimtex_toggle_fractions = [ 'INLINE', 'frac', 'dfrac', 'cfrac' ] where let g:vimtex_toggle_fractions = [ 'INLINE', 'frac' ] Does this sound like a sensible solution to you?
This is something else entirely. UltiSnips is very neat and I use it myself; but I don't use it for toggles like this. It may work for that as well, but it feels a little bit out of scope. I think the general behaviour of toggling or cyclign between related concepts is captured by some other plugins. At least for the more simple cases, such as the arrows. I suggest you look into one of these:
I believe all of these should work for you with some configuration (although at least one of these require neovim).
Glad to hear it! :) |
That's what I want exactly! Thanks you very much!
Thanks, I'll try some of them. Should I close the issue currently or after the feature is implemented? |
Nah, let's leave the issue opened until I get around to implementing this. Won't make promises on when, but I'll look into it when I get the time :) |
Thanks! |
Sorry, took a while before I got around to it. But I believe this should work as promised now! |
Great! Appreciating your excellent works! |
I've checked that the fraction toggle only works for
.../...
and\frac{...}{...}
.I consider that it should be useful to toggle different styles of fraction such as cycling in
\frac{...}{...}
,\dfrac{...}{...}
and\cfrac{...}{...}
.Besides, this can also apply to arrow toggle, which means we can cycle in
->
,\rightarrow
,\Rightarrow
and so on.I've tried it through another vim plugin called UltiSnips
snippet code
However, this solution is easy-trigger, which means even in case like
\frac{...}{...}...{...}<tab>
can trigger the transformation.I've also struggled to use commands like
vimtex#delim#get_surrounding
to match the brackets via UltiSnips, but cause I'm a new learner so I failed.I wonder if there is a simple solution that can apply for different cases to achieve my request, Or it can be taken as a feature into later version.
Appreciating your wonderful work!
The text was updated successfully, but these errors were encountered: