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
When defining text objects with regex it is not possible to match an empty inner object.
Example
I define a custom math text object for LaTeX $x$.
If I type ci$ I end having $$, so far so good, but if I want to get into the object, and type ci$ again I would expect nothing to change and the cursor to place into $$, just like it works for () [] {} and other native stuff.
This is probably a limitation of Vim's regexes. I think that you can define dedicated function for all the possible movements, but that would be a real hassle (like, define di$ to first check if it is empty, then do other stuff. Repeat for di$, yi$, vi$, etc...)
The text was updated successfully, but these errors were encountered:
When defining text objects with regex it is not possible to match an empty inner object.
Example
I define a custom math text object for LaTeX
$x$
.If I type
ci$
I end having$$
, so far so good, but if I want to get into the object, and typeci$
again I would expect nothing to change and the cursor to place into$$
, just like it works for() [] {}
and other native stuff.This is probably a limitation of Vim's regexes. I think that you can define dedicated function for all the possible movements, but that would be a real hassle (like, define
di$
to first check if it is empty, then do other stuff. Repeat fordi$
,yi$
,vi$
, etc...)The text was updated successfully, but these errors were encountered: