-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handling startpos == endpos (a.k.a an empty selection, not 0) #36
Comments
There is no way to target an empty region in Vim script, as far as I know. So that you have to make a patch to Vim to provide this functionality before tweaking vim-textobj-user. |
Additionally, if you specify the same position for both start and end positions, it means a region which consists of only one character, not an empty region. |
Theoretically, it seems to be possible to target an empty region by selecting a character in Visual mode with |
If you highlight the left bracket in
hello []
and typeci[
, the inside of the brackets will be selected to start replacing which is the default text object. As far as I can tell, there is no way of indicating this behavior using the plugin. Is there something I missed, or should I look to try to modify textobj-user, and if so, do you have a suggestion where to start?The text was updated successfully, but these errors were encountered: