Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

commands: support the equivalent of vim-go's GoDefPop #203

Open
lxstorm opened this issue Jun 10, 2020 · 5 comments
Open

commands: support the equivalent of vim-go's GoDefPop #203

lxstorm opened this issue Jun 10, 2020 · 5 comments
Labels
FeatureRequest HelpWanted Issues that are not prioritized by the maintainers. Help is requested from community contributors.

Comments

@lxstorm
Copy link

lxstorm commented Jun 10, 2020

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 call go 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

@stamblerre
Copy link
Contributor

stamblerre commented Jun 10, 2020

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.

@stamblerre stamblerre added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Jun 10, 2020
@stamblerre stamblerre removed the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Jun 10, 2020
@lxstorm
Copy link
Author

lxstorm commented Jun 10, 2020

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

@stamblerre
Copy link
Contributor

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?

@stamblerre stamblerre reopened this Jun 10, 2020
@stamblerre stamblerre changed the title jump back from definition use definition stack commands: support the equivalent of vim-go's :GoDefPop Jun 10, 2020
@stamblerre stamblerre changed the title commands: support the equivalent of vim-go's :GoDefPop commands: support the equivalent of vim-go's GoDefPop Jun 10, 2020
@lxstorm
Copy link
Author

lxstorm commented Jun 10, 2020

  1. move the cursor to time.Now()
  2. go definition, now cursor is on func Now(..)
  3. click some position on the same page
  4. scroll the page and click serval times
  5. scroll the page and click another some where

now use go back it will back to somewhere where I click the mouse, after serveral times I can back to time.Now()
Jun-10-2020 14-22-26

Godefpop can jump back to time.Now() straightly

@stamblerre
Copy link
Contributor

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.

@stamblerre stamblerre added FeatureRequest HelpWanted Issues that are not prioritized by the maintainers. Help is requested from community contributors. labels Jun 10, 2020
@hyangah hyangah added this to the Backlog milestone Aug 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest HelpWanted Issues that are not prioritized by the maintainers. Help is requested from community contributors.
Projects
None yet
Development

No branches or pull requests

3 participants