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
=== BEGIN QUOTE ===
When used in Visual mode:
When start and end of the Visual area are the same (just after typing "v"):
One object is selected, the same as for using an operator.
When start and end of the Visual area are not the same:
For non-block objects the area is extended by one object or the white
space up to the next object, or both for the "a" objects. The
direction in which this happens depends on which side of the Visual
area the cursor is. For the block objects the block is extended one
level outwards.
== END QUOTE ===
This appears to be true for some text objects (e.g. word or
sentence) but not for others (e.g. tag, or paragraph).
Examples
Following command selects inner word in visual mode. It
visually selects "dom" as expected. The whole word "random"
word is not selected because start and end of visual block
are different prior to doing normal command iw (inner word):
$ echo "Just some <b>random words</b>." | vim --clean -c 'norm fdvliw' -
So far so good. But the following command visually selects the
whole tag "random words" despite start and end of visual block
being different. I would have expected it to only select "dom words"
since start/end of visual block were not identical when doing
normal command it (inner tag):
$ echo "Just some <b>random words</b>." | vim --clean -c 'norm fdvlit' -
Is this a bug? Or should the documentation be updated?
In ":help text-objects", I read:
```
=== BEGIN QUOTE ===
When used in Visual mode:
When start and end of the Visual area are the same (just after typing "v"):
One object is selected, the same as for using an operator.
When start and end of the Visual area are not the same:
For non-block objects the area is extended by one object or the white
space up to the next object, or both for the "a" objects. The
direction in which this happens depends on which side of the Visual
area the cursor is. For the block objects the block is extended one
level outwards.
== END QUOTE ===
```
This appears to be true for some text objects (e.g. word or
sentence) but not for others (e.g. tag, or paragraph).
**Examples**
Following command selects inner word in visual mode. It
visually selects "dom" as expected. The whole word "random"
word is not selected because start and end of visual block
are different prior to doing normal command iw (inner word):
```
$ echo "Just some <b>random words</b>." | vim --clean -c 'norm fdvliw' -
```
So far so good. But the following command visually selects the
whole tag "random words" despite start and end of visual block
being different. I would have expected it to only select "dom words"
since start/end of visual block were not identical when doing
normal command it (inner tag):
```
$ echo "Just some <b>random words</b>." | vim --clean -c 'norm fdvlit' -
```
Is this a bug? Or should the documentation be updated?
It can be useful to search for a text object boundary in one direction.
So I would say this is a bug. It might be a bit of work to implement
properly.
In ":help text-objects", I read:
This appears to be true for some text objects (e.g. word or
sentence) but not for others (e.g. tag, or paragraph).
Examples
Following command selects inner word in visual mode. It
visually selects "dom" as expected. The whole word "random"
word is not selected because start and end of visual block
are different prior to doing normal command iw (inner word):
So far so good. But the following command visually selects the
whole tag "random words" despite start and end of visual block
being different. I would have expected it to only select "dom words"
since start/end of visual block were not identical when doing
normal command it (inner tag):
Is this a bug? Or should the documentation be updated?
Vim version
The text was updated successfully, but these errors were encountered: