Optimizing VS Code for Angular
Saving files all the time can get tedious. You can enable automatic saving by doing the following:
- Open VS Code
- Toggle the setting under
File
|Auto Save
You can further customize many aspects of VS Code's behavior by launching Preferences
. The keyboard shortcut to launch Preferences
is Ctrl + , on Windows and ⌘ + ,on macOS.
IDE settings
You can share such settings with your coworkers by creating a .vscode
folder in the root of your project directory and placing a settings.json
file in it. If you commit this file to the repository, everyone will share the same IDE experience. Unfortunately, individuals aren't able to override these settings with their own local preferences, so ensure that shared settings are minimal and are agreed upon as a team norm.
Here are the customizations that I use for an optimal, battery-life conscious Angular development experience:
.vscode/settings.json
{
"editor.tabSize": 2,
"editor.rulers": [90, 140],
"files.trimTrailingWhitespace...