Open lxstorm opened 4 years ago
VS Code offers a Go Back
command via the Command Palette (Ctrl
+Shift
+P
). On the right side of the command name, you will see the keyboard shortcut for this command on your machine (on my Mac, it is Ctrl
+-
). Does that work for you?
This issue belongs in the https://github.com/microsoft/vscode repository, since the Go extension does not control VS Code's keyboard shortcuts or the behavior of VS Code's commands.
the Go Back
is VS Code's default command, it use vs code's inner stack, can Go extension make another jump stack that store the definition's jump path, GoDefinition
push the path both into the VScode's inner stack and go extension's definition stack, then another extension func maybe GoDefPop
can back from extension's stack, so I can bind maybe ctrl-t
to the GoDefPop
I'm not sure that such navigation commands are in the scope of this extension, but I'll let @hyangah make that decision.
I guess we can consider it, but I would like to understand how this would differ from Go Back
. Can you give an example case of something Go Back
does not handle as you would expect?
now use go back
it will back to somewhere where I click the mouse, after serveral times I can back to time.Now()
Godefpop can jump back to time.Now() straightly
Thanks for clarifying the use case. This does sound like a useful feature, but we probably won't prioritize implementing it in the near future. We welcome contributions, so I'll add a help wanted label if you or or anyone else is interested in taking this up.
If you have a question, please ask it on the
#vscode
or#vscode-go
channels in Gophers Slack](https://invite.slack.golangbridge.org/messages/vscode).Is your feature request related to a problem? Please describe. When use vscode to
go to definition
by serveral times mixing with some cursor move, then the jump back does not point the pre position where I callgo to definition
. This behaviour like vim's ctrl-o. hope a jump back tag stack feature like vim-go's ctrl-t (:GoDefPop
)Describe the solution you'd like use an additional definition stack, only jump definition can push into the stack, the jump back follows the stack's pop sequence