Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Normal mode in file and buffer picker #2820

Closed
txtyash opened this issue Jun 19, 2022 · 7 comments
Closed

Normal mode in file and buffer picker #2820

txtyash opened this issue Jun 19, 2022 · 7 comments
Labels
C-enhancement Category: Improvements

Comments

@txtyash
Copy link
Contributor

txtyash commented Jun 19, 2022

Add normal mode in file picker or buffer picker & also make it the default
mode in buffer picker. This way navigation will be easier with j,k and in
buffer picker it is more likely to be a faster way.

@txtyash txtyash added the C-enhancement Category: Improvements label Jun 19, 2022
@EpocSquadron
Copy link
Contributor

This starts to get tricky to implement, and breaks the pattern of using readline like bindings when in prompts, as is default in most shells. On the other hand, there's been discussion of removing a lot of the readline/emacs bindings in insert mode to encourage modal mindset. I think I'd be in support of this if it were implemented well.

@n0s4
Copy link
Contributor

n0s4 commented Jun 19, 2022

Most of the big advantages normal mode has are to do with multiple lines and multiple cursors. Normal mode for single line command prompt seems overkill as you're practically never going to need it, so wouldn't be significantly faster in reality.

j/k to scroll the menus does sound nice, if people think it would be worth implementing for that alone. We could even go farther and have bindings like d in the buffer picker to close a buffer, stuff like that, but of course that would likely require a fairly big rework.

@EpocSquadron
Copy link
Contributor

There is some precedent as zsh's readline implementation supports setting to vi-mode instead of emacs. It does however start in insert mode and require you to press escape to get to normal. You're right that a lot of the normal mode power in helix wouldn't carry over, it makes more sense when its vim you're implementing. Some subset might still be worth looking into though.

@rsHalford
Copy link

My go to for insert mode line scrolling is to always bind to Ctrl-j/k. Using Ctrl-p/n in vim has never seemed to click for me. However, I imagine this would just be something to wait on with picker mode remapping?

@the-mikedavis
Copy link
Member

Yep that would more likely fall under #2757

@premell
Copy link

premell commented Jun 23, 2022

I find it almost a bit claustrophobic that you cant select the text in the file picker. Quite often i write something I want to search for, then I want to copy the same string. However that is not possible in the current picker. On the other hand, it is nice that the picker closes with just one q press instead of two.

I think I would prefer normal mode though

@jfaz13
Copy link

jfaz13 commented Sep 3, 2022

Honestly I think something that would work is adding shortcuts to open files in the buffer picker faster. Right now they are numbered, so you can do e.g. 5 + enter and it would work, but it would be more expedient if you could just press 5 and it opens it automatically. Once you get past 9 it becomes an issue (1 vs 13), but we can just mix and match numbers and letters for ones after 9 (1a, 1b, etc). I guess a disadvantage of doing this is that you don't preview the file before opening it, but maybe that can be chorded away, or maybe if a key beforehand is pressed it'll preview before opening. Maybe instead of listing with numbers they could just start with letters for easy accessibility. Just a thought.

@helix-editor helix-editor locked and limited conversation to collaborators Apr 25, 2024
@pascalkuthe pascalkuthe converted this issue into discussion #10599 Apr 25, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
C-enhancement Category: Improvements
Projects
None yet
Development

No branches or pull requests

7 participants