Closed vanabel closed 7 years ago
First, \big(...\big)
and similar are not really best practice. You should use \bigl(...\bigr)
. This also makes it possible for vimtex to parse. I'll write a more thorough reply later.
Ok, so: You want to add two new maps, gtsd
and ggtsd
. However, there is no "simple" way to do this from vimtex today. However, you can set
let g:vimtex_delim_toggle_mod_list = [
\ ['\left', '\right'],
\ ['\bigl', '\bigr'],
\ ['\biggl', '\biggr'],
\]
In order for tsd
to toggle between the above modifier variants. With the above setting, this also works for you example TeX input.
That is a really great solution!
I'm happy you like it :)
With the above g:vimtex_delim_toggle_mod_list
code by @lervag, one can go directly
(a+b)
to \bigl(a+b\bigr)
with 2tsd
, and(a+b)
to \biggl(a+b \biggr)
with 3tsd
.Such a great solution/plugin, thanks again for your time on this
Such a great solution/plugin, thanks again for your time on this
Happy you like it! :)
We know that vimtex has
tsd
to toggle of(
and)
between\left(
and\right)
and so on. I have read the related sectiong:vimtex_delim_list
but still stacked at how to addgtsd
to toggle(
and)
between\big(
and\big)
andggtsd
to toggle(
and)
between\bigg(
and\bigg)
.Idealy hope this work also for other delimiters like
{...}
and[...]
.I need this mainly because that in the following example of TeX, the
\left...\right
is not work: