I am trying to create a text object for consecutive lower-case letters.
Here is how I am setting up the inner text object:
xnoremap in :<C-u>normal! ?[^a-z]?e+1<CR>v/[^a-z]/s-1<CR>
onoremap in :normal vin<CR>
The following shows what happens when I type vin
:
[text] some important text
[cursor] |
[expected selection] ^^^^^^^^^
[actual selection] ^^^^
I then tried the following with the same text and cursor position:
v:<C-u>normal! ?i
The cursor didn't move. I expected it to.
Searching forward doesn't work either:
v:<C-u>normal! /t
However all these work:
v:<C-u>normal! b
v:<C-u>normal! e
v:<C-u>normal! Fi
v:<C-u>normal! ft
How can I solve this?