Visual Studio Code Extensions

I switched to Visual Studio Code for my text editing needs a while ago. While not perfect (still no darn CR support), I find it working well for me. However, considering it has a really nice extension model, it would be shame not to improve it a bit. So I made a few extensions of my own.

Render Line Endings

One thing I missed the most was to see line endings. Call it a habit from old python days or call it the craziness, but I often work with all whitespaces shown. And VSCode has a beautiful support for showing whitespaces within the line. But somehow, it won't show line endings which are whitespace characters too in my book.

Idea of this extension is to work in tandem with the default rendering of whitespace characters and simply add the appropriate character at the end. Now, due to some design decisions in VSCode, extension will never be perfect. For example, VSCode normalizes the file upon loading to use only a single line ending. By the time my extension gets a stab at parsing, the original line ending is already gone. Even worse, CR line ending is still not supported and ticket is going nowhere.

That said, in 95% of cases, one is only dealing with a single line ending anyhow and extension can not only show it but it can also highlight errors (e.g. non-default line ending; i.e. CRLF when LF is expected) or extra trailing whitespaces.

It wasn't the first extension of this type and it probably won't be the last one. But it is (currently) the most popular and I've gone through a lot of efforts to make it the fastest too. Yes, it might be the same speed (or maybe even a bit slower) on small files but if you load a big file, all changes. My extension is pretty much the only line ending highlighter that doesn't load the whole darn file in one go but does its work incrementally.

Unicode Code Point

When working with international data, I sometime need to know what character I am exactly looking at. Is it Ohm or is it Omega? To get an answer to this and many other Unicode naming questions, I present you this extension.

It's not the most popular one nor it's the most capable one (e.g. you cannot use it to insert Unicode). However, it does what name says, it supports many character combinations other extensions ignore (skin codes, for example), and it supports the latest Unicode 15 draft.

As an interesting tidbit, it's probably the only status bar extension that also supports double-click - something that VSCode actually is not officially exposing to extensions.

Highlight IP

This is yet another one that solves a problem for me and pretty much only me. At work I quite often end up going over configuration files with IP addresses intermingled with other text. Whether it's YAML, JSON, or just a text file, I like those IP addresses to pop out.

This extension is going to do exactly that, it will find and highlight IP addresses or subnet definitions wherever in text file they might be. As bonus, it will also check validity of each subnet and highlight as error those that are a bit "wonky", e.g. 192.168.1.1/24.

This extension will happily churn IPs in background and make you forget its even there.

Color Me Error

The only task of this extension is to highlight any instance of TODO, FIXME, or any other configured word as an error. Reason for this is that I like to have my eyes drawn to such text in my code but I don't necessarily want to have it in "Problems" tab where every other similar extension likes to place it.

If you really need to track those pesky TODOs, this extension is not for you. This extension is for those who like to have them highlighted but don't like to be reminded about them too much.

Hourly Beep

I like to be reminded about start of an hour. Be it a coocoo clock, my Casio watch, or this extension. Its only function is to beep upon start of each hour.

Leave a Reply

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