Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
79980b00
Commit
79980b00
authored
Jan 04, 2021
by
Marc Cornellà
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(vi-mode): hide cursor-change logic behind `VI_MODE_SET_CURSOR` setting
Fixes #9570
parent
94ce46d4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
2 deletions
+17
-2
README.md
plugins/vi-mode/README.md
+7
-0
vi-mode.plugin.zsh
plugins/vi-mode/vi-mode.plugin.zsh
+10
-2
No files found.
plugins/vi-mode/README.md
View file @
79980b00
...
...
@@ -22,6 +22,13 @@ plugins=(... vi-mode)
The default value is
unset
, unless
`
vi_mode_prompt_info
`
is used,
in
which
case
it
'll
automatically be set to `true`.
- `VI_MODE_SET_CURSOR`: controls whether the cursor style is changed when switching
to a different input mode. Set it to `true` to enable it (default: unset):
```zsh
VI_MODE_SET_CURSOR=true
```
- `MODE_INDICATOR`: controls the string displayed when the shell is in normal mode.
See [Mode indicator](#mode-indicator) for details.
...
...
plugins/vi-mode/vi-mode.plugin.zsh
View file @
79980b00
...
...
@@ -4,13 +4,21 @@
# This is especially true if the prompt does things like checking git status.
#
# Set to "true" to force the prompt to reset on each mode change.
#
Set to "false" to force the prompt *not* to reset on each mode chang
e.
#
Unset or set to any other value to do the opposit
e.
#
#
(The default is not to reset, unless we're showing the mode in RPS1)
.
#
The default is not to reset, unless we're showing the mode in RPS1
.
typeset
-g
VI_MODE_RESET_PROMPT_ON_MODE_CHANGE
# Control whether to change the cursor style on mode change.
#
# Set to "true" to change the cursor on each mode change.
# Unset or set to any other value to do the opposite.
typeset
-g
VI_MODE_SET_CURSOR
typeset
-g
VI_KEYMAP
=
main
function
_vi-mode-set-cursor-shape-for-keymap
()
{
[[
"
$VI_MODE_SET_CURSOR
"
=
true
]]
||
return
# https://vt100.net/docs/vt510-rm/DECSCUSR
local
_shape
=
0
case
"
${
1
:-${
VI_KEYMAP
:-
main
}}
"
in
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment