DEV Community

Discussion on: 14 VS Code Shortcuts to Supercharge Your Productivity

 
darrylnoakes profile image
Darryl Noakes

Sorry, I mixed up the two. I found cursor undo/redo in the keybindings menu, and thought it was that. It is like a much more toned-down version of Navigation. It only changes your cursor position, and skips to the beginning of the file if the "history stack" is empty.

Navigation is so much better!, as it navigates between files, and works at all times, not just when an editor is focused.

My VS Code keybindings for Navigation:

  • workbench.action.navigateBack: Alt + LeftArrow (default)
  • workbench.action.navigateForward: Alt + RightArrow (default)
  • workbench.action.navigateToLastEditLocation: Alt + K (default was Ctrl + K, Ctrl + Q)
Thread Thread
 
leob profile image
leob

Ah nice, I didn't know about the other one, but yeah "navigation" is indeed brilliant because it also navigates backwards/forwards across files ...

Thread Thread
 
darrylnoakes profile image
Darryl Noakes • Edited

left and right would have been more logical, but somehow that didn't work

Ctrl + LeftArrow/RightArrow don't work because they are Windows keyboard controls (also in pretty much all OSes). They navigate to the left and right of words.
For example (| represents cursor):
"I am some tex|t." => LeftArrow => "I am some |text."
"I am| some text." => RightArrow => "I am some| text."

Thread Thread
 
leob profile image
leob

Yeah that's why I chose different key combos for nav prev/next :)