By default, in vim (and most other editors) :
and -
separate words. This means word/tag completion do not complete eq:loc<c-x><c-]>
but only loc<c-x><c-]>
. If there is no tag loc...
, nothing happens.
You can fix this by placing
setlocal iskeyword+=:
setlocal iskeyword+=-
in ~/.vim/after/ftplugin/tex.vim
and/or ~/.vim/after/ftplugin/rmd.vim
(rmd=rmarkdown).
However, this might have surprising side effects. For instance, if you have the equation a-b:2
, it is now treated as a single word.
The situation in latex is known to be complicated:
You can't get all LaTeX strings right using iskeyword, that is because the iskeyword works on characters and some characters may have different meanings in different contexts. (from iskeyword for latex)
Someone already asked the question iskeyword with context. But the answer is not affirmative to solve this issue.
:set iskeyword+=:
. If it helps, you can putsetlocal iskeyword+=:
into~/.vim/after/ftplugin/tex.vim
. BTW recommended by vim-latex aka latex-suite. – Hotschke Nov 17 '18 at 13:56vim-latex
functionality tormarkdown
– Jan Nov 17 '18 at 14:27iskeyword
is, the title is not very helpful. Oh, no this question wants the opposite. My mistake. – Hotschke Nov 17 '18 at 15:54