Essential Configurations for Visual Studio Code (VSC)


I find the below basic settings very useful and hope it will be useful for you too to keep your code nice and tidy.

1. Insert Final Newline

It is recommended to add an empty line at the end of the file as some old tools might misbehave without it and also it helps clean code changes in git when you add something at the bottom.

Text Editor FilesInsert Final Newline =

2. Trim Trailing Whitespace

Code with trailing whitespaces doesn’t look nice especially when you review codes and removing them automatically before you commit will keep the code tidy and make your peers happy.

Text EditorFilesTrim Trailing Whitespace =

3. Auto Format Code on Save

Auto formatting code is a helpful feature to keep the code in the proper structure, indentation, etc… to do that.

Text Editor → Formatting → Format On Save = ☑


Leave a Reply

Your email address will not be published. Required fields are marked *