DEV Community

Discussion on: 4 Spaces or 2?

Collapse
 
nektro profile image
Meghan (she/her)

vs code can auto format an entire file to use the number of spaces one desires, and always uses spaces

Thread Thread
 
avalander profile image
Avalander

Yeah but at my work we use two spaces, can I configure vscode to display four spaces but actually save the file with two?

Thread Thread
 
nektro profile image
Meghan (she/her)

not that I'm aware of. you'd just have to change it before you commit

Thread Thread
 
mortoray profile image
edA‑qa mort‑ora‑y

Auto-formatting causes trouble with source control. You end up having large patch-sets than desired. It can be hard to locate what was actually changed in a file.