ryu1kn / vscode-text-marker

Visual Studio Code Extension. Select text in your code and mark all matches. The marking colour is configurable
https://marketplace.visualstudio.com/items?itemName=ryu1kn.text-marker
MIT License
87 stars 17 forks source link

Feature request: textmarker.savedHighlights[].pattern.expression to be an array #49

Open ioandev opened 4 years ago

ioandev commented 4 years ago

Hi,

Great extension. I am using it to navigate my code easier. Such that I have a few of the same pattern object with just the expression being different. Could it be made an array optionally?

[
    {
        "pattern": {
            "type": "string",
            "expression": "script>",
            "ignoreCase": false,
            "wholeMatch": false
        },
        "color": "darkmagenta"
    },
    {
        "pattern": {
            "type": "string",
            "expression": "<style",
            "ignoreCase": false,
            "wholeMatch": false
        },
        "color": "darkmagenta"
    },
    {
        "pattern": {
            "type": "string",
            "expression": "</style",
            "ignoreCase": false,
            "wholeMatch": false
        },
        "color": "darkmagenta"
    },
    {
        "pattern": {
            "type": "string",
            "expression": "<template>",
            "ignoreCase": false,
            "wholeMatch": false
        },
        "color": "darkmagenta"
    },
    {
        "pattern": {
            "type": "string",
            "expression": "\n</template>",
            "ignoreCase": false,
            "wholeMatch": false
        },
        "color": "darkmagenta"
    },
    {
        "pattern": {
            "type": "string",
            "expression": " it(\"",
            "ignoreCase": false,
            "wholeMatch": false
        },
        "color": "darkmagenta"
    },
    {
        "pattern": {
            "type": "string",
            "expression": " it('",
            "ignoreCase": false,
            "wholeMatch": false
        },
        "color": "darkmagenta"
    },
    {
        "pattern": {
            "type": "string",
            "expression": " describe(\"",
            "ignoreCase": false,
            "wholeMatch": false
        },
        "color": "darkmagenta"
    },
    {
        "pattern": {
            "type": "string",
            "expression": " describe('",
            "ignoreCase": false,
            "wholeMatch": false
        },
        "color": "darkmagenta"
    },
]

would be:

[
    {
        "pattern": {
            "type": "string",
            "expression": ["script>", "<style", "</style", "<template>", "\n</template>", " it(\"", " it('", " describe(\"", " describe('"]
            "ignoreCase": false,
            "wholeMatch": false
        },
        "color": "darkmagenta"
    }
]

Ioan