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!
I want to indent a specific section of code in Visual Studio Code: Select the lines you want to indent, and. use Ctrl + ] to indent them.
“how to indent multiple lines in vscode” Code Answer's you can also indent a whole section by selecting it and clicking TAB. and also indent backward using Shift + TAB.
You can use ⌘⌥L (macOS), or Ctrl+Alt+L (Windows/Linux) to reformat a selection of code according to your reformat settings. You can also display the Reformat File dialog with ⌥⇧⌘L (macOS), or Ctrl+Alt+Shift+L (Windows/Linux).
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With