-
Notifications
You must be signed in to change notification settings - Fork 164
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 seems incomplete #621
Comments
mabye these keybindings are common knowledge to most people but for me, it would be good to have a description of what you're requesting other than just having keybindings by name. what do you want them to do? Also, have you tried defining them yourself? keybindings are pretty powerful in nushell these days. https://www.nushell.sh/book/line_editor.html#default-keybindings |
All these were working until I updated today, now I feel like I'm disabled without my shortcuts :p Also thank you very much for this great product. |
u don't use vim? |
I haven't included any of @matiu3 's suggestions do avoid duplication but they are just as important. Also, I'm not sure if it's possible to implement |
I think, as things are, one would need to manually add all these to Perhaps an easier solution would be to make it possible to swap out Or is it possible for us users to manually program these into the config file ? I get the feeling it's not that fine grained. If it is, please get us started and we can collaborate in filling it in. |
Can you please tell me how to use multiple edits? {
name: clear_line
modifier: shift
keycode: char_c
mode: vi_normal
event: {
edit: cleartolineend
}
} In the above keybinding I'm in normal mode and then I clear to the end of the line, now I want to switch to insert mode. How do I do that? Most of the bindings I need can be made if you just let me know how to switch between normal & insert modes while configuring a binding. Or maybe paste the configuration for |
never.
Have you tried adding multiple if you do most all of the vi stuff is defined here https://github.com/nushell/reedline/tree/main/src/edit_mode/vi |
I've gone through the docs and also adding multiple edit statements including |
Let's work on a single binding first as an example: {
name: prepend
modifier: shift
keycode: char_i
mode: vi_normal # Options: emacs vi_normal vi_insert
event:[
{ edit: MoveToLineStart }
{ edit: InsertString,
value: "" }
]
}
} Right now this only half works. It takes me to the start of the line but doesn't drop me into insert mode, not even |
@sholderbach also understands the vi configuation too. He may be able to help also. |
The command parser for the typical vi sequences is hand built at the moment and not amenable to configurable keybindings yet. Only ctrl sequences are handled by the configurable keyparser used with emacs style mode. |
Hey, @sholderbach I was just taking a look at the reedline's source code. I'm still a rust beginner but looking at the source code I wondered why some of the bindings are missing or why they haven't been implemented and maybe there's a way to quickly implement them. |
I think there is one extra step, to make sure it switches into insert mode but I am happy to walk you through a PR. Thanks for giving it a shot! |
Hey @fdncred , Is it possible to make this binding in |
Ctrl bindings should be possible |
I will close this issue once 'x', 'w' & 's' are fixed and 'e', '?', 'S', 'r', 'R', 'y', 'around' & 'inside' are implemented. |
Many vim users (myself included) rebind |
keyboard chords are not currently supported in reedline, although we'd love to support them. |
The vi editing modes are the last thing for me to more extensively try out nushell, otherwise the other parts feel very nice to me. Basically I would love to see the vi editing mode to be on par with
I would love to make these changes myself or at least dig into what the problems are, but unfortunately I won't have much free time for quite a while 😢 |
Related problem
Many vim bindings don't work. I come from fish where setting vi mode enables most of the necessary vim shortcuts but seems like
Shift+c
&Shift+s
don't work. I'm not sure what else doesn't work because switched to nu just a few minutes ago.Describe the solution you'd like
Add
Shift+c
&Shift+s
bindings. Also add a vim section in the documentation. Is there a way to modify vim bindings?Also, I think
Ctrl+f
is a nice binding to accept entire completion but there should be aCtrl+w
binding to accept only a single word completion.Describe alternatives you've considered
No response
Additional context and details
No response
The text was updated successfully, but these errors were encountered: