zsh-users
 help / color / mirror / code / Atom feed
From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
To: Ray Andrews <rayandrews@eastlink.ca>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: Fast-Syntax-Highlighting demo
Date: Sat, 4 Aug 2018 16:13:29 +0200	[thread overview]
Message-ID: <CAKc7PVAXFivMtwT=9W5ykwLjVSFeu8eiNevCf711TqfSH95epQ@mail.gmail.com> (raw)
In-Reply-To: <9f891a0c-5f36-a5ab-2902-8e2f5e929901@eastlink.ca>

On Sat, 4 Aug 2018 at 15:43, Ray Andrews <rayandrews@eastlink.ca> 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


  reply	other threads:[~2018-08-04 14:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-04  6:45 Sebastian Gniazdowski
2018-08-04 13:12 ` Ray Andrews
2018-08-04 14:13   ` Sebastian Gniazdowski [this message]
2018-08-04 14:27     ` Ray Andrews
2018-08-04 15:01     ` David Klann
2018-08-04 15:15       ` Sebastian Gniazdowski
2018-08-04 15:03 ` Vadim A. Misbakh-Soloviov
2018-08-04 16:34   ` Sebastian Gniazdowski
2018-08-04 16:01 ` Vadim A. Misbakh-Soloviov
2018-08-04 16:38   ` Sebastian Gniazdowski
2018-08-04 16:44   ` Daniel Shahaf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKc7PVAXFivMtwT=9W5ykwLjVSFeu8eiNevCf711TqfSH95epQ@mail.gmail.com' \
    --to=sgniazdowski@gmail.com \
    --cc=rayandrews@eastlink.ca \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).