I am using vim. I also asked this question on vi-vim SX. I hope this question is acceptable for TeX-SX.


Currently, when I set ft=tex, my set isk? reads


that is, the default for vim.

My "issue"

Currently, in a LaTeX string such as


the w jump would take me from the start to

  1. a
  2. \
  3. f
  4. $

Thus, the above setting does not feel very natural, nor optimal.

Indeed, it would probably be more reasonable to jump to

  1. \
  2. _
  3. \
  4. $

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.


  1. Is it supposed to be so ? yes, since it is the default
  2. What are better settings ?
  3. How to properly set this variable for this filetype ?


  • 1
    :h isk suggests that @,48-57,_,192-255 is the default for a non-Windows platform, and also that iskeyword can be ignored by a syntax file. If you look in your runtime at syntax/tex.vim and search for isk 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. – Thruston Apr 17 '17 at 21:38
  • Well, I would like to have it changed; something like set isk-=_ and set isk+=\ probably, but not too sure... – marsupilam Apr 17 '17 at 21:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.