Vim: C-o not working on many non-vim commands/jumps

Created on 23 Aug 2019  路  5Comments  路  Source: VSCodeVim/Vim

Describe the bug
C-o does not jump back after searching for refences or jumping to another location in another file through the explore etc.

To Reproduce

  1. put the cursor over a function
  2. right click and click Find all references
  3. click a location on in the results view
  4. press C-o

also using pgup/pgdown/home does got get registered by the jumphandler

Expected behavior
expected to be returned back to the function definition, but instead it goes back to a previous jump i made.
also using pgup/pgdown/home does got get registered by the jumphandler

Is there a particular reason why we dont use vscode builtin Go Back / Go Forward commands? workbench.action.navigateBack / workbench.action.navigateBack

aremotion kinbug

All 5 comments

I have the same problem, for example:
I use "go to definition in extension c/c++" to jump from functionA to functionB, and then jump to functionC. But When I use "ctrl + o" to go back, it will return to functionA, i think it should return to functionB.

Have you tried the native VSCode "go back" command? It's mapped to Ctrl + Alt + - for me. Not sure if this is the right behaviour that you want, but a workaround is simply to change the keybindings and use this command instead.

Native VSCode "go back" will record every CURSOR move, even "hjkl" keystrokes, which is not great to use.

Vim Ctrl+o can't jump back after jumping to code in another file by using 'Ctrl + ]' or 'Go To Definition'. If all jumps happens in the same file, it works well.

I can confirm that version 1.11.3 works well on jumping forward & backward across different files.

"Go back" does not work on version 1.12.4 after using "go to definition" on C/C++ files.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

edwintorok picture edwintorok  路  3Comments

elithrar picture elithrar  路  3Comments

WangRongda picture WangRongda  路  3Comments

spinningarrow picture spinningarrow  路  3Comments

lucastheisen picture lucastheisen  路  3Comments