Thanks to visit codestin.com
Credit goes to github.com

Skip to content

yiw and yiW not yanking whole word unless at begninng of word #25

@davehouser1

Description

@davehouser1

If I have the following example

1 dog cat moose***wolf

If I move the cursor to the m in moose and use yiw then go to line 2 and paste I see this

1 dog cat moose***wolf
2 moose

If I move the cursor to the s in moose and use yiw, then go to line 3 and paste I see this

1 dog cat moose***wolf
2 moose
3 se

If I move back to the s in moose and use yiW, then go to line 4 and paste I see this

1 dog cat moose***wolf
2 moose
3 se
4 se***wolf

This is not right. yiw should yank the whole string up to any special character no mater where the cursor is. yiW should yank a string including special characters no matter where the cursor is.

The above examples should look like this:

1 dog cat moose***wolf
2 moose
3 moose
4 moose***wolf

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions