cantino / mcfly

Fly through your shell history. Great Scott!
MIT License
6.87k stars 177 forks source link

Vim key scheme - Insert mode by default? #110

Closed rrichardson closed 3 years ago

rrichardson commented 3 years ago

I am really enjoying mcfly.

I have been using the vim edit mode, but there is one bit that I have yet to get used to:

After hitting ctrl-r and getting to the mcfly input screen, I have to press i to enter insert mode before typing my search query.
I can never remember to hit i first, so it is a frustrating experience. I can't think of a scenario where someone wouldn't want to just start off in insert mode, so could it be made to be the default?

Thanks.

cantino commented 3 years ago

I didn't implement vim mode, so I'm not sure. @JamJar00, do you have an opinion?

JamJar00 commented 3 years ago

This has actualy been annoying me recently now I'm back using the Vim scheme.

Starting in normal mode works fine when you have text already typed (e.g. psql^Rjjj<enter>) but isn't great if you're starting from an empty buffer (e.g. ^Rpsqljjj<enter>).

I wonder if an empty buffer should start it in insert mode and a filled buffer should start in normal mode? Could break out another variable to select this behaviour?

cantino commented 3 years ago

Probably best to avoid adding another setting. It seems like it could just start in insert mode always?

JamJar00 commented 3 years ago

The only time I see it being annoying is if you've already typed something and just want to scroll down the list, but that's probably not my majority use case personally.

This should be a pretty simple change to the default value here if we just want to fix it to always open in insert mode.

cantino commented 3 years ago

I'm open to this change.