Is there an 'Open Folder…' keyboard shortcut in VS Code?

江枫思渺然 提交于 2019-12-08 16:41:34

问题


I don't see a keyboard shortcut for "Open Folder..." listed on the documentation page below, and after searching elsewhere for a while I didn't see anything else.

https://code.visualstudio.com/docs/customization/keybindings

I thought I would ask here before putting an issue on GitHub about it. (Also there doesn't seem to be a open / closed issue about this anywhere on the GitHub repo.)

https://github.com/Microsoft/vscode/issues


回答1:


There is indeed a shortcut for it, the command is workbench.action.files.openFolder, and the default keybinding is Ctrl+K,Ctrl+O.

It's easy to find in the list of shortcuts (File → Preferences → Keyboard Shortcuts) if you search for "folder" or "openFolder" in the Default Keybindings.




回答2:


Hit Cmd+O on macOS or Ctrl+O on Windows/Linux to activate the open dialog, select a folder, and click "Open."

Note: This answer was written before multiple folder workspaces were implemented in VS Code. If you open folders this way, it will replace your entire workspace with the folder you selected to open. If you want to add a folder to your existing workspace, you must use Cmd+K, Cmd+O on a macOS or Ctrl+K, Ctrl+O on Windows/Linux.



来源:https://stackoverflow.com/questions/42180953/is-there-an-open-folder-keyboard-shortcut-in-vs-code

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!