Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Extending zed



On 4 June 2018 at 18:08, Oliver Kiddle <okiddle@xxxxxxxxxxx> wrote:
> -i vi-cmd-mode). I followed the naming of the __zed_pg_up widgets in
> naming this __zed_init but I'm not especially fond of this – it looks
> like a completion function.

It hurts me a little too. For my plugin functions, I use "-", i.e.
"-zed_pg_up", but didn't propose this as it is somewhat controversial
– requires to use "--" when handling the function, e.g. when passing
to `autoload -- -zed_pg_up`. But we might take the decision to use
that scheme. Also, completion handling code could use pattern
`[_][^_]`, I do it already in Zplugin. This is also a solution.

> Undoing individual characters at a time is not how undo works in vi or
> vim. You can bind a key to undo in viins and it'll do that. Otherwise,
> undo events are merged when you go into vi command mode allowing
> vi-compatible undo behaviour of undoing whole vi changes.

True, I do following to have fine-grained undo in vim:

inoremap <Space> <Space><C-g>u
inoremap <Tab> <Tab><C-g>u
inoremap <Return> <Return><C-g>u

Although not sure if vim is more end-user than vi, if so Zsh could follow vim.

> By the way, the change in 42929 to bind Home and End seems harmless
> enough given that PgUp/Down is already there. I'm not so sure about
> the use of zle -la to test for widgets existing (zle -N is silent and
> idempotent anyway).

I was using zle -la in Zplugin, z-sy-h used it, then both switched to
use $widgets. Still the argument about idempotent zle -N is valid.

-- 
Best regards,
Sebastian Gniazdowski



Messages sorted by: Reverse Date, Date, Thread, Author