Exclude dash (-) from word separators in vi

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.

Thanks in advance :slight_smile:

Well, I had not thought about it. Hmm. For vim edit .vimrc

#change this
set iskeyword=!-~,^*,^45,^124,^34,192-255
#to this
set iskeyword=!~,^*,^45,^124,^34,192-255

I'll dig thru some junk to see about vi

1 Like

Well, I hope someone else knows more. Can't find anything useful. Although vi -t is not so horrible a burden to get what you need.

Thanks for the reply
yeah,i agree that if you want to open the tag for the first time then vi -t is fine but when you are inside a file that time ctrl+] is mostly used to jump to desired tag. This is what i wanted if somehow we can implement this with ctrl+] for vi.