How to navigate back to the last cursor position in Visual Studio Code?

前端 未结 10 2033
梦如初夏
梦如初夏 2020-11-30 15:50

What is the keyboard shortcut navigate back to the last cursor position in Visual Studio Code?

10条回答
  •  眼角桃花
    2020-11-30 16:44

    With VSCode 1.43 (Q1 2020), those Alt+ / Alt+, or Ctrl+- / Ctrl+Shift+- will also... preserve selection.

    See issue 89699:

    Benjamin Pasero (bpasero) adds:

    going back/forward restores selections as they were.

    Note that in order to get a history entry there needs to be at least 10 lines between the positions to consider the entry as new entry.

提交回复
热议问题