Zsh Mailing List Archive
Messages sorted by:
Re: code completition / cannot delete characters
- X-seq: zsh-users 11267
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: code completition / cannot delete characters
- Date: Fri, 09 Mar 2007 23:30:05 -0800
- In-reply-to: <B63D238E-72DE-4330-93D7-F361412A428C@xxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <52211927-A3E8-4E51-8735-961A3BE83BB1@xxxxxxxxxxxxxxxxxx> <070309024427.ZM6023@xxxxxxxxxxxxxxxxxxxxxx> <4916CF2F-0DA8-478B-96DC-B6154C90D98C@xxxxxxxxxxxxxxxxxx> <070309081354.ZM8122@xxxxxxxxxxxxxxxxxxxxxx> <B63D238E-72DE-4330-93D7-F361412A428C@xxxxxxxxxxxxxxxxxx>
On Mar 9, 11:45pm, Michael Worobcuk wrote:
} > Instead it appears that the six keys ESC x r e d i are being swallowed
Aha, yes, as Micah suggested you do appear to be using the vi bindings.
(bindkey -v) That would explain much. ESC goes to vi command mode,
and then (because the command line is empty) nothing happens until you
get to "i" which puts you back in insert mode where you type "splay".
} > bindkey -m
} > do you get a warning about multibyte support being disabled?
} Yes, here it is:
} [hanno: /home/hanno]>bindkey -m
} bindkey: warning: `bindkey -m' disables multibyte support
After you've done that, does anything change about the way completion
I think you're probably just running into one of the cases where
multibyte support was not quite finished in the completion system.
If you're able to compile your own copy of the shell, try getting
the latest development snapshot from sourceforge.net.
} > Have you tried using the insert-composed-char or insert-unicode-char
} > functions? You'll need to install them:
} > autoload -U insert-composed-char
} > zle -N insert-composed-char
} > and then bind them to a convenient key sequence with bindkey.
} Could you explain me, how to do that ?
Since you're using vi mode, the binding for the ESC key is to change
to command mode, and most other keys bindings just insert themselves.
You need to choose some keys that aren't already being used for another
purpose. To see what's already in use, use
bindkey -M viins
A good choice for an unbound key is often control-X (^X) but you may
find that some completion functions have already been attached to key
sequences beginning with that.
Assuming for example that ^Xc is available for insert-composed-char
and ^Xu is available for insert-unicode-char, you just do
autoload -U insert-composed-char insert-unicode-char
zle -N insert-composed-char
zle -N insert-unicode-char
bindkey -v ^Xc insert-composed-char
bindkey -v ^Xu insert-unicode-char
Then when you're ready to insert a multibyte character, you type
control-x and then c and then the two characters that represent the
multibyte character, e.g. ^X c a : for ä.
See the manual for the various things you can insert this way.
Messages sorted by: