I am using vim. I also asked this question on vi-vim SX. I hope this question is acceptable for TeX-SX.
Context
Currently, when I set ft=tex
, my set isk?
reads
iskeyword=@,48-57,_,192-255
that is, the default for vim.
My "issue"
Currently, in a LaTeX string such as
$\abcde_\fgh$
the w
jump would take me from the start to
a
\
f
$
Thus, the above setting does not feel very natural, nor optimal.
Indeed, it would probably be more reasonable to jump to
\
_
\
$
My attempt
I'm thinking of something more like set iskeyword=\,192-255
so as to have words consist of characters that would fit in
- natural language words
- or LaTeX commands.
Questions
- Is it supposed to be so ? yes, since it is the default
- What are better settings ?
- How to properly set this variable for this filetype ?
Cheers,
:h isk
suggests that@,48-57,_,192-255
is the default for a non-Windows platform, and also thatiskeyword
can be ignored by a syntax file. If you look in your runtime atsyntax/tex.vim
and search forisk
you will see that it is indeed ignored by the standard TeX syntax settings in Vim. So I don't think you need to worry about it.set isk-=_
andset isk+=\
probably, but not too sure...