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
I wanted to add a text object to match numbers with an optional decimal part, (eg 123 and 123.23). It seemed to work nicely, untill I found out that for certain use cases the pattern matching matches lots of extra, non-digit characters in order to find a match. If I test the pattern with a normal / search, I get the desired result.
I tested by launching vim as vim -u NONE, setting rpt+=~/.vim/bundle/vim-textobj-user, and souring the above code.
Then, for a test file like
2abc
2. abc2232
Then, by pressing either vin or van:
I get match from the first to the second number 2 if I place the cursor in front of the second number 2.
I also get a match from the second number 2 to the end if I place the cursor on the second number two.
That is, I get these matches:
<2abc
2>
and
2abc
<2. abc2232>
My current vim version is 7.4.473.
I should also add that I am new to textobj-user.
The text was updated successfully, but these errors were encountered:
I wanted to add a text object to match numbers with an optional decimal part, (eg 123 and 123.23). It seemed to work nicely, untill I found out that for certain use cases the pattern matching matches lots of extra, non-digit characters in order to find a match. If I test the pattern with a normal / search, I get the desired result.
I tested by launching vim as vim -u NONE, setting rpt+=~/.vim/bundle/vim-textobj-user, and souring the above code.
Then, for a test file like
Then, by pressing either vin or van:
I get match from the first to the second number 2 if I place the cursor in front of the second number 2.
I also get a match from the second number 2 to the end if I place the cursor on the second number two.
That is, I get these matches:
and
My current vim version is 7.4.473.
I should also add that I am new to textobj-user.
The text was updated successfully, but these errors were encountered: