Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Fast-Syntax-Highlighting demo



On Sat, 4 Aug 2018 at 15:43, Ray Andrews <rayandrews@xxxxxxxxxxx> wrote:
>
> On 03/08/18 11:45 PM, Sebastian Gniazdowski wrote:
> > Ideal brackets highlighting, resilient to quoting – note the sidx=...,
> > eidx=... lines:
> >
> > http://psprint.blinkenshell.org/theme.png
>
> That's pretty cool.  Are you saying you've got the shell colorizing
> itself?  Various editors do that of course.

Yes, brackets (three types: ( ), { }, [ ]) are detected, paired and
highlighted by the shell, by plugin zdharma/fast-syntax-highlighting.
Also, after pointing cursor at some bracket, its matched, paired
bracket is highlighted with blue background:

https://asciinema.org/a/194986

The point is that the code of the solution guarantees correct bracket
highlighting and pairing, no quoting can disturb it, so e.g.
constructing a pattern- or regex-hogs is much easier now, such string
will be divided into blocks delimited by ( ) and [ ] brackets ( { }
aren't used, at least by patterns, AFAIK).

-- 
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin



Messages sorted by: Reverse Date, Date, Thread, Author