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
Take this code: principal: EntityUid, #[default(entity_id("Action", "test-action"))] action: EntityUid that's in the middle of a larger line. My cursor is at p and I want to delete the macro.
First, I need to jump to the #. I can do that with f#;. Unlike Vim, I need an extra keystroke to clear the selection before starting a new selection. Next, I need to press vta then repeatedly press Alt-. There's a risk of overshooting, and I don't see a way to undo this, so I opened #12877.
The other option is to use gw, but using it, waiting for the suggestions to come up, and then reading the label is slow (in the same line). Also, gw would land my cursor at the end of action, so that means more keystrokes. For traversing in the same line, I prefer pressing w repeatedly.
I'm proposing a goto_character option inside the goto menu. It will allow you to press two characters to go to unlike f and ts one character. It should also work with Alt-..
Like other goto macros, it won't drag the selection with it unless you're in selection mode. Instead, it will select the two characters. With this, the above sequence becomes (I'm binding goto_character to c) gc#[vgc] d. Personally, I'd actually like to bind it to v since c is taken (I didn't use it for the example since there's another v in there).
Alternatively, you could make a key in normal mode that drags the selection, just like f that selects on two characters. I prefer something in the goto menu it eliminates the keystroke to clear the character when starting at #. Either way, you have to press v at the start of the selection because you might hit something incorrect that matches your two character pattern until #8761 is fixed.
The text was updated successfully, but these errors were encountered:
So essentially what you are proposing is 2-character alternatives to f, and F (that create a new selection instead of dragging)?
I think that's a good idea. Instead of calling it goto_character (which is misleading since chars have length 1 and this is 2 chars) we could call it find_next_char_pair or something like that. Then in terms of keybindings, unsure. Ideally we pick a keybinding that is a mnemonic and makes sense (e.g. don't put it on <C-w>)
This is coming from this post: https://www.reddit.com/r/HelixEditor/comments/1ipjmxx/best_way_to_extend_selection_to_character/
Take this code:
principal: EntityUid, #[default(entity_id("Action", "test-action"))] action: EntityUid
that's in the middle of a larger line. My cursor is atp
and I want to delete the macro.First, I need to jump to the
#
. I can do that withf#;
. Unlike Vim, I need an extra keystroke to clear the selection before starting a new selection. Next, I need to pressvta
then repeatedly pressAlt-.
There's a risk of overshooting, and I don't see a way to undo this, so I opened #12877.The other option is to use
gw
, but using it, waiting for the suggestions to come up, and then reading the label is slow (in the same line). Also,gw
would land my cursor at the end of action, so that means more keystrokes. For traversing in the same line, I prefer pressing w repeatedly.I'm proposing a
goto_character
option inside the goto menu. It will allow you to press two characters to go to unlikef
andt
s one character. It should also work withAlt-.
.Like other goto macros, it won't drag the selection with it unless you're in selection mode. Instead, it will select the two characters. With this, the above sequence becomes (I'm binding
goto_character
toc
)gc#[vgc] d
. Personally, I'd actually like to bind it tov
sincec
is taken (I didn't use it for the example since there's anotherv
in there).Alternatively, you could make a key in normal mode that drags the selection, just like
f
that selects on two characters. I prefer something in the goto menu it eliminates the keystroke to clear the character when starting at#
. Either way, you have to pressv
at the start of the selection because you might hit something incorrect that matches your two character pattern until #8761 is fixed.The text was updated successfully, but these errors were encountered: