Keyboard shortcut to move cursor to last edit posi

2020-06-07 06:51发布

In Visual Studio, is there a keyboard shortcut to navigate (move cursor) to the last edited position (like PyCharm's Ctrl+Shift+Backspace)?

The CTRL + - shourtcut moves to the last position (not the last edited position), which is less useful for me.

10条回答
Rolldiameter
2楼-- · 2020-06-07 07:08

In my VS I can use CTRL + -. I am not sure if this Works in all Versions and With different keyboard layout.

查看更多
Animai°情兽
3楼-- · 2020-06-07 07:11

I always use Ctrl+Shift+Backspace.

查看更多
贼婆χ
4楼-- · 2020-06-07 07:13

Many of the answers mention VisualStudio 2017 or a plugin to VisualStudio 2015.

I found the following shortcuts in VisualStudio 2015.

View.NavigateBackward
View.ForwardBackward

Map nicely to pycharm's

Last Edit Location
Next Edit Location
查看更多
迷人小祖宗
6楼-- · 2020-06-07 07:15

Additionally you can use Ctrl + Shift + - (View.NavigateForward) shortcut.

查看更多
在下西门庆
7楼-- · 2020-06-07 07:18

There is a free extension for Visual Studio 2015, 2017, 2019 that includes it : Hot Commands

Edit.GoToLastEditLocation

Takes the caret back to the last place an edit occurred during that session.

The default Keyboard shortcut is : Ctrl + Shift + Backspace

This can be changed any time under Tools - Options - Environment - Keyboard - Edit.GoToLastEditLocation

Edit: Extension now also support VS2019

查看更多
登录 后发表回答