From db222dd0bd737aab9dd1173a66e771c26a5bf5de Mon Sep 17 00:00:00 2001 From: Ben O'Hara Date: Sun, 17 Jun 2012 15:11:30 +1000 Subject: [PATCH] Documentation for editor module --- modules/editor/README.md | 57 ++++++++++++++++++++++++++++++++++++++++ modules/editor/init.zsh | 36 ------------------------- 2 files changed, 57 insertions(+), 36 deletions(-) create mode 100644 modules/editor/README.md diff --git a/modules/editor/README.md b/modules/editor/README.md new file mode 100644 index 00000000..f12a26a1 --- /dev/null +++ b/modules/editor/README.md @@ -0,0 +1,57 @@ +Editor +====== + +Setup the editor keymap + +Settings +-------- + +### Key bindings + +To enable key bindings, add the following to *zshrc*, and replace 'map' with +'emacs' or 'vi'. + + zstyle ':omz:module:editor' keymap 'map' + +### Dot Expansion + +To enable the auto conversion of .... to ../.., add the following to *zshrc*. + + zstyle ':omz:module:editor' dot-expansion 'yes' + +### Prompt + +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 primary keymap (emacs or viins) insert +mode, add the following to your theme prompt setup function. + + zstyle ':omz:module:editor:keymap:primary' insert '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 ':omz:module:editor:keymap:primary' overwrite 'O' + +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 '...' + +Authors +------- + +*The authors of this module should be contacted via the [issue tracker][1].* + + - [Sorin Ionescu](https://github.com/sorin-ionescu) + +[1]: https://github.com/sorin-ionescu/oh-my-zsh/issues + diff --git a/modules/editor/init.zsh b/modules/editor/init.zsh index 0fbd5711..ee545de7 100644 --- a/modules/editor/init.zsh +++ b/modules/editor/init.zsh @@ -3,42 +3,6 @@ # # 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 primary keymap (emacs or viins) insert -# mode, add the following to your theme prompt setup function. -# -# zstyle ':omz:module:editor:keymap:primary' insert '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 ':omz:module:editor:keymap:primary' overwrite 'O' -# -# 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