rsbondi / highlight-words

vscode extension to highlight all occurrences of words or expression
MIT License
53 stars 78 forks source link
highlighting vscode-extension

highlight-words

screencast

This extension is adapted from the sample VS code extension decorator-sample, inspired by atom-quick-highlight.

It creates a decoration for each selected word that appears in all editors.

Usage

Configuration

The following options can be configured

highlightwords.colors: this is an array of light/dark pairs for respective theme types, you can have as few or as many as you like

highlightwords.box: show highlights as a box around the selections if true, set highlight as background color if false

highlightwords.defaultMode: the initial mode when initialized. 0=default, 1=whole word, 2=ignore case, 3=whole word and ignore case

highlightwords.showSidebar provides a view in the explorer window for searching, changing options and removing highlights

defaults shown below

"highlightwords.colors": [
    { "light": "#b3d9ff", "dark": "cyan" },
    { "light": "#e6ffb3", "dark": "pink" },
    { "light": "#b3b3ff", "dark": "lightgreen" },
    { "light": "#ffd9b3", "dark": "magenta" },
    { "light": "#ffb3ff", "dark": "cornflowerblue" },
    { "light": "#b3ffb3", "dark": "orange" },
    { "light": "#ffff80", "dark": "green" },
    { "light": "#d1e0e0", "dark": "red" }                                        
    ...
],
"highlightwords.box": {
    "light": false,
    "dark": true
},
"highlightwords.defaultMode": {
    "default": 0
}

"highlightwords.showSidebar": {
    "default": true
}