mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-25 18:03:37 +08:00
Default Vi cursor shapes for insert/replace mode
Some checks are pending
make test / ubuntu (push) Waiting to run
make test / ubuntu-32bit-static-pcre2 (push) Waiting to run
make test / ubuntu-asan (push) Waiting to run
make test / macos (push) Waiting to run
Rust checks / clippy (push) Waiting to run
Rust checks / rustfmt (push) Waiting to run
Some checks are pending
make test / ubuntu (push) Waiting to run
make test / ubuntu-32bit-static-pcre2 (push) Waiting to run
make test / ubuntu-asan (push) Waiting to run
make test / macos (push) Waiting to run
Rust checks / clippy (push) Waiting to run
Rust checks / rustfmt (push) Waiting to run
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
|
@ -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`).
|
- ``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.
|
- 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.
|
- 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`).
|
- 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.
|
- 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`).
|
- 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
|
function __fish_vi_cursor --argument-names varname
|
||||||
if not set -q $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
|
end
|
||||||
__fish_cursor_xterm $$varname
|
__fish_cursor_xterm $$varname
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user