vscode-nested-tags
vscode-nested-tags copied to clipboard
Feature request: Go to tag references
From clicking on the file, go to each of the occurrences of a tag in the file.
Move cursor to the line of occurrence is still desired.
I use this extension to organize code in a large project. Sometime I'll put two tags in one file, so if the click can bring me to the line, it's gonna be perfect.
I did some research, it looks like we need a custom command rather than "vscode.open", remember the line number during searching for tags and reveal the line in the custom command.
A reference implementation can be found in the TODO tree extension here: https://github.com/Gruntfuggly/todo-tree/blob/master/extension.js#L877
I use this extension to organize code in a large project. Sometime I'll put two tags in one file, so if the click can bring me to the line, it's gonna be perfect.
Dude, that's awesome. I'd be curious to hear about your use case at some point. Maybe we could chat on the phone or do a screen share for 15 minutes whenever you're free.
@oldhu I've been feeling similarly as well. My navigation has been suffering because of this feature not being available. I've just started a new position so I'm putting more energy into that right now, but once things settle I would be more than willing to implement this myself.
If you'd entertain submitting a pr I would also support that. I'll read through some of the examples you posted this weekend and post a high level outline on what would need to be done.
Is this feature still being considered? Being able to jump to the line with the tag would make this 100% perfect!
I would love to at some point. I've just been busy with work recently. If you have a pull request, I would be more than willing to take a look at it. I think this would really increase the usability of the extension.
I have a POC that I will submit, it is not production worthy yet as it does not handle YAML headers (I had to rework that section) and it also does not always jump to the line when it is opening a new file. I find double clicking works but not sure why I need to click twice on the file name.
You can see from the pull request the proposed changes, I am essentially adding the LineNum(X) in the tree right before the filename. I tried a few different UX's and this one seems to work the best. A better approach maybe to add the additional processing of a new type of tag - for example "@@" that could simplify the change and only add this functionality of infile tagging/jumping to line.
Awesome! I’ll take a peek at the pr!