Keyboard shortcut to move cursor to last edit position in Visual Studio

后端 未结 10 2327
星月不相逢
星月不相逢 2021-02-12 11:01

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

相关标签:
10条回答
  • 2021-02-12 11:52

    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

    0 讨论(0)
  • 2021-02-12 11:52

    This shortcut was added in VS2017 version 15.8:

    Ctrl + Shift + Backspace

    It's near impossible to find via google, I just stumbled across it when reading the VS news and release notes.

    Go To Last Edited Location

    We all know the feeling of starting to write a feature and then realizing we need some more information from elsewhere in the solution. So, we open another file from Solution Explorer or Go to Definition in a few places and suddenly, we’re far off from where we started with no easy way back unless you remember the name of file you were working in originally. In Visual Studio 2017 version 15.8, you can now go back to your last edited location via Edit > Go To > Go To Last Edit Location (Ctrl + Shift + Backspace).

    https://blogs.msdn.microsoft.com/visualstudio/2018/08/30/improving-your-productivity-in-the-visual-studio-editor/

    0 讨论(0)
  • 2021-02-12 11:54

    Found a pending feature request here:

    http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/4987860-feature-request-for-jumping-back-to-the-last-chang

    0 讨论(0)
  • 2021-02-12 11:55

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

    0 讨论(0)
  • 2021-02-12 11:55

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

    0 讨论(0)
  • 2021-02-12 11:58

    I always use Ctrl+Shift+Backspace.

    0 讨论(0)
提交回复
热议问题