Michael's Musings

Ramblings about tech, sustainability, and developing software

My Favorite Settings in VSCodium

Here are a few of my favorite settings in VSCodium that I cannot live without. These settings are the first thing I configure when I setup VSCodium or VSCode.

What is VSCodium?

Microsoft's VSCode is one of the most popular text editors used by software developers. VSCodium is created from the open source binaries provided by Microsoft that removes all the tracking and telemetry, which leaves a lightweight and highly extensible text editor.

Insert Final Newline

This setting adds a final new line to a file when you save. The POSIX standard defines a line of a file as a sequence of zero or more non-newline characters plus a terminating newline character. Without this newline character at the end of a file, some programs won't read the last line of your file properly. This can cause all sorts of issues.

I write a lot of SQL files, and to debug them I typically use the cat command to concatenate several SQL files together into one big file. If the files don't end with a newline file, then it will produce syntax errors that I have to manually fix in the final output. When making a GitHub pull request, the files changed will leave an annoying message notifying you there is a newline missing at the end of your file.

Trim Final Newlines

This setting will clean up any additional empty newlines at the end of your file when you save. Combined with the Insert Final Newline setting will ensure that you only have a single newline character at the end of your file. This mostly just reduces clutter and doesn't have any practical benefits besides keeping your files neat and tidy.

Trim Trailing Whitespace

You can probably tell by now I have a problem dealing with whitespace. This setting removes whitespace characters like spaces and tabs at the end of files when you save. It can be annoying to begin modifying a line and realize there's a few spaces at the end for no reason. I like to keep my files nice and clean, so this setting is always on.

Render Whitespace: all

Is that blank space several space characters, or is that a tab character? You will have a hard time discerning between the two unless you configure this setting. With this setting set to all, spaces will show up as a dim dot character, whereas tabs will display as a faint arrow character. You can count the dots to see how many spaces are in an indention and can make indention errors easier to spot.

Git Blame Editor Decoration: Enabled

I previously installed an entire extension for this, but realized the only feature I used was to show the git blame and history in the editor. With this setting enabled I removed my dependency on a third party tool to show the most recent commit message on the end of a line. Seeing the most recent commit message on a line while editing provides helpful context around why the line of code is there in the first place.