Vim LaTeX \begin autocomplete -
i writing mathematical paper using latex , pretty content vim, however, thing miss texmaker automatically generated \begin{}\end{} blocks. wondering how might implement such functionality using inoremap
command in same way texmaker, after you, example, type \begin
extends \begin{<env>} \end{<env>}
, places cursor between braces , after replace <env>
environment replaces both in \begin{}
, in end{}
command.
is possible vim script?
this command take word under cursor , make block wanted
:noremap \b cw\begin{<c-r>"}<cr>\end{<c-r>"}
keep cursor @ start of word , press \b in normal mode desired output.
Comments
Post a Comment