Make Visual Studio use VS code shortcut keys / key bindings

孤街浪徒 提交于 2020-07-19 04:54:27

问题


I've been using VSCode a lot lately and have gotten used to the keys-shortcuts/key-bindings (Ctrl+D, Ctrl+P, Alt+leftArrow, etc). However I've recently had some work where I needed to use regular Visual Studio (Microsoft Visual Studio Enterprise 2019) and it's painful remembering two different shortcut keys.

Is there a way to import VSCode key-shortcuts to into regular Visual Studio?

I've looked at this question and there wasn't much help besides manually changing them one at a time.

UPDATE: now the above post answers the question now that I posed Francois du Plessis's answer there.


回答1:


If you go to Tools -> Options -> Environment -> Keyboard. There sould be an option to select Visual Studio Code as a Keyboard mapping scheme




回答2:


You can create your own settings file based on an existing Visual Studio file. Simply add your settings to it from VSCode keybinding setting file.

VSCode's keybinding settings is stored in keybindings.json json-formated file. open file in menu File->Preferences->Keyboard Shortcuts or on Windows file path like that C:\Users\<user name>\AppData\Roaming\Code\..\keybindings.json

Visual Studio's keybinding settings is stored in CurrentSettings.vssettings xml-formated file. on VS menu: Tools->Import and Export Settings then select 'Import select environment setting' radiobutton and click 'Next' you'll see browser for import your file. on Windows file path like that C:\Users\<user name>\Documents\Visual Studio 2019\Settings\



来源:https://stackoverflow.com/questions/62050877/make-visual-studio-use-vs-code-shortcut-keys-key-bindings

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