Rainbow CSV

Hand-editing CSV files can be tricky. When there are many fields in the dataset and their widths vary from record to record, it isn't always immediately obvious what any one particular value represents.

However, help is at hand for users of Microsoft's impressive Visual Studio Code editor, in the form of the Rainbow CSV extension. Simply install this and, the next time you open a CSV file, you'll be greeted by something much more colourful.


A CSV file rendered by VSCode's Rainbow CSV extension

Colour-coding of the fields makes it much easier to distinguish the columns of data. Very handy!

As a bonus, the extension also provides a 'CSV linting' feature, which checks whether each record has the same number of fields defined. Green indicates that the file is OK, red that there is a problem.


CSV linter status in VSCode

I hasten to add that it isn't perfect. I've found that the results seem to depend somewhat on your choice of colour theme. With some more muted themes it is even possible for adjacent fields to be coloured the same. On balance, though, it's still an improvement on monochrome. If you're a VSCode user and work with CSV files, why not give it a try?


Comments powered by Disqus