I want to define insert mode mappings that will jump outside the scope of any delimiter I'm in (forward/backward). Where "delimiter" is in the broad sense of LaTeX delimiters, so not only {},[],()
but also $$, \{ \}, \left( \right)
etc. Preferably I'd like to use <tab>/<S-tab>
for this.
How can I do that using vimtex
?
Example (▒
marks cursor place, each line corresponding to a use of the intended "forward" keymap)
$\left[ f_{k(▒x)}+1 \right]-2$
$\left[ f_{k(x)▒}+1 \right]-2$
$\left[ f_{k(x)}▒+1 \right]-2$
$\left[ f_{k(x)}+1 \right]▒-2$
$\left[ f_{k(x)}+1 \right]-2$▒
P.S I'm using neovim with LazyVim distro, so can utilize treesitter and lsp if needed, but my guess is that vimtex should suffice.