You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a proposal for Helix to improve its ergonomics.
Comparing Helix to VSCode experience in term of prompt, it lacks of explicitly display and change options. At least the built-in doesn't let us setting and showing prompt options. Options are for example, case sensitivity of the query, path to filter, regex mode, etc.
As you can see, Helix use typing %path as a way to filter file path. Also, toggling the regex must be executed (by keymap or edit the config) before any search. This is against intuitiveness that similarly achieved by selection-first principle.
Prompt Mode
Like Emacs/Vim, prompt mode is an insert mode by default: typing is edit and all keymap must be prefixed with modifier. I thought that all dialogs and prompts should be this way.
The next steps, is to define some keymap for setting up options. For example in "search on the selection" prompt, pressing ctrl+r will toggle regex mode, ctrl+i toggles case.
After that, displaying the state of the options on the input as simple as foreground/background color switch. The prompt would look somewhat like this: ____________ [r][i].
Option with secondary prompt
For the %path scenario, this is an option that needs input. For this case, keymap also can be employed. But then, the textbox prompt will become the input of %path. An enter will takes back into the main prompt. As a bonus, writing up path prompt will be apparent in the main prompt like when the regex and case toggled: _________[r][i][p].
State saving
This prompt options can be saved and the next prompt will no need to configure the options again. This can be per file basis or with some sort of rule. Also, reverting the prompt options is as easy as a keymap press.
Keymap config and impl details
Although, currently, no way for Helix to configure prompt keymap, I will go as far as this. A dialog or prompt is something that identifiable: file search, search buffer, search selected, search global. This dialog type is then to be referenced on config. Each of them has its own defined options or command. Furthermore, dialog type can be implemented in plugin when the system arrived.
Normal mode switch
A secret hope that this prompt mode can have normal mode for navigating right/left, delete word, and etc. Oftentimes, it is faster by clearing the prompt and rewrite. So, normal mode switch can be done using modifier too.
Thanks for reading until this part and forgive me for my ignorance of something already implemented, differently implemented, or conflicting with Helix team vision.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I have a proposal for Helix to improve its ergonomics.
Comparing Helix to VSCode experience in term of prompt, it lacks of explicitly display and change options. At least the built-in doesn't let us setting and showing prompt options. Options are for example, case sensitivity of the query, path to filter, regex mode, etc.
As you can see, Helix use typing
%pathas a way to filter file path. Also, toggling the regex must be executed (by keymap or edit the config) before any search. This is against intuitiveness that similarly achieved by selection-first principle.Prompt Mode
Like Emacs/Vim, prompt mode is an insert mode by default: typing is edit and all keymap must be prefixed with modifier. I thought that all dialogs and prompts should be this way.
The next steps, is to define some keymap for setting up options. For example in "search on the selection" prompt, pressing
ctrl+rwill toggle regex mode,ctrl+itoggles case.After that, displaying the state of the options on the input as simple as foreground/background color switch. The prompt would look somewhat like this:
____________ [r][i].Option with secondary prompt
For the
%pathscenario, this is an option that needs input. For this case, keymap also can be employed. But then, the textbox prompt will become the input of%path. An enter will takes back into the main prompt. As a bonus, writing up path prompt will be apparent in the main prompt like when the regex and case toggled:_________[r][i][p].State saving
This prompt options can be saved and the next prompt will no need to configure the options again. This can be per file basis or with some sort of rule. Also, reverting the prompt options is as easy as a keymap press.
Keymap config and impl details
Although, currently, no way for Helix to configure prompt keymap, I will go as far as this. A dialog or prompt is something that identifiable: file search, search buffer, search selected, search global. This dialog type is then to be referenced on config. Each of them has its own defined options or command. Furthermore, dialog type can be implemented in plugin when the system arrived.
Normal mode switch
A secret hope that this prompt mode can have normal mode for navigating right/left, delete word, and etc. Oftentimes, it is faster by clearing the prompt and rewrite. So, normal mode switch can be done using modifier too.
Thanks for reading until this part and forgive me for my ignorance of something already implemented, differently implemented, or conflicting with Helix team vision.
Beta Was this translation helpful? Give feedback.
All reactions