* Fast-Syntax-Highlighting demo
@ 2018-08-04 6:45 Sebastian Gniazdowski
2018-08-04 13:12 ` Ray Andrews
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Sebastian Gniazdowski @ 2018-08-04 6:45 UTC (permalink / raw)
To: Zsh Users
Hello,
again so much has been added to FSH that I've decided to write.
Ideal brackets highlighting, resilient to quoting – note the sidx=...,
eidx=... lines:
http://psprint.blinkenshell.org/theme.png
That's the general demo of FSH. It shows themes, math-mode
highlighting, etc. Note that it also does assign-highlighting – the
math=... etc. lines would normally be plain white.
Demonstration of chroma architecture (it treats zsh -c specifically,
descents to -c contents), and recursivity (eval):
http://psprint.blinkenshell.org/highlight-much.png
This normally looks like following:
http://psprint.blinkenshell.org/highlight-less.png
--
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Fast-Syntax-Highlighting demo
2018-08-04 6:45 Fast-Syntax-Highlighting demo Sebastian Gniazdowski
@ 2018-08-04 13:12 ` Ray Andrews
2018-08-04 14:13 ` Sebastian Gniazdowski
2018-08-04 15:03 ` Vadim A. Misbakh-Soloviov
2018-08-04 16:01 ` Vadim A. Misbakh-Soloviov
2 siblings, 1 reply; 11+ messages in thread
From: Ray Andrews @ 2018-08-04 13:12 UTC (permalink / raw)
To: zsh-users
On 03/08/18 11:45 PM, Sebastian Gniazdowski wrote:
> Hello,
> again so much has been added to FSH that I've decided to write.
>
> 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.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Fast-Syntax-Highlighting demo
2018-08-04 13:12 ` Ray Andrews
@ 2018-08-04 14:13 ` Sebastian Gniazdowski
2018-08-04 14:27 ` Ray Andrews
2018-08-04 15:01 ` David Klann
0 siblings, 2 replies; 11+ messages in thread
From: Sebastian Gniazdowski @ 2018-08-04 14:13 UTC (permalink / raw)
To: Ray Andrews; +Cc: Zsh Users
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
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Fast-Syntax-Highlighting demo
2018-08-04 14:13 ` Sebastian Gniazdowski
@ 2018-08-04 14:27 ` Ray Andrews
2018-08-04 15:01 ` David Klann
1 sibling, 0 replies; 11+ messages in thread
From: Ray Andrews @ 2018-08-04 14:27 UTC (permalink / raw)
To: zsh-users
On 04/08/18 07:13 AM, Sebastian Gniazdowski wrote:
> 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).
I'll be sure to try that out next time I do any coding.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Fast-Syntax-Highlighting demo
2018-08-04 14:13 ` Sebastian Gniazdowski
2018-08-04 14:27 ` Ray Andrews
@ 2018-08-04 15:01 ` David Klann
2018-08-04 15:15 ` Sebastian Gniazdowski
1 sibling, 1 reply; 11+ messages in thread
From: David Klann @ 2018-08-04 15:01 UTC (permalink / raw)
To: Zsh Users
[-- Attachment #1.1: Type: text/plain, Size: 1424 bytes --]
ZSH continues to amaze me after more than 20 years of using it!
This "add-on" ("plugin", "theme", etc.) is amazing! I keep a casual eye
on changes and progress in command line "technology", and this is one
that is immediately useful!
Thanks, Sabastian, for your work on Fast Syntax Highlighting!
~David
On 08/04/2018 09:13 AM, Sebastian Gniazdowski wrote:
> 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).
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 293 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Fast-Syntax-Highlighting demo
2018-08-04 6:45 Fast-Syntax-Highlighting demo Sebastian Gniazdowski
2018-08-04 13:12 ` Ray Andrews
@ 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
2 siblings, 1 reply; 11+ messages in thread
From: Vadim A. Misbakh-Soloviov @ 2018-08-04 15:03 UTC (permalink / raw)
To: zsh-users
[-- Attachment #1: Type: text/plain, Size: 633 bytes --]
Wouldn't you mind to:
1) add some "top-level" menion of secondary themes (with description that it
is the theme to apply inside `$()`) in the documentation (both in READDME and
`fast-theme -h`)?
===
2) add some way to load the (custom) themes from outside of FSH repo?
It would be good if, say, fast-theme will support:
- some environment variable with additional themes location path(s)
- "loading" themes by full path (even if that path isn't on the currently
"known" paths)
===
3) add some "easy" way for dumping current "theme" (with all the active
redefinitions) in ini-format (to use as the new theme).
--
wbr,
mva
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Fast-Syntax-Highlighting demo
2018-08-04 15:01 ` David Klann
@ 2018-08-04 15:15 ` Sebastian Gniazdowski
0 siblings, 0 replies; 11+ messages in thread
From: Sebastian Gniazdowski @ 2018-08-04 15:15 UTC (permalink / raw)
To: dklann; +Cc: Zsh Users
On Sat, 4 Aug 2018 at 17:08, David Klann <dklann@grunch.org> wrote:
>
> ZSH continues to amaze me after more than 20 years of using it!
>
> This "add-on" ("plugin", "theme", etc.) is amazing! I keep a casual eye
> on changes and progress in command line "technology", and this is one
> that is immediately useful!
>
> Thanks, Sabastian, for your work on Fast Syntax Highlighting!
>
> ~David
Thanks, it's 3 years now of gradual extending of what's possible, in
large extent motivated by user hints. I mean, I didn't know this would
go that far, but users often mentioned what would be cool, and it
turned out to be possible. It was a long process.
--
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Fast-Syntax-Highlighting demo
2018-08-04 6:45 Fast-Syntax-Highlighting demo Sebastian Gniazdowski
2018-08-04 13:12 ` Ray Andrews
2018-08-04 15:03 ` Vadim A. Misbakh-Soloviov
@ 2018-08-04 16:01 ` Vadim A. Misbakh-Soloviov
2018-08-04 16:38 ` Sebastian Gniazdowski
2018-08-04 16:44 ` Daniel Shahaf
2 siblings, 2 replies; 11+ messages in thread
From: Vadim A. Misbakh-Soloviov @ 2018-08-04 16:01 UTC (permalink / raw)
To: zsh-users
also, I've just found that you've limited brackets highlighting by 3,
irrelevant to the count specified in current theme.
Although, "original" z-s-h, AFAIRC, doesn't limit it at all (see highlighters/
brackets/brackets-highlighter.zsh) and have definitions for 5 levels by
default.
It would be nice if F-S-H wouldn't also limit "deepness" of bracket levels to
highlight...
Although, I'm not sure about parser speed penalty for that :-/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Fast-Syntax-Highlighting demo
2018-08-04 15:03 ` Vadim A. Misbakh-Soloviov
@ 2018-08-04 16:34 ` Sebastian Gniazdowski
0 siblings, 0 replies; 11+ messages in thread
From: Sebastian Gniazdowski @ 2018-08-04 16:34 UTC (permalink / raw)
To: Vadim A. Misbakh-Soloviov; +Cc: Zsh Users
On Sat, 4 Aug 2018 at 17:15, Vadim A. Misbakh-Soloviov <zsh@mva.name> wrote:
>
> Wouldn't you mind to:
>
> 1) add some "top-level" menion of secondary themes (with description that it
> is the theme to apply inside `$()`) in the documentation (both in READDME and
> `fast-theme -h`)?
Ok. It's a constant pain, easy but not easy to describe things queued
for README.md.
> ===
>
> 2) add some way to load the (custom) themes from outside of FSH repo?
> It would be good if, say, fast-theme will support:
> - some environment variable with additional themes location path(s)
> - "loading" themes by full path (even if that path isn't on the currently
> "known" paths)
A user had a cool idea, to simply do `fast-theme ~/custom.ini`. It can
use shorthand `fast-theme XDG:custom`, where XDG ==
${XDG_CONFIG_HOME:-$HOME/.config}/fsh. Full description of how this
resolved (today) is at:
https://github.com/zdharma/fast-syntax-highlighting/issues/49
> ===
>
> 3) add some "easy" way for dumping current "theme" (with all the active
> redefinitions) in ini-format (to use as the new theme).
Interesting idea, thanks.
>
> --
> wbr,
> mva
--
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Fast-Syntax-Highlighting demo
2018-08-04 16:01 ` Vadim A. Misbakh-Soloviov
@ 2018-08-04 16:38 ` Sebastian Gniazdowski
2018-08-04 16:44 ` Daniel Shahaf
1 sibling, 0 replies; 11+ messages in thread
From: Sebastian Gniazdowski @ 2018-08-04 16:38 UTC (permalink / raw)
To: Vadim A. Misbakh-Soloviov; +Cc: Zsh Users
On Sat, 4 Aug 2018 at 18:13, Vadim A. Misbakh-Soloviov <zsh@mva.name> wrote:
>
> also, I've just found that you've limited brackets highlighting by 3,
> irrelevant to the count specified in current theme.
>
> Although, "original" z-s-h, AFAIRC, doesn't limit it at all (see highlighters/
> brackets/brackets-highlighter.zsh) and have definitions for 5 levels by
> default.
>
> It would be nice if F-S-H wouldn't also limit "deepness" of bracket levels to
> highlight...
> Although, I'm not sure about parser speed penalty for that :-/
I considered this a fancy feature and went for rigid "3, not more, not
less" ;), but I see the need for at least 4th, one more level, and
maybe the limitless way, who knows. Problem lies in INI files and the
need of fast-theme tool to know possible key names, I would have to
code a special case there.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Fast-Syntax-Highlighting demo
2018-08-04 16:01 ` Vadim A. Misbakh-Soloviov
2018-08-04 16:38 ` Sebastian Gniazdowski
@ 2018-08-04 16:44 ` Daniel Shahaf
1 sibling, 0 replies; 11+ messages in thread
From: Daniel Shahaf @ 2018-08-04 16:44 UTC (permalink / raw)
To: zsh-users
Vadim A. Misbakh-Soloviov wrote on Sat, 04 Aug 2018 19:01 +0300:
> also, I've just found that you've limited brackets highlighting by 3,
> irrelevant to the count specified in current theme.
>
> Although, "original" z-s-h,
For those not familiar with it, Vadim refers here to
https://github.com/zsh-users/zsh-syntax-highlighting/, founded by
Julien in 2010.
(Disclosure: I'm involved in z-sy-h.)
> AFAIRC, doesn't limit it at all (see highlighters/
> brackets/brackets-highlighter.zsh) and have definitions for 5 levels by
> default.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2018-08-04 16:56 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-04 6:45 Fast-Syntax-Highlighting demo Sebastian Gniazdowski
2018-08-04 13:12 ` Ray Andrews
2018-08-04 14:13 ` Sebastian Gniazdowski
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
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).