How do I choose from multiple tag matches when a tag has several definitions?
Answer
:tselect
Explanation
When a tag has multiple definitions (e.g., an overloaded function), :tselect presents a list and lets you choose which one to jump to.
How it works
:tselect tagnameshows all matching tag entries- Each entry shows the file, line number, and kind
- Type a number and press Enter to jump to that definition
Example
:tselect process
# pri kind tag file
1 F f process src/main.go:42
2 F f process src/utils.go:15
Type number and <Enter>:
Tips
g<C-]>is the normal-mode equivalent:tjumpis similar but jumps directly if there is only one matchg]lists matching tags for the word under cursor:tnextand:tprevcycle through multiple tag matches