Open 42wim opened 4 years ago
This'll make a nice extension in the future. It's adjacent to search v2, but different enough that it warrants a separate explanation.
Link: #4000
Is there any update about this feature? I still can not find any config that enable custom keywords highlight.
I can double that. The only reason i still use moba is because of syntax highlight. In iTerm2 on mac it can be achieved with "highlight trigger", which accepts regex and colors. Maybe it would be a good start - no built-in syntax highlighting for different languages, but give users means to set up their own regexes.
@kolbasky FWIW I'm tracking "do something on a regex" over in #5916. I'm not sure that would scale to the scope of this issue - the OP looks like it'd have a lot of different matches, and terminal-side recoloring is Hard. But it's along the same vein.
@kolbasky can't agree more. I'll give up moba if this feature was developed.
Following. Currently using an overpriced paid alternative but would drop it in a heartbeat if this feature were introduced in Windows Terminal.
@StrangePeanut So, I've kinda got a spec for "regex matching + colorize the matched text" over in #15700. Would something like:
"triggers":[
{
"match": "[Ee][Rr][Rr][Oo][Rr]",
"action": "experimental.colorSelection",
"foreground": "#ff0000"
},
]
work for your use case? (just trying to figure out how exactly you're using the "overpriced alternative" 😉 )
@zadjii-msft Oh wow that's brilliant, thanks! This would fully cover my use case actually.
This is exactly what I've been hoping to have, an effectively client side grcat, a program that takes stdout, runs it through a regex filter and colourizes output.
:+1: for this feature. There are various tools to do this for individual command output, but nothing I can see that can do it for the entire interactive session without messing up how stdin/out/err and control sequences work.
Perhaps use the TextMate language specification for highlighting rules (*.tmLanguage)? This is widely supported in text/code editors, including VS Code, and has a large library of rules already.
any update?
Description of the new feature/enhancement
Add support for syntax highlighting specific words like MobaXterm has:
This makes finding errors/issues much easier and it's something that I immediately miss when using terminal :-)