Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

vi uses dash and space as word separators. is there any way to exclude dash from word separators ?

This is required to work with the symbols generated by ctags exe. when symbol contain a "-" ,vi tags fails to locate that even though symbol is generated properly.

For example Symbol - EX01-VAR-LOCAL when using the ctrl+] to search tag for this, vi looks only for EX01 not the complete symbol EX01-VAR-LOCAL

although if used with vi -t EX01-VAR-LOCAL or in command mode :tag EX01-VAR-LOCAL works fine.

i am looking for the solution for vi editor only not vim

Thanks in advance :)

share|improve this question

I don't have access to a true vi, only elvis, nvi, and vim. In vim :set lisp will treat - as part of a word, rather than as a separator for both tags and motion. elvis does not (documentation claims it's unimplemented and does nothing), and nvi responds that :set lisp is unimplemented.

Update: a lightly updated vi, does indeed handle "-" as part of words for tag purposes (but not motion) when :set lisp is active.

share|improve this answer
Not sure if "only ... vim" is the right term! (-: – Rob Wells Jul 26 '13 at 18:22

See the help for 'iskeyword' in vim.

:help 'iskeyword'
share|improve this answer
Thank you @musiphil. That was a very helpful pointer and helped me to fix a similar issue with a different filetype. – jszakmeister Jan 16 '13 at 10:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .