Add cursor shape change dependant on vi mode
This commit is contained in:
17
README.md
17
README.md
@@ -84,6 +84,21 @@ and multi-terminal history support is enabled.
|
||||
The vi mode line editor is enabled. [zsh-vim-mode][vim-mode] was a reasonable
|
||||
starting point but was replaced as it uses some strange defaults.
|
||||
|
||||
#### Cursor Shape
|
||||
|
||||
In order to easily ascertain which vi mode the line editor is currently using
|
||||
escape sequences are sent to the terminal emulator on certain events to change
|
||||
the current shape of the cursor. Two cursor shapes are used; block for `vicmd`
|
||||
mode; a vertical line for `viins` mode. Additional escape sequences are used
|
||||
when [tmux][tmux] is detected to ensure the terminal emulator receives the
|
||||
appropriate sequence. [iTerm2][iterm2] and VTE compatible terminal emulators are
|
||||
supported.
|
||||
|
||||
Three hooks are registered with the line editor; `zle-keymap-select` changes the
|
||||
cursor shape then the mode is changed; `zle-line-init` changes the shape
|
||||
starting editing a new command; and `zle-line-finish` resets the cursor shape
|
||||
when the line edit is complete.
|
||||
|
||||
#### `vicmd` Mode
|
||||
|
||||
Undo and repo and enabled using `u` and `U`. Showing help for the command under
|
||||
@@ -127,4 +142,6 @@ Various aliases are defined at the end of [zshrc](zshrc) for convenience.
|
||||
[syntax]: https://github.com/zsh-users/zsh-syntax-highlighting
|
||||
[search]: https://github.com/zsh-users/zsh-history-substring-search
|
||||
[vim-mode]: https://github.com/sharat87/zsh-vim-mode
|
||||
[tmux]: https://tmux.github.io
|
||||
[iterm2]: https://www.iterm2.com
|
||||
[vim]: http://www.vim.org/
|
||||
|
||||
Reference in New Issue
Block a user