Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
How to make underlining of a command line disappear after an ordinary key press? (2)
- X-seq: zsh-users 14475
- From: Guido van Steen <gvsteen@xxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: How to make underlining of a command line disappear after an ordinary key press? (2)
- Date: Sat, 10 Oct 2009 14:22:23 -0700 (PDT)
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1255209743; bh=Ue0PmKqISpkoHvregFbXA8i3Q7Uh0UtdkPtNCkfY83I=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=6M5wx/1U192xmYpAUdep6Dg14esAIrffDRIdV2Y/l8VgA8WQZk9kuurs8YJuNh3OjOc04mgDmAMiPHdFKsCcuBGPw1Iv9v/85+IU9ZTc3NV8+NADZusKYT4lMWqST0akZFpGZnaLaxMbjDRbCMcaqCTdRVnTb8jy1y/nJgdWugg=
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=13PzxhTsMeoSGwC96D1AO7tUkhkmfThNMOMDAqQGekkk5WOCtz5Y/k2maq2D1txPQ7h7H6we+gPoBpKSzIWyeXeoYRr+IQt9ItOSNf8pZK2K54Sa/DFuJl0JCACrlkNscdqMJ6TAGMr1JrbbzDnfFpoIjweiooSup7omb3X1rwc=;
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
Well, it seems that binding a widget like:
"""ordinary-key-press(){
region_highlight=("0 0 underline")
zle .self-insert;
}
"""
to all ordinary keys by:
"""zle -N ordinary-key-press
bindkey 'a' ordinary-key-press
...
...
...
bindkey 'Z' ordinary-key-press
bindkey '^[[C' ordinary-key-press # arrow right
bindkey '^[[D' ordinary-key-press # arrow left
...
...
"""
achieves what I had in mind.
I am still wondering though if the underlining can't be
turned be done from within the widget
"underline_cmdline_partially".
Or can it at least be done without so many bindkey commands?
Thanks!
Guido
--- On Sat, 10/10/09, Guido van Steen <gvsteen@xxxxxxxxx> wrote:
> From: Guido van Steen <gvsteen@xxxxxxxxx>
> Subject: How to make underlining of a command line disappear after an ordinary key press?
> To: zsh-users@xxxxxxxxxx
> Date: Saturday, 10 October, 2009, 5:16 PM
> Hi all,
>
> I am trying to write a widget, let me call it
> "underline_cmdline_partially". Not very urprisingly,
> its purpose is to underline a part of the command line.
> It does so by calling something like
> """region_highlight=("$my_mbegin $MEND underline")""".
> Now, if the next key pressed is an ordinary key - like
> "a" - I would like the partial underlining of the
> command line to disappear.
>
> Is there an easy way to achieve this e.g. by calling
> "zle_highlight=(region:standout special:standout
> isearch:underline)" - the default setting - in the
> widget "underline_cmdline_partially"?
>
> Thanks in advance,
>
> Guido
>
>
>
> Send instant messages to your online friends http://uk.messenger.yahoo.com
>
New Email names for you!
Get the Email name you've always wanted on the new @ymail and @rocketmail.
Hurry before someone else does!
http://mail.promotions.yahoo.com/newdomains/aa/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author