diff options
author | Julien Vincent <m@julienvincent.io> | 2023-03-07 21:46:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-07 20:46:21 +0100 |
commit | e0f92c8df52335c266f73e3cc3384b277f3e9a34 (patch) | |
tree | 1cbb71660141df61814f42687e5bb6f1af466062 /plugins/vi-mode/README.md | |
parent | d342b353e32091ef7384b86fd86b1a88dbd44609 (diff) | |
download | zsh-e0f92c8df52335c266f73e3cc3384b277f3e9a34.tar.gz zsh-e0f92c8df52335c266f73e3cc3384b277f3e9a34.tar.bz2 zsh-e0f92c8df52335c266f73e3cc3384b277f3e9a34.zip |
feat(vi-mode): add settings for vi-mode cursor styles (#10860)
Diffstat (limited to 'plugins/vi-mode/README.md')
-rw-r--r-- | plugins/vi-mode/README.md | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/plugins/vi-mode/README.md b/plugins/vi-mode/README.md index 476666bf6..3b819c7cb 100644 --- a/plugins/vi-mode/README.md +++ b/plugins/vi-mode/README.md @@ -29,6 +29,8 @@ plugins=(... vi-mode) VI_MODE_SET_CURSOR=true ``` + See [Cursor Styles](#cursor-styles) for controlling how the cursor looks in different modes + - `MODE_INDICATOR`: controls the string displayed when the shell is in normal mode. See [Mode indicators](#mode-indicators) for details. @@ -52,6 +54,25 @@ INSERT_MODE_INDICATOR="%F{yellow}+%f" You can also use the `vi_mode_prompt_info` function in your prompt, which will display this mode indicator. +## Cursor Styles + +You can control the cursor style used in each active vim mode by changing the values of the following variables. + +```zsh +# defaults +VI_MODE_CURSOR_NORMAL=2 +VI_MODE_CURSOR_VISUAL=6 +VI_MODE_CURSOR_INSERT=6 +VI_MODE_CURSOR_OPPEND=0 +``` + +- 0, 1 - Blinking block +- 2 - Solid block +- 3 - Blinking underline +- 4 - Solid underline +- 5 - Blinking line +- 6 - Solid line + ## Key bindings Use `ESC` or `CTRL-[` to enter `Normal mode`. |