Code Reformatting

One thing I’ve always found annoying is the way that different applications and operating systems handle tabs. In some programs a tab will move you over 4 spaces. Other apps will have different sizes, like 5 or 6 spaces. This can cause things that line up in one app to look totally out of whack on another.

When editing code this can be very annoying, especially if you check things by seeing whether braces line up and visually analyzing code flow.

Just yesterday I discovered some neat tools in Microsoft Visual Studio that I had never known about. They are edit->advanced->untabify and edit->advanced->format. What that does is convert all the tabs in a file to spaces and then reformat it according to the Visual Studio automatic formatting rules, which are perfectly aligned with my personal preferences. Because all the tabs are now spaces the file will look the same in any editor.

Editing code just got a whole lot less annoying.