zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: "zsh-workers@zsh.org" <zsh-workers@zsh.org>
Subject: Re: PATCH: key bindings, fixes, docs, tests for vi stuff
Date: Fri, 21 Nov 2014 11:35:50 +0100	[thread overview]
Message-ID: <18016.1416566150@thecus.kiddle.eu> (raw)
In-Reply-To: <141120164942.ZM3953@torch.brasslantern.com>

Bart wrote:
> } + * textobjects.c - ZLE module implementing Vim style text objects
> 
> This isn't actually a "module" is it?  It's just part of the ZLE vi
> widget set?

Yes. It was when I wrote that text.

> I have from time to time wondered if segregating some of the builtin
> widgets into loadable modules might be beneficial.

This is something I was also pondering. The main obstacle to this, and
the reason I pulled textobjects inline, relates to keybindings:

If someone has their bindkey commands early in .zshrc, we don't want
those to be overridden later when a module gets loaded. This problem
already means everyone has to take care to put their listscroll and
menuselect bindings late in their .zshrc.

As one solution, we could have all default bindings in zle.so. I haven't
checked what happens if that includes bindings to autoloadable widgets:
(i.e. if it is possible and if so whether that results in instant or
deferred loading). I wouldn't want a module for execute-named-cmd loaded
just because I want to bind a few keys in the command keymap but I'd
want the keymap to be there.

Do you have any thoughts on what a logical division into modules would
be? I was thinking along the lines of the vi/emacs split but only for
those widgets that are unlikely to be used for the opposite mode.
We might also have a few smaller modules, e.g. for execute-named-cmd. I
use a shell function replacement that uses read-from-minibuffer.

The only existing module: deltochar appears to be mainly there to
provide an example of doing widgets as a module. Is it a fairly much
standard thing to an emacs user or is it logical to have it on its own?

I also wonder if we could make it possible for shell function widgets
to specify some sort of default key binding much as is possible for
completion widgets. For text objects I was going to mostly use shell
functions. Of the two existing ones, shell-word needs the lexer and
basic words are sort of fundamental. I've perhaps made them more vim
compatible than was necessary except where the vim behaviour looks like
a bug (successive newlines and the first character in the buffer).

Oliver


  parent reply	other threads:[~2014-11-21 10:42 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-17 21:36 Oliver Kiddle
2014-11-18  8:04 ` Jun T.
2014-11-19  8:48   ` Oliver Kiddle
2014-11-19 15:35     ` Ray Andrews
2014-11-21  0:01   ` Oliver Kiddle
2014-11-21  0:49     ` Bart Schaefer
2014-11-21  1:10       ` Ray Andrews
2014-11-21  5:53         ` Bart Schaefer
2014-11-21 10:35       ` Oliver Kiddle [this message]
2014-11-22  6:59         ` Bart Schaefer
2014-12-12 16:47           ` Oliver Kiddle
2014-11-21  1:15     ` Ray Andrews
2014-11-21  2:20       ` Mikael Magnusson
2014-11-21  2:38         ` Ray Andrews
2014-11-21  6:23           ` Bart Schaefer
2014-11-21 17:28             ` trouble with debugging binary Ray Andrews
2014-11-22  4:45               ` Bart Schaefer
2014-11-22  5:27                 ` Ray Andrews
2014-11-22  5:43                 ` Bart Schaefer
2014-11-22 16:49                   ` Ray Andrews
2014-11-22 22:35                     ` Bart Schaefer
2014-11-23  7:58                     ` Lawrence Velázquez
2014-11-23 16:22                       ` Ray Andrews
2014-11-23 18:12                         ` Mikael Magnusson
2014-11-23 18:42                           ` Ray Andrews
2014-11-23 19:01                             ` Mikael Magnusson
2014-11-23 22:30                               ` Ray Andrews
2014-11-21 15:20     ` PATCH: key bindings, fixes, docs, tests for vi stuff Jun T.

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=18016.1416566150@thecus.kiddle.eu \
    --to=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).