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
Implement New Line (O/o - "open") in Vi-mode #7442
Comments
The basic steps are:
|
If I would like to implement |
Take a look inside fish_vi_key_bindings.fish, you can see how some other vim bindings are implemented. |
0001-vi-mode-o-and-O-commands.patch.txt All it took was repeating the beginning-of-line and end-of-line cases and adding a newline character afterwards. |
This is for symmetry with insert_line_under. See #7442.
Thank you, merged as 2d2efc8. Though I accidentally gave credit in the commit to the bug filer joallard, instead of @reach-satori - sorry about that! |
One of my commands in Vi is 'open': quite practical, it inserts a new line below or above the current cursor, and starts insert mode there.
This is an enhancement ticket to track this feature.
Quoting the Vim docs:
Current workaround: Alt+Enter. Not bad! Though it splits at current cursor position.
Equivalent commands:
o
:A<Enter>
,O
:I<Enter><Up>
I'm not much familiar with Fish source, does someone know what implementing this would entail? Unless I'm mistaken, it doesn't sound too complex.
[enhancement] [vi-mode]
The text was updated successfully, but these errors were encountered: