MdTp
MdTp

Reputation: 377

Possible at all VScode ? option or extenstion to manually color markup words (non syntax)?

Abit of a longshot as this is more like a paint program or word/excel stuff and not really related to a programming language/struct syntax.

But is it possible at all to make either VScode do it or an extension to do it so i would be able to mark blocks of text and give them different background colors ?

Reason why i would like it is that i often have the need to be able to specify explanations etc where blocks of color would be a huge help for clarity.

If anyone have any ideas on how this could be done it would be awesome

enter image description here

Upvotes: 1

Views: 55

Answers (1)

Alex
Alex

Reputation: 67859

This extension: Highlight. Can be scoped to language (plaintext here .txt):

"highlight.regexes": {
    "(@note)(.+)": {
        "filterLanguageRegex": "plaintext",
        "decorations": [
            {
                "backgroundColor": "#a37acc",
                "color": "#fff"
            },
            {
                "backgroundColor": "#bd9fda",
            }
        ]
    },
    "(@important)(.+)": {
        "filterLanguageRegex": "plaintext",
        "decorations": [
            {
                "backgroundColor": "#ff3333",
                "color": "#fff"
            },
            {
                "backgroundColor": "#F07171"
            },


        ]
    },
},

You probably don't want to use plain words highlighting. Use something with a special sign before/after, like @.

@note useful to know
@important everything on fire

enter image description here

Upvotes: 1

Related Questions