Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

2 Answers 2

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, http://ex-vi.sourceforge.net/ 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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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