When jumping to a tag with CTRL-] and having multiple tag matches, one has to choose which tag to use. Is it possible to filter the multiple match menu based on things like position or active syntax group? This way the irrelevant tags do not appear in the first place, even though they might match.


The tag list is based on the tags database query; I don't think there's a built-in way to influence the ordering (other than maybe changing the order of the different tags files in the 'tags' option).

In order to do custom filtering, you'd have to implement an equivalent to the <C-]> command yourself, using taglist() to retrieve the tags, and then doing your custom filtering before presenting the results. As the tags may reside in different files (which may not have been loaded into Vim yet), this won't be trivial.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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