Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: "drop-in replacement" and transpose-words-match
- X-seq: zsh-workers 37687
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: "drop-in replacement" and transpose-words-match
- Date: Tue, 19 Jan 2016 09:28:37 +0100
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=/+q0Ms/rn03DewESKwOeJqAWhUkmW39/Kwhi2m/Ff1k=; b=u29dvk3z+uTBj1pvKuo4kW8hoEGuMzyJ5e0TPiqR4Wsine7BEIFHX84qrUI2lVxBpX rx3wAC70T5yoUEtRnFWAUh4BoRf7ZYPUNrnX3s8f6P3UCDsr8BU6/N0ilTxueLKf7QsS p90vhGP3KVKEvv7jEgxQoxDoDbaXwGaNC1Kio77pP9kvB07paMuGlY/COB5hmKQtu76w kcg43NLvy4neftxGAi2E0GV/UsBxu6K6XZTE1SPgewqE72eIFB/LBQT5wtgfGTWGxkEC aVPw5dsGcUVkUMxvVWHVFTVxJOX1OMdfIpfImGuWlPUL7U6cB2s9u7k20dTz99ieR0mr 7GAQ==
- In-reply-to: <160118223126.ZM28565@torch.brasslantern.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <160111233259.ZM6719@torch.brasslantern.com> <CAKc7PVDhxbVgmV7WcGgyDzMmWSjwQ=7=LExXTwr7YvPzPpn2RA@mail.gmail.com> <160118223126.ZM28565@torch.brasslantern.com>
On 19 January 2016 at 07:31, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> [I would probably save CURSOR and MARK, set CURSOR to zero, then loop
> on "zle forward-word" until I reached or passed the old CURSOR, rather
> than try to match up the results of (Z:n:) to $BUFFER. Then restore
> CURSOR and MARK, of course.]
This would miss spaces. zew-pb remembers white space before each word.
This allows to preserve them when rebuilding buffer after e.g. word
swapping
I'm now writing a shell division function that would be used instead
of pure (Z+n+), in zew-pb. The point is to have a meaningful word
division in case if user enters '$(( 0 + 1 abc $(( 0 + 2' and tries to
complete after '$(( 0 + 1' or '$(( 0 + 2'. A tedious task, will call
(z) in number slightly greater than number of letters. My point is
that Zsh could provide more information (besides LBUFFER) to Zle and
compsys, and also zsh-syntax-highlighting. Not completely sure yet
what the information should be.
Zsh-syntax-highlighting can be slow, which can be seen by editing ~400
lines function with zed -f. Maybe it's because it's doing various
things to compensate not that rich information provided by Zsh.
Best regards,
Sebastian Gniazdowski
Messages sorted by:
Reverse Date,
Date,
Thread,
Author