3

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 :)

2 Answers 2

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.

1
  • Not sure if "only ... vim" is the right term! (-:
    – Rob Wells
    Jul 26, 2013 at 18:22
1

See the help for 'iskeyword' in vim.

:help 'iskeyword'
1
  • Thank you @musiphil. That was a very helpful pointer and helped me to fix a similar issue with a different filetype. Jan 16, 2013 at 10:14

You must log in to answer this question.

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