bkad / CamelCaseMotion

A vim script to provide CamelCase motion through words (fork of inkarkat's camelcasemotion script)
593 stars 45 forks source link

iw selects spaces and newlines #17

Open noctuid opened 10 years ago

noctuid commented 10 years ago

Unlike vim's default iw, doing something like diw with CamelCaseMotion's iw on "word word" with the cursor on the first w will result in "word" instead of " word". If it is used at the end of a line (if the cursor is on the second w in the above example), the next line will be brought up to the current line after a ciw or diw. Instead of leaving spaces and newlines, it deletes them.

I'm not sure if this is intentional, but camel case's ie acts more like vim's default iw (except, for example, when on an empty line). I think it would make more sense to have camelcase's iw be named aw (and make it stop removing newline chars).

faceleg commented 9 years ago

Agree, this behaviour was surprising for me

faceleg commented 9 years ago

iw also eats , characters.

faceleg commented 9 years ago

@angelic-sedition does #21 result in more expected behaviour?

genesy commented 4 years ago

still an issue 5 years later, anyone have a working fork for a fix for this?

ok had to learn basic vimscript just to fix this..