Skip to content

Add more convenient key bindings for VI mode#10648

Merged
zanchey merged 1 commit into
fish-shell:masterfrom
tesuji:vi-for-Vmode
Jan 5, 2025
Merged

Add more convenient key bindings for VI mode#10648
zanchey merged 1 commit into
fish-shell:masterfrom
tesuji:vi-for-Vmode

Conversation

@tesuji

@tesuji tesuji commented Aug 3, 2024

Copy link
Copy Markdown
Contributor

To make it more familiar to vi/vim users.

In all mode, ctrl-k is bind to kill-line.

In Vi visual mode:

  • press v or i turn into normal or insert mode respectively.
  • press I turn to insert mode and move the cursor to beginning of line.
  • because fish doesn't have upcase/locase-selection, and most people reach for g-U rather than g-u, g-U binds to togglecase-selection temporarily.

TODOs:

  • Changes to fish usage are reflected in user documentation/manpages.
  • Tests have been added for regressions fixed
  • User-visible changes noted in CHANGELOG.rst

To make it more familiar to vi/vim users.

In all mode, ctrl-k is bind to kill-line.

In Vi visual mode:
* press v or i turn into normal or insert mode respectively.
* press I turn to insert mode and move the cursor to beginning of line.
* because fish doesn't have upcase/locase-selection, and most people reach for
  g-U rather than g-u, g-U binds to togglecase-selection temporarily.
@zanchey zanchey self-assigned this Jan 4, 2025
@zanchey zanchey added the vi-mode label Jan 4, 2025
@zanchey zanchey added this to the fish 4.0 milestone Jan 4, 2025
@zanchey zanchey merged commit f9b7992 into fish-shell:master Jan 5, 2025
@zanchey

zanchey commented Jan 5, 2025

Copy link
Copy Markdown
Member

Finally merged - thanks, and sorry for the delay!

@tesuji tesuji deleted the vi-for-Vmode branch January 5, 2025 15:06
@faho faho modified the milestones: fish 4.0, fish 4.0-final Feb 28, 2025
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Mar 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants