zsh-workers
 help / color / mirror / code / Atom feed
From: Roman Perepelitsa <roman.perepelitsa@gmail.com>
To: Oliver Kiddle <okiddle@yahoo.co.uk>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: Feature request: italic style in region_highlight
Date: Thu, 2 Jan 2020 20:45:40 +0100	[thread overview]
Message-ID: <CAN=4vMo__T7nLxcUzc7qvQQH9QC5UC+Ofjq7y8XEFfgEBC19DQ@mail.gmail.com> (raw)
In-Reply-To: <40813-1577992732.270919@2Jfy.SNk-.4lUU>

On Thu, Jan 2, 2020 at 8:18 PM Oliver Kiddle <okiddle@yahoo.co.uk> wrote:
>
> That sounds useful, expecially italic.

Yesterday I started adding italic support throughout. Once it's there,
there would be no need for custom standout_on_code/standout_off_code
overrides. Plain "italic" style would surely be nicer.

> The lack of free bits in zattr (TXT macros) may be something of an
> impediment. It isn't really important to prompts but would matter for
> zle. There may be ways to recover bits, for example we have both
> TXTBOLDFACE and TXTNOBOLDFACE which allows the code to distinguish the
> actions but is redundant in terms of tracking attributes.

Yep, I've already discovered this. If this was C++, I would just make
zattr std::bitset<84> and be done with it. Once could wish. Instead,
I've made zattr a struct with 3 fields: attr for on/off attributes and
fg and bg for colors. Each of these 3 fields is 4 bytes (I could make
attr 2 bytes but it won't save anything due to alignment
requirements). I don't want to spent much of your time on this as it's
not close to being done. Will send a patch when I get through with it.

> %O/%o (for "oblique") would be available. I realise that an oblique font
> is not strictly the same as italic.

Perfect timing. I wanted to ask which alternative letter to use as %a
is taken by something (watch, perhaps?). %O/%o sounds good.

> I like the idea of %A{...} but would favour symbolic names over numbers

Another benefit of symbolic names is that zsh will know how to flip
the attribute on and off. And the UX complexity will stay pretty much
where it is now. %O and %o will work exactly like %U and %u and
similar sequences. Easy to understand. With %A{...} we would have to
explain how it interacts with the other sequences. E.g., does %u
cancel %A{4}?

Roman.

  reply	other threads:[~2020-01-02 21:06 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-30  1:29 Sebastian Gniazdowski
2019-12-30 10:16 ` Roman Perepelitsa
2019-12-30 16:07   ` Bart Schaefer
2019-12-30 16:26     ` Roman Perepelitsa
2020-01-01  0:07       ` Bart Schaefer
2020-01-02 19:18         ` Oliver Kiddle
2020-01-02 19:45           ` Roman Perepelitsa [this message]
2020-01-03  2:30             ` Bart Schaefer
2020-01-03 20:28               ` Daniel Shahaf
2021-05-20 13:33                 ` Marlon Richert
2021-05-25 16:38                   ` Oliver Kiddle
2021-05-25 20:50                     ` Marlon Richert
2021-05-25 20:56                       ` Bart Schaefer
2021-05-27  8:04                         ` Marlon Richert
2021-05-25 17:28                 ` Bart Schaefer
2021-05-25 22:43                   ` Oliver Kiddle

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='CAN=4vMo__T7nLxcUzc7qvQQH9QC5UC+Ofjq7y8XEFfgEBC19DQ@mail.gmail.com' \
    --to=roman.perepelitsa@gmail.com \
    --cc=okiddle@yahoo.co.uk \
    --cc=zsh-workers@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).