Vim icon indicating copy to clipboard operation
Vim copied to clipboard

Support for Tags is missing.

Open mswift42 opened this issue 9 years ago • 12 comments

Please thumbs-up 👍 this issue if it personally affects you! You can do this by clicking on the emoji-face on the top right of this post. Issues with more thumbs-up will be prioritized.


I miss support for Browsing programs with tags.

For a definition of Tags see here: Vim Wikia: Browsing programs with tags.

The entry of the Roadmap states, that tag support is low priority, because vscode has very good support for tags, and citing the keybinding ctrl+shift+t. Unfortunately, I have no idea what ctrl+shift+t is supposed to do, it doesn't work on my box, and googling for it showed no results.

The one thing I'm really missing is, hovering over a method name, pressing Ctrl+] to go to its definition, and pressing Ctrl+o to go back where is was previously.

mswift42 avatar Dec 11 '16 17:12 mswift42

You should be able to use gd to go to the definition of any symbol, so long as vscode is smart enough to know where it is. You can also do this by hovering over a symbol and clicking while holding command.

johnfn avatar Dec 11 '16 20:12 johnfn

My bad, ctrl-shift-t was the wrong key binding. You want whatever the binding is for go to symbol. On my box it's cmd-t in a single file and cmd-shift-o across the entire project.

johnfn avatar Dec 11 '16 20:12 johnfn

Yes, I can use gd to go to a definition. But how do I get back ? using vim, pressing Ctrl+o returns you to the position you invoked the command. Here I would have to switch tabs and find my original position in the file manually.

mswift42 avatar Dec 11 '16 20:12 mswift42

Until we implement that, you can use ctrl dash, which is a VSCode command to return you to wherever the cursor used to be. 😄

johnfn avatar Dec 11 '16 21:12 johnfn

Do you have the name for this command ?

mswift42 avatar Dec 11 '16 21:12 mswift42

I looked here: https://code.visualstudio.com/docs/customization/keybindings

Apparently it is workbench.action.navigateBack.

johnfn avatar Dec 11 '16 21:12 johnfn

Thanks, (on Linux it was Ctrl+Alt+-) after Remapping to ctrl+o, works (so far) like a charm.

mswift42 avatar Dec 11 '16 21:12 mswift42

Wonderful. We should really add ctrl-o in just as a direct map to workbench.action.navigateBack. That seems like an easy change.

johnfn avatar Dec 11 '16 21:12 johnfn

Definitely, I also vastly prefer Ctrl+] over gd, because its quicker to type.

mswift42 avatar Dec 11 '16 22:12 mswift42

I want to note that I don't think this is really a feature. Vim has gd, gD, and <C-]>, all which do subtly different things. However, I'm pretty sure that most people who press any of these commands really just want go to definition. All that we need to do is add <C-]> to the command for gd, I think.

Chillee avatar Aug 30 '17 14:08 Chillee

Is this an issue that can be closed:

https://github.com/VSCodeVim/Vim/blob/36725f165be291ac92722facd8542740e5672ce6/src/actions/commands/actions.ts#L2075

cgilmore avatar Nov 14 '17 04:11 cgilmore

Thanks for pointing this out @sikthought. Closing!

jpoon avatar Nov 14 '17 04:11 jpoon