Replies: 5 comments 6 replies
-
Just to let you know, my trial to create a binding for this was
|
Beta Was this translation helpful? Give feedback.
-
I would also be in favour of adding something like this, similar to the I'm going to have a crack at implementing this myself. |
Beta Was this translation helpful? Give feedback.
-
I'm confused by this - how would |
Beta Was this translation helpful? Give feedback.
-
Created an initial PR implementing finding in next character pair - I'll add to it if we can get an agreement on the approach and implementation |
Beta Was this translation helpful? Give feedback.
-
Linking this which discusses essentially the same idea but with different keys used |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I frequently find myself in the following situation:
where
|
denotes the cursor position. I want to match in next inner brackets content, that is,"collapse_selection", "keep_primary_selection"
. I am not a prohelix
user, but AFAIK you need to runf[
andmi[
in order to select it, which is not that effective.I propose to extend the match mode functionalities to cover this situation:
mf
+ any character + one of the match mode binding.find_next
command to this next character.match_brackets
,surround_add
,surround_delete
,select_textobject_around
,select_textobject_inner
,surround_replace
depending whetherm
,s
,d
,a
,i
, orr
has been selected.mF
must be considered to search for a matching before the current cursor.I tried to create a keybind in the config file for this case, but I failed. Moreover, I do think that this situation is recurrent, so other users might also get this functionality out of the box.
Finally, in my previous example,
mi[
does nothing, which is pretty stupid. I propose that, once the matching fails to find a pair, it must fallback to my proposed keybindmf[i
(ormF[i
) in order to find the next (or previous) matching.If you find
mf[i
ormF[i
too complicated for a single command, I at least propose to modify the behavior of the matching mode when it fails to find matching inner/around/whatever character. To do anything is better than to do nothing.Beta Was this translation helpful? Give feedback.
All reactions