问题
Is there any human-editable configuration file that Visual Studio uses for its key bindings? The Options->Environment->Keyboard dialog is so completely broken (or at least much too tedious to use) and has been since Visual C++ 5 that I really just want to go to the configuration file the Visual Studio is saving the keybindings to and edit that directly.
Ideas?
回答1:
Not the most ideal format, but there is the currentsettings.vssettings file located in your profile. There is a section that looks something like this
<UserShortcuts>
<RemoveShortcut Command="Edit.LineOpenAbove" Scope="Text Editor">Ctrl+Enter</RemoveShortcut>
...
<Shortcut Command="Refactor.Rename" Scope="Text Editor">F2</Shortcut>
...
</UserShortcuts>
Once you have a list of all the commands your might be interested in, it should be fairly easy to edit your default keyboard settings in the file. Under the Tools menu is an option to import/export settings from a vssettings file.
来源:https://stackoverflow.com/questions/13503447/visual-studio-key-bindings-configuration-file