From 1691d44fcc25301cd5f172fbdb2fc362ed687bb2 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Mon, 9 Apr 2012 17:24:17 -0400 Subject: [PATCH] Add usage information for editor --- modules/editor/init.zsh | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/modules/editor/init.zsh b/modules/editor/init.zsh index 4b85b43..b9819b5 100644 --- a/modules/editor/init.zsh +++ b/modules/editor/init.zsh @@ -1,26 +1,40 @@ # -# Sets keyboard bindings. +# Sets key bindings. # # Authors: # Sorin Ionescu # +# Usage: +# To enable key bindings, add the following to zshrc, and replace 'map' with +# 'emacs' or 'vi. +# +# zstyle ':omz:module:editor' keymap 'map' +# +# To enable the auto conversion of .... to ../.., add the following to zshrc. +# +# zstyle ':omz:module:editor' dot-expansion 'yes' +# +# To indicate when the editor is in the primary keymap (emacs or viins), add +# the following to your theme prompt setup function. +# +# zstyle ':omz:module:editor:keymap' primary '>>>' +# +# To indicate when the editor is in the alternate keymap (vicmd), add the +# following to your theme prompt setup function. +# +# zstyle ':omz:module:editor:keymap' alternate '<<<' +# +# To indicate when the editor is completing, add the following to your theme +# prompt setup function. +# +# zstyle ':omz:module:editor' completing '...' +# # Dumb terminals lack support. if [[ "$TERM" == 'dumb' ]]; then return 1 fi -# The default styles. - -# Indicator to notify of vi insert mode. -zstyle ':omz:module:editor:keymap' primary '>>>' - -# Indicator to notify of vi command mode. -zstyle ':omz:module:editor:keymap' alternate '<<<' - -# Indicator to notify of generating completion. -zstyle ':omz:module:editor' completing '...' - # Beep on error in line editor. setopt BEEP