mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
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:
parent
5760a1afcf
commit
9ef76860e6
2 changed files with 10 additions and 1 deletions
|
@ -187,6 +187,7 @@ New or improved bindings
|
|||
- ``forward-token``, ``backward-token``, ``kill-token``, and ``backward-kill-token`` are similar to the ``*-bigword`` variants but for the whole argument token which includes escaped spaces (:issue:`2014`).
|
||||
- The ``accept-autosuggestion`` special input function now returns false when there was nothing to accept.
|
||||
- Vi mode has seen some improvements but continues to suffer from the lack of people working on it.
|
||||
- New default cursor shapes for insert and replace mode.
|
||||
- Insert-mode :kbd:`ctrl-n` accepts autosuggestions (:issue:`10339`).
|
||||
- Outside insert mode, the cursor will no longer be placed beyond the last character on the commandline.
|
||||
- When the cursor is at the end of the commandline, a single :kbd:`l` will accept an autosuggestion (:issue:`10286`).
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue