Multi-Highlight for VS Code
Multi-Highlight is a Visual Studio Code extension for highlighting multiple
words with different and customisable colours. It's designed to help keep track
of multiple variables while auditing or understanding code.
Install through the Visual Studio Code Marketplace:
See the following screenshot in which I've highlighted three different words to
help clarify their use in the function being analysed:
Multi-Highlight adds the following commands to the command palette:
- Multi-Highlight: Add Highlight
- Multi-Highlight: Remove Highlight
- Multi-Highlight: Clear Highlights
- Multi-Highlight: Fresh Highlight
Add and Remove operate on the word currently under the cursor.
To configure the highlight colours, edit the
This is a comma-separated list of background/foreground pairs.
The default list of colours is:
Colours can be specified by name or using HTML syntax:
Multi-Highlight doesn't come with default key bindings, but I personally use the
following in my
VSCodeVim to mimic
"before": ["g", "<cr>"],
"before": ["g", "<bs>"],
"before": ["g", "<C-l>"],
"before": ["g", "<space>"],
- Thanks to vim-highlighter for
the inspiration. I use this a lot in vim.
- Thanks to DALL-E 3 for generating the icon/logo.