I am using vim to edit LaTeX files.

Throughout the text, there are labels to equations, tables etc. for which an accepted convention among TeX writers is the following

\label{eq:massenergy} , \label{tbl:exptresults} etc.

These can be cross-referenced later in text, eg referring to equation~\ref{eq:massenergy}, we can see that ..... blah ...blah ...

Sometimes, I want to change the equation being referenced, say I want to replace {eq:massenergy} with {eq:workenergyequivalence}. If my cursor is already somewhere in the word massenergy, I can do ciw and start typing the desired label. But in this case, it deletes the entire content within braces, i.e. becomes equivalent to ci}.

How can I set : as a word separator? Note that iskeyword+=: did not make any difference. What am I missing?

1 Answer 1


You are looking for

set iskeyword-=:

That is, making : explicitly not a keyword character. If : is in iskeyword it will be included in ciw.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.