Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zle: vi mode: wrong undo handling on fresh lines
- X-seq: zsh-workers 31761
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Hauke Petersen <hkptrsn@xxxxxxxxx>, zsh-workers@xxxxxxx
- Subject: Re: zle: vi mode: wrong undo handling on fresh lines
- Date: Sun, 22 Sep 2013 11:24:21 -0700
- In-reply-to: <CANWLQWsV5i+=3NptAxir6UYCoipFa2Pk+g6D1DDnMnJMVCbDgA@mail.gmail.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: <CANWLQWsV5i+=3NptAxir6UYCoipFa2Pk+g6D1DDnMnJMVCbDgA@mail.gmail.com>
On Sep 22, 2:37pm, Hauke Petersen wrote:
}
} example, typing
}
} foo<ESC>u
}
} yields "fo" instead of the expected empty line. Expliduntantly setting
Congratulations, google finds no occurrences of that outside of the zsh
archive for this thread. You have officially coined a word.
} function zle-line-init { zle vi-insert; }; zle -N zle-line-init
}
} works around this misbehavior
Until the bug is fixed, try something like
zle-line-init() { [[ -o vi ]] && { zle vi-cmd-mode; zle vi-insert } }
} As an aside, `zle -K viins' does not have the same effect as `zle
} vi-insert' here, when I expected them to be functionally equivalent.
Well, no. "zle -K viins" means you're still in whatever "mode" you were
in before (emacs, vicmd, or viins), but have started using the keymap
normally used for viins mode. Similarly "zle -K menuselect" would not
magically fling you into the completion menu. "zle vi-insert" causes an
actual change of mode, just as "zle menu-select" begins completion.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author