Skip to content

Add send: vichangemode to reedline config - #16327

Merged
sholderbach merged 1 commit into
nushell:mainfrom
sholderbach:allow-vimode-rebinding
Aug 3, 2025
Merged

sholderbach merged 1 commit into
nushell:mainfrom
sholderbach:allow-vimode-rebinding

Conversation

@sholderbach

@sholderbach sholderbach commented Aug 2, 2025 •

Copy link
Copy Markdown
Member

Description

Allows custom bindings (non-chord) to send a edit_mode: vi mode change
via the new ReedlineEvent::ViChangeMode
Takes nushell/reedline#932

Release notes summary - What our users need to know

New keybinding: vichangemode

You can now set bindings which change the Vi mode.
To do so send a vichangemode event with the mode field to set normal, insert, or visual

$env.config.keybindings ++=
	[{
	    name: modechangetest
	    modifier: control
	    keycode: "char_["
	    mode: [vi_normal, vi_insert]
	    event: {send: vichangemode, mode: normal}
	}]

The available modifiers and keycodes, remain limited to single character bindings with modifiers. We don't yet provide access to the key-chord parsing of the vi mode.

Allows custom bindings (non-chord) to send a `edit_mode: vi` mode change
via the new `ReedlineEvent::ViChangeMode`
Takes nushell/reedline#932
@sholderbach sholderbach added A:configuration Issue related to nu's configuration notes:mention Noted in "Hall of Fame" section labels Aug 2, 2025
@bonofiglio

Copy link
Copy Markdown

Hey! Sorry I didn't see the merge on reedline's repo until now. Thanks a lot for taking care of this yourself!

@sholderbach
sholderbach merged commit dfbd980 into nushell:main Aug 3, 2025
@github-actions github-actions Bot added this to the v0.107.0 milestone Aug 3, 2025
@sholderbach

Copy link
Copy Markdown
Member Author

No worries, got asked on Discord when that feature would be coming so I quickly merged that in.

@sholderbach
sholderbach deleted the allow-vimode-rebinding branch August 3, 2025 12:52
@132ikl 132ikl removed the notes:mention Noted in "Hall of Fame" section label Aug 19, 2025
@sholderbach sholderbach added notes:ready Indicates Ready for Release notes notes:additions Noted in "Additions" section labels Aug 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A:configuration Issue related to nu's configuration notes:additions Noted in "Additions" section notes:ready Indicates Ready for Release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants