-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vi mode: Introduce alternate escape sequence for insert mode #670
base: main
Are you sure you want to change the base?
Conversation
…rt mode (e.g. press "jk" to exit insert mode)
Addressing: #499 |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #670 +/- ##
==========================================
- Coverage 49.19% 49.12% -0.07%
==========================================
Files 46 46
Lines 7930 7959 +29
==========================================
+ Hits 3901 3910 +9
- Misses 4029 4049 +20
|
Actually all other major vi modes (vim, bash, zsh) uses Meta (Alt) + whatever for entering normal mode. If you get used to it, it's indispensable, but reedline is the only one that doesn't support that... |
Can we use |
@tamlok |
Is this exposed so that one can define what they like in the nushell config.nu keybindings section? |
I believe the If this PR is approved, I will write an accompanying |
yes, of course. What I'm saying is will there be some way to define it in the keybinings section like this below but changed somehow to allow for other key combinations to be used for
|
Ah, I see what you mean. Currently, on the
This means the user can press "x" then "y" to exit insert-mode. (Passing I was thinking of implementing the
Achieving this with the existing |
any news? |
this is one of the first settings I tweak in neovim and also zsh vim mode... |
Hi any news on this? |
It seems that this PR may be blocked pending some design decisions. I've opened issue #853 in an attempt to move discussion forward. |
This PR introduces a new argument to the
Vi::new
constructor: thealternate_esc_seq
. When set to(KeyCode::Null, KeyCode::Null)
, this does nothing.alternate_esc_seq
can be set to something like(KeyCode::Char('j'), KeyCode::Char('k'))
-- allowing the user to press "jk" (without modifiers) to move from Vi insert mode to Vi normal mode.I wrote this because I would love to be able to use "jj" to enter normal mode in Nu (like I do for all other similar vi-modes).
(I am very new to Rust, Nu, and Reedline; if something is non-idiomatic, please tell me!)