Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for syntax highlighting #6297

Open
42wim opened this issue Jun 1, 2020 · 10 comments
Open

Add support for syntax highlighting #6297

42wim opened this issue Jun 1, 2020 · 10 comments
Labels
Area-Extensibility A feature that would ideally be fulfilled by us having an extension model. Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Product-Terminal The new Windows Terminal.
Milestone

Comments

@42wim
Copy link

42wim commented Jun 1, 2020

Description of the new feature/enhancement

Add support for syntax highlighting specific words like MobaXterm has:

image

This makes finding errors/issues much easier and it's something that I immediately miss when using terminal :-)

@42wim 42wim added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Jun 1, 2020
@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Jun 1, 2020
@DHowett
Copy link
Member

DHowett commented Jun 2, 2020

This'll make a nice extension in the future. It's adjacent to search v2, but different enough that it warrants a separate explanation.

@DHowett DHowett added Area-Extensibility A feature that would ideally be fulfilled by us having an extension model. Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Product-Terminal The new Windows Terminal. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Jun 2, 2020
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Jun 2, 2020
@DHowett
Copy link
Member

DHowett commented Jun 2, 2020

Link: #4000

@zhaone
Copy link

zhaone commented Feb 25, 2023

Is there any update about this feature? I still can not find any config that enable custom keywords highlight.

@kolbasky
Copy link

kolbasky commented Apr 6, 2023

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.

@zadjii-msft
Copy link
Member

@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.

@zhaone
Copy link

zhaone commented May 30, 2023

@kolbasky can't agree more. I'll give up moba if this feature was developed.

@StrangePeanut
Copy link

Following. Currently using an overpriced paid alternative but would drop it in a heartbeat if this feature were introduced in Windows Terminal.

@zadjii-msft
Copy link
Member

@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" 😉 )

@StrangePeanut
Copy link

@zadjii-msft Oh wow that's brilliant, thanks! This would fully cover my use case actually.

@MagikEh
Copy link

MagikEh commented Jul 31, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Extensibility A feature that would ideally be fulfilled by us having an extension model. Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

7 participants