以下の内容はhttps://en.bioerrorlog.work/entry/vscode-back-f12より取得しました。


Going Back to Previous Location After F12 (Go to Definition) in VSCode

A quick note on how to return to your original cursor position after jumping to a code definition with F12 (Go to Definition) in VSCode.

Introduction

F12 (Go to Definition) in VSCode is useful when reading through code.

However, I couldn't immediately figure out the shortcut to go back to where my cursor was before the jump, so I'm jotting this down for future reference.

Note: This article was translated from my original post.

Shortcut to Go Back in VSCode

The default shortcuts for each OS are as follows:

OS Shortcut
mac Ctrl -
win Alt ←
linux Ctrl Alt -


You can find this documented in the official VSCode docs here:

Keyboard shortcuts for Visual Studio Code

The Go Back shortcut. "^" represents Ctrl on mac.

You can also assign a custom shortcut using the command ID workbench.action.navigateBack.

Conclusion

That's a quick note on how to go back to your previous location after using F12 in VSCode.

Hope this helps someone out there!

[Related Articles]

en.bioerrorlog.work

References




以上の内容はhttps://en.bioerrorlog.work/entry/vscode-back-f12より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14