Choose inside the dollar sign in Vim with the Vim / LaTeX plugin

Is there a way to choose inside the dollar sign $...$, perhaps using the tools in the vim-latex package? Ideally, it would vi$fit vi(, vi[, vi"who choose the content in parentheses, brackets, and quotation marks, respectively.

Macro, such

let @q='F$lvt$'

is undesirable because it is not called obvious vi$.

Thanks.

+4
source share
2 answers

Possible answer:

:onoremap <silent> i$ :<c-u>normal! T$vt$<cr>
:vnoremap i$ T$ot$

This will do the following work:

  • di$, yi$, gUi$Or any team, waiting movement now recognizes i$as useful movement;
  • vi$ will select the expected range.
+5
source

:

xnoremap i$ :<C-u>normal! T$vt$<CR>
onoremap i$ :normal vi$<CR>

v, d, y, c:

di$
vi$
ci$
yi$
+2

Source: https://habr.com/ru/post/1626210/


All Articles