forked from sorin-ionescu/prezto
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fix sorin-ionescu#103] Add documentation for editor
- Loading branch information
1 parent
39b88fe
commit 9732781
Showing
2 changed files
with
63 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
Editor | ||
====== | ||
|
||
Sets key bindings. | ||
|
||
Settings | ||
-------- | ||
|
||
### Key bindings | ||
|
||
To enable key bindings, add the following to *zpreztorc*, and replace 'map' with | ||
'emacs' or 'vi'. | ||
|
||
zstyle ':prezto:module:editor' keymap 'map' | ||
|
||
### 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][1].* | ||
|
||
- [Sorin Ionescu](https://github.com/sorin-ionescu) | ||
|
||
[1]: https://github.com/sorin-ionescu/oh-my-zsh/issues | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,42 +4,6 @@ | |
# Authors: | ||
# Sorin Ionescu <[email protected]> | ||
# | ||
# Usage: | ||
# To enable key bindings, add the following to zpreztorc, and replace 'map' | ||
# with 'emacs' or 'vi. | ||
# | ||
# zstyle ':prezto:module:editor' keymap 'map' | ||
# | ||
# To enable the auto conversion of .... to ../.., add the following to | ||
# zpreztorc. | ||
# | ||
# zstyle ':prezto: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 ':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 '...' | ||
# | ||
|
||
# Return if requirements are not found. | ||
if [[ "$TERM" == 'dumb' ]]; then | ||
|