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
This is just what it looks like to mix linewise and chararacterwise motions. When you try to paste linewise content (the line targeted by cxx) over a characterwise selection (the word targeted by cxw), the result is that the linewise content is still on its own line. Here's an example that illustrates it more clearly:
1 before word after
2 this is a sentence
Use cxw on word and cxx on line 2. The result:
1 before
2 this is a sentence
3 after
4 word
While this is probably not what you wanted, it's much easier to understand why it happened. The linewise motion defined by cxx wants to continue being its own line. If we remove before and after, we actually see the exact same behaviour that you described.
For your case, you could use matching -wise motions to achieve the result you want:
This seems like an edge case, but using
cx
{motion} , followed bycxx
doesn't seem to work as expected.Example:
Use
cxw
on line 1, and then usecxx
on line 2, will produce:The text was updated successfully, but these errors were encountered: