質問

When using exuberant ctags with Vim, I've found that ctags generates a tags file that contains spaces at the beginning of each tag definition. As a result, whenever I jump to a tag, it jumps to the beginning of the line, instead of the location of the tag later on in the line.

Is there any way to tell exuberant ctags to not index this whitespace?

enter image description here

役に立ちましたか?

解決

I do a postprocess step on my tag files to clean them up. E.g. we have a few (C++) namespaces but they appear everywhere and it's not a useful tag to search on.

Maybe you could just rip through the file and stick a \zs in front of the first match for the tag on each line? Alternatively you could strip everything from ^ to the tag in the search term. (I've never tried this.)

My method is just after the ctags call in the tagging script I pass the file back through a series of grep -vEs.

Good luck.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top