5

Is there an easy way to align the shortcut key mappings from Visual Studio with Visual Studio Code?

Example

Visual Studio auto-format document

CTRL + K + D

Visual Studio Code auto-format document

CTRL + SHIFT + F I want to replace this with the above shortcut.

Matthew Layton
  • 39,871
  • 52
  • 185
  • 313
  • 1
    [This](http://stackoverflow.com/a/33791170/492258) may help – asdf_enel_hak Mar 03 '17 at 10:23
  • @moguzalp do you know if there are any JSON configs anywhere online that already have all of the mappings? – Matthew Layton Mar 03 '17 at 10:24
  • Or you can export your shortcuts with [this extention](https://github.com/madskristensen/ShortcutExporter) and convert json then apply to target – asdf_enel_hak Mar 03 '17 at 10:46
  • 2
    I want to do the opposite: use VSCode keys in VS, but no luck :/ – d.popov May 19 '20 at 12:39
  • 1
    @d.popov I have the same problem, I've been lookin for this for at least two yeas but apparently nobody else cares about this.. Default VS keybindings are terrible if you are used to vscode ones – Ares9323 Oct 04 '20 at 03:48

2 Answers2

8

There is a Visual Studio Code extension called Visual Studio Keymap.

I haven't tried it myself but the example you gave is listed in the description.

Here is a link to it: https://marketplace.visualstudio.com/items?itemName=ms-vscode.vs-keybindings

Félix Caron
  • 771
  • 6
  • 11
0

The code formatting is available in Visual Studio Code through the following shortcuts:

  1. On Windows Shift + Alt + F.
  2. On Mac Shift + Option + F.
  3. On Ubuntu Ctrl + Shift + I.
Usman Ali Maan
  • 368
  • 2
  • 12