Giter Club home page Giter Club logo

Comments (8)

CWempe avatar CWempe commented on May 24, 2024 1

Like @kellerza wrote, this is an enhancement request which is not fulfilled or denied, yet.

But the workaround to highlight keywords as links could be moved to a wiki.

from kitty.

kellerza avatar kellerza commented on May 24, 2024 1

Indeed @CWempe my idea was multiple RegExes with individual results. Look at this screencast to see it in action.

Limited colors is not an issue, just basic ANSI colors should be ok. Even if this is only configurable in config files it will be acceptable.

Maybe 8 regexes? Will probably have to see when this has a performance hit.

from kitty.

kellerza avatar kellerza commented on May 24, 2024 1

No worries, I've been using labctl color to do the highlighting.

It works nicely with most terminals: Kitty / Windows Terminal / inside VSCode

from kitty.

lars18th avatar lars18th commented on May 24, 2024

Hi @cyd01 ,

I suggest to copy/move/link this in the Wiki and close this issue.

What you think?

from kitty.

CWempe avatar CWempe commented on May 24, 2024

Here is a suggestion:

Another way to implement this "Poor man's syntax highlighting" could be to have multiple RegEx fields with individual options/font settings.

Example:

field name user defined Value
RegEx 1 (((((https?|ftp|svn)://)|www.)(([0-9]+.[0-9]+.[0-9]+.[0-9]+)|localhost|([a-zA-Z0-9-]+.)[a-zA-Z0-9-]+.(com|net|org|info|biz|int|gov|name|edu|[a-zA-Z][a-zA-Z]))(:[0-9]+)?((/|?)[^ "][^ ,;\.:">)])?)|(mailto://[a-zA-Z0-9-.]+@[a-zA-Z0-9-.]+.[a-z]{2,}))
font settings 1 underlined, clickable
RegEx 2 (up|enabled)
font settings 2 green, underlined
RegEx 3 (down|disabled)
font settings 3 red, bold
RegEx 4 (notconnected|([0-9]{1,3}.){3}[0-9]{1,3})
font settings 4 bright cyan
RegEx 5 (down|disabled)
font settings 5 white, red background

So I would think these options/font settings would make sense:

What I personally do not need (to reduce the effort for the developer):

  • 256 colors
  • color picker or checkboxes for font style
    The user can just type the name of the colors and styles (e.g. `red, bold,

If Kitty had this feature it would make managing my switches and routers much more comfortable. 🤩

What do others think?
Would you need more or less options?
How many RegEx fields would be best?

from kitty.

lars18th avatar lars18th commented on May 24, 2024

Hi @CWempe ,

What do others think?

I think it's an interesting idea.

from kitty.

CWempe avatar CWempe commented on May 24, 2024

@cyd01
Any thoughts from your side?

Do you think this would be possible to implement?

Limited colors is not an issue, just basic ANSI colors should be ok. Even if this is only configurable in config files it will be acceptable.

Maybe it would make sense to link the RegExes to the colors defined under Window > Colours instead of custom colors for each RegEx.

image

This would make it compatible with putty color schemes.

But I would be happy either way.

from kitty.

cyd01 avatar cyd01 commented on May 24, 2024

Issue closed due to inactivity

from kitty.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.