0

I'm looking for a short-cut. Is there anything useful for the scenario when you're in a file, and you need to go back and forth between two spots while editing?

i find myself doing this a lot and scroll is tedious, as is remembering line numbers.

ron pastore
  • 270
  • 2
  • 6
  • Could [this work (opening the same file twice side-by-side)?](https://stackoverflow.com/questions/48674275/how-do-i-open-the-same-file-side-by-side-in-a-single-visual-studio-code-session) – Mihai Chelaru Oct 18 '18 at 14:00
  • it could but that too seems like effort, or at least a lot of open files. looking for something simple like "cd -" shortcut in the shell to bounce back to the last directory you were in. – ron pastore Oct 19 '18 at 16:03
  • 1
    It sounds like what you need are bookmarks, such as https://marketplace.visualstudio.com/items?itemName=alefragnani.numbered-bookmarks or https://marketplace.visualstudio.com/items?itemName=alefragnani.Bookmarks still futzy but once you get the hang of it it is handy. There is no built-in list of recent edits that can be traversed by command other than going to last edit. But that isn't what you need. – Mark Oct 22 '18 at 06:15
  • ah yes! numbered book marks should do the trick. thank you! – ron pastore Oct 23 '18 at 13:03

1 Answers1

0

Alt + <Left Click> sets the cursor to several locations, so you can edit multiple lines at the same time.

You could also use split view to look at two locations of the same file (Ctrl+^)

Markus Dresch
  • 5,290
  • 3
  • 20
  • 40