2.2 KiB
Editor
Sets key bindings.
Settings
Key bindings
To enable key bindings, add the following to zpreztorc, and replace 'bindings' with 'emacs' or 'vi'.
zstyle ':prezto:module:editor' key-bindings 'bindings'
To enable additional key bindings, add some definitions like the following to zpreztorc.
zstyle ':prezto:module:editor:term' xterm \
'Home' '\\e\[H' 'End' '\\e\[F'
zstyle ':prezto:module:editor:term' linux \
'Home' '\\e\[1\~' 'End' '\\e\[4\~'
zstyle ':prezto:module:editor:term' rxvt \
'Home' '\\e\[7\~' 'End' '\\e\[8\~'
Those lines will take care of Home and End key in rxvt/eterm virtual terminal emulator families and in linux console.
Dot Expansion
To enable the auto conversion of .... to ../.., add the following to zpreztorc.
zstyle ':prezto:module:editor' dot-expansion 'yes'
Theming
To indicate when the editor is in the primary keymap (emacs or viins), add
the following to your theme_prompt_setup
function.
zstyle ':prezto:module:editor:info:keymap:primary' format '>>>'
To indicate when the editor is in the primary keymap (emacs or viins) insert
mode, add the following to your theme_prompt_setup
function.
zstyle ':prezto:module:editor:info:keymap:primary:insert' format 'I'
To indicate when the editor is in the primary keymap (emacs or viins) overwrite
mode, add the following to your theme_prompt_setup
function.
zstyle ':prezto:module:editor:info:keymap:primary:overwrite' format 'O'
To indicate when the editor is in the alternate keymap (vicmd), add the
following to your theme_prompt_setup
function.
zstyle ':prezto:module:editor:info:keymap:alternate' format '<<<'
To indicate when the editor is completing, add the following to your
theme_prompt_setup
function.
zstyle ':prezto:module:editor:info:completing' format '...'
Then add $editor_info[context]
, where context is keymap, insert, or
overwrite, to $PROMPT
or $RPROMPT
and call editor-info
in the
prompt_name_preexec
hook function.
Authors
The authors of this module should be contacted via the issue tracker.