sshilovsky / fish-helix

helix key bindings for fish
The Unlicense
13 stars 1 forks source link

Latest fish master might make commandline sequencing easier #6

Open krobelus opened 6 months ago

krobelus commented 6 months ago

Latest fish master includes c3cd68dda (Process shell commands from bindings like regular char events, 2024-03-02) a583fe723 ("commandline -f foo" to skip queue and execute immediately, 2024-04-08) which should make the execution order more natural. This should address the note in the readme

The second commit means that commandline synchronizes properly. I wonder if that breaks/improves anything; tests seem to pass still. The selection update after history search seems to be broken, I'll try to investigate. nevermind that also happens on 3.7.1

Overall this project is impressive. One thing that seems missing is an insert-mode way to accept autosuggestions. (I'm not sure if I'd use it, I'm used to kakoune bindings)

krobelus commented 6 months ago

there are also a bunch of improvements to Vi mode (see CHANGELOG.rst) that might benefit fish-helix. Maybe you want to do set fish_cursor_end_mode inclusive to make sure that the cursor never selects the one-paste-last character. For Vi mode this improves autosuggestion behavior (for commands like $. incidentally I'm not sure how to go to the beginning/end of line with fish_helix_key_bindings. x is missing I think)

I think we'll still need some changes to fish to make it easier to write such bindings. But such changes should be easy and not contentious

sshilovsky commented 6 months ago

@krobelus Thanks for the info and for the feedback!

x is missing, it's also number one on my wishlist, but I seem to never get to it :( Alt+E calls external editor, and it seems enough for rare cases.

You can accept autosuggestions in insert mode with Right Arrow key: many default fish bindings are still in place

krobelus commented 6 months ago

Completely untested but I think for the one-line case, x should be easy to implement with something like commandline -f beginning-of-line begin-selection end-of-line... not sure

Yeah right arrow should work for me, just would need to change habits (except on keyboards where it's not so easy to reach)

I also use alt-e a lot, it even synchronizes the cursor position now though only for Vim/Kakoune