Closed goyalyashpal closed 6 months ago
I'm not sure we get enough events from crossterm to implement this: alt and shift are both modifiers so I don't think we get a KeyEvent for them being pressed/held in conjunction
I don't think neovim has this shortcut either? It does have ctrl-[
which works because it gets interpreted as Escape, similar to how ctrl-i
gets interpreted as Tab.
I don't think neovim has this shortcut either
umh, maybe it just uses alt for that.
anyways, the instance is that: inside nvim, say i am in edit mode, then either i do: esc
> β;
(i.e. :
) or i do alt + β;
both have same effect of landing me to the command mode
i have added my clarifications in the description, sorry for the confusion created earlier.
offtopic Prasies:
[
or ]
)self hiding as outdated
ping
Please don't ping :)
The keys in the description can be bound with config:
# ~/.config/helix/config.toml
[keys.insert]
"A-:" = "command_mode"
"A-0" = "goto_line_start"
"A-$" = "goto_line_end"
self hiding as outdated
Please don't ping :)
umh, sorry, what?
This is the keymap I use most to move the cursor position in edit mode.
Refer/quote: User Input (GNU Emacs Manual) - list/bulleting is mine:
- You can also type Meta characters using two-character sequences starting with
ESC
(highlighted link).- Thus, you can enter
M-a
by typingESC a
.- You can enter
C-M-a
(holding down bothCtrl
andAlt
, then pressinga
) by typingESC C-a
.- Unlike
Meta
,ESC
is entered as a separate character. You donβt hold downESC
while typing the next character; instead, pressESC
and release it, then enter the next character.- This feature is useful on certain text terminals where the
Meta
key does not function reliably.
The keys in the description can be bound with config: - @ the-mikedavis https://github.com/helix-editor/helix/issues/3162#issuecomment-1287805037
# ~/.config/helix/config.toml
[keys.insert]
"A-:" = "command_mode"
is there some way for me to set this "Meta character/modifier" scheme as a substitute for all the two-character sequences starting with ESC, or will I have to add the shortcuts in the configuration for every one of them??
self hiding as offtopic
Update: 2023.01.12: Reference:
These "3 escapes" refer to:
esc
,
or keep_primary_selection
only;
or collapse_selection
onto a single cursor/characterNote to self:
Defaults are good; don't follow that suggestion,
precisely as the navigation (say by wb
- word/back) causes selection too.
In suggestion, deselection will close multicursors too
so, requires two separate habits: esc
and ,
/;
for same 2/3 behaviour
I don't think neovim has this shortcut either?
- @ sudo rm rf bin at https://github.com/helix-editor/helix/issues/3162#issuecomment-1195149552
aah yes, found it:
1. Special keys *ins-special-keys*
... MORE ...
char action ~
-----------------------------------------------------------------------
... MORE ...
*i_META* *i_ALT*
ALT (|META|) may act like <Esc> if the chord is not mapped.
For example <A-x> acts like <Esc>x if <A-x> does not have an
insert-mode mapping.
ALT (META) key-chords always work in Nvim
...
Nvim 0.3 mimics the Vim behavior while still fully supporting ALT mappings. See `:help i_ALT`.
third reference: Iterm2 (again, found from helix documentaion itself)
Ensure that you have mapped the Option key to
ESC+
... - https://github.com/helix-editor/helix/wiki/FAQ#alt--key-combinations-do-not-work-on-macos-iterm2Q: How do I make the option/alt key act like Meta or send escape codes? A: For most users, Esc+ will be the best choice. - iterm2.com/faq
hey helix team members! can you please add just this one feature?? i humbly request you to please consider this π’
this is like the only thing stopping me from using helix - rest everything can be overlooked one time or the other; but this - switching mode - is as fundamentally repeating operation as any manual interaction in helix can get;
easing that operation would make a huuge difference
you can map this if you want but we are not going to change the default mapping
Details
alt
+key
or sayAlt-<key>
in insert mode should perform theesc
>key
or sayEsc <key>
i.e.esc
to exit, thenkey
alt
+key
"does not have an insert-mode mapping."nvim
:esc
> colon (shift
+semicolon
)alt
+ colonesc
>0
alt
+0
esc
> $ (shift
+4
)alt
+ $Reference:
Question for achieving this via config: https://github.com/helix-editor/helix/issues/3162#issuecomment-1339666582
Quoting/citations for this behaviour from other editors
Title and Summaries:
alternate rephrasals of the issue: