Software Development

A journal for sharing all things software development related

Tabs .vs spaces

Tue, 17 Dec 2019 14:14 UTC by garethbrown


Use .editorconfig extension and then create .editorconfig file in project root with

root = true

charset = utf-8
indent_style = space
indent_size = 4
end_of_line = lf

So you can create .editorconfig for separate folders or setup by file extension (just remove that root = true to allow merging config from parent folder)

this will override your editor config / any modern IDE settings and then, AUTO-REFORMAT CODE :) (Ctrl+Shift+P and search for Format document)

it will reformat your code and replace tabs -> spaces or what you will setup

it is not automatic, i know ... just assign key shortcut for code reformat


Displaying in Visual Studio

You can display or hide whitespace characters in VS with the following keyboard shortcut

	C-r, C-w

The information on this site is provided “AS IS” and without warranties of any kind either
express or implied. To the fullest extent permissible pursuant to applicable laws, the author disclaims all warranties, express or implied, including, but not limited to, implied warranties of merchantability, non-infringement and suitability for a particular purpose.

UI block loader
One moment please ...