macosindentationauto-indentvisual-studio-code

Indent/format code in Visual Studio code on MAC


i'm trying to indent my code in visual studio code. I searched and i found that ctrl + F + K should be work, but it doesn't. I tried cmd + k + f too, but it still not working. I hope you can help me!


Solution

  • Updated December 21, 2017: as pointed out by Fabio, on mac it should be: āŒ˜ + ]

    On Windows: indent control is ctrl + ]

    A good way to find commands is by navigating to: Code -> Preferences -> Keyboard Shortcuts

    Also, the Visual Studio Code team provided those handy shortcut pdfs:

    Another helpful command to achieve this might be: shift + option + f which is auto format.