-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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" mod key in insert mode #1064
Comments
I don't know about others but I personally like alt keymaps, and don't really find it as much of a hassle to repeatedly switch between normal and insert mode; but this is such a big change that I don't think the classic "make it configurable" would be much of an option… |
After some consideration, I decided to scrap this idea because user could already achieved this by manually remapping even though it took a lot for work. On the bright side, because Helix using |
|
|
We often find ourself want to insert a few characters then quickly moving/editing around over and over... which we have to exhaustingly pressing i...Esc, i...Esc, i...Esc, ...
Both Vim and Kakoune address this issue have a key to escape to normal mode for a single command in insert mode:
From Kakoune keys doc:
This approach doesn't improve anything because it's still required 2 keys press ([ Alt + ;, cmd ] vs [ Esc, cmd, i ]) only escape to normal mode for a single command. This is helpless when i just want to move to the right 2-3 characters.
Therefore i suggesting a solution that i have been using at my Vim, Kakoune, Emacs (lost config) nearly-every-keys-remap and really like it:
The simple solution it's having Alt as a "Normal" mod key in insert mode, user can holding it to access normal mode's commands ([ Alt + cmd ]).
The "Normal" mod key can be config to any mod keys: Alt, Ctrl, Shift (?!), Super, Meta, ... (List of mod keys) This is for the GUI Helix #39 's user who want to config every keys...
Yes, i know as mentioned in keymap brainstorm wiki:
But in this case:
Example
Cursor at beginning of file, fixing from this:
to this:
This is just a small example, but if we're in a bigger scale situation, the keys press will add up.
The normal mod key is the most elegant approach.
Not to mention:
Accessibility
Many people just want to find a good terminal-based text editor but doesn't want to be forced using a module workflow of people want to get used to module workflow without feel so confused...
With this feature, user can mimic the non-module workflow by set insert as defaults mode (some how) then use the normal mod key for (as the noob usually call) shortcuts, Helix then slowly but surely introduced them to the amazing module workflow.
And also solved #334.
Support prompt mode as well
The current prompt's keymap is nothing like normal mode:
A "Normal" mod key in prompt mode would make the keymap consistent across all mode. Of course many keys that are too complex or lack of practicality will do nothing, any keys that prompt user will do nothing or just switch the current prompt to that prompt instead (A-/ in command mode prompt is equivalent to Esc/ which switch to search prompt).
Drawback
As many can point out: commands map with Alt won't be able to access via normal mod key. We can improve this by remap all defaults Alt-based commands to other keys which i have attempt here.
The text was updated successfully, but these errors were encountered: