Default Vi cursor shapes for insert/replace mode

Let's provide a sensible default here. Use a line for "insert" and an
underline for "replace_one" mode.  Neovim does the same, it feels pretty
slick.

As mentioned in #10806
This commit is contained in:
Johannes Altmanninger
2024-10-26 07:01:00 +02:00
parent 5760a1afcf
commit 9ef76860e6
2 changed files with 10 additions and 1 deletions

View File

@@ -9,7 +9,15 @@ function fish_vi_cursor -d 'Set cursor shape for different vi modes'
function __fish_vi_cursor --argument-names varname
if not set -q $varname
set varname fish_cursor_unknown
switch $varname
case fish_cursor_insert
__fish_cursor_xterm line
case fish_cursor_replace_one fish_cursor_replace
__fish_cursor_xterm underscore
case '*'
__fish_cursor_xterm $fish_cursor_unknown
end
return
end
__fish_cursor_xterm $$varname
end