Open Otiel opened 6 years ago
Hi @Otiel , thanks for the suggestion. I'm curious to know why you want this option: i.e. when do you want to highlight patterns only in the current file?
This is how I usually use TextMarker:
But at the same time, I have several other tabs opened in vscode, that have nothing to do with my log file. Thus I don't want to see highlights on those tabs.
Hope that makes sense.
I see... but this could be a bit tricky. We need to make whether highlight rules are applied to the current tabs super noticeable; otherwise users may get confused if there are actually no matches or just not enabled.
Maybe for now, you can get around with opening up a separate editor window for the log? It should work until we do #10 ...
Yes indeed. Apart from adding an indicator on the status bar, I'm not sure how you could display the difference.
I was imagining that you could scope the textmarker highlights to specific file types. This would be easiest for me, because I could simply add my highlight twice if necessary.
@colelawrence That’s an interesting idea 💡 We can introduce a config that allows you to limit the scope of highlight, like textmarker.limitHighlightToSameFiletype
@ryu1kn, yes. Then you might have a command: TextMarker: Toggle Filetype Limitation
, but in the config:
{
"textmarker.savedHighlights": [
{
"pattern": {
"type": "string",
"expression": "Printf",
"ignoreCase": false,
"wholeMatch": false,
"filetypes": [
"go",
"typescript",
"typescriptreact"
]
}
}
]
}
Could we have an option to apply highlights to the current file only?