vim-wordmotion icon indicating copy to clipboard operation
vim-wordmotion copied to clipboard

cw

Open 1wsx10 opened this issue 2 years ago • 5 comments

ok so there are two things i have noticed.

thing 1:

 asdf_
^ cursor

cw here will change up to the underscore. default vim cw will change up to the a (it goes up to the word, not to the end of the word)

thing 2: vims special case for cw (see https://old.reddit.com/r/vim/comments/26nut8/why_does_cw_work_like_ce/) it would be nice if there was an option for the more canonical version of cw eg:

asdf (
 ^ cursor

dw here would delete to the ( cw deletes up to (not including) the space, so it's like ce

1wsx10 avatar Jul 07 '22 01:07 1wsx10

I fixed this a while back. Try updating the plugin?

chaoren avatar Jul 07 '22 02:07 chaoren

Oh, the cursor is on the space before the a in the first case. Yes, that looks like a bug.

I can't reproduce the second case.

chaoren avatar Jul 07 '22 02:07 chaoren

2 is more of a feature request. i'll probably have a look at making a PR at some point.

1wsx10 avatar Jul 07 '22 09:07 1wsx10

to be clear, what i explained in 2 is also default vim behavior for cw, but it's not consistent with dw or vw or yw etc and it's redundant because ce does the same thing. its just a little annoying when you actually want to change up to the next word, you end up having to do dwi or ct( or something.

1wsx10 avatar Jul 07 '22 09:07 1wsx10

Yes, I know. I specifically reproduced the behavior of cw because people asked for it, so it should be there. You probably have an oudated version of the plugin if that behavior is not happening for you.

chaoren avatar Jul 07 '22 19:07 chaoren