dahu / vim-fanfingtastic

Find a char across lines
113 stars 5 forks source link

Compatibility with "set selection=exclusive" #20

Closed E-O-H closed 5 years ago

E-O-H commented 5 years ago

With the plugin, "vfc" does not select the character "c" inclusively (selection stops before "c"), which is different from vanilla vim. Also "vtc" stops at two characters before "c".

EDIT: Well this is embarrassing... It seems it is something in my vimrc that broke the behavior... Closing now.

EDIT2: So the reason is that the plugin is not compatible with "set selection=exclusive". I understand most people do not use this option, but for the people that do, is there any plan to make the plugin compatible with it?

E-O-H commented 5 years ago

I know this sounds silly... If selection is set to exclusive, why would you expect it to select the last character with "vfc"? Well... It sure seems like it should not... But in vanilla vim, even if selection is set to exclusive, "vfc" would still select "c" (the cursor would actually jump to the character after "c"; same with "ve" etc.). Just to clarify the issue a bit...

dahu commented 5 years ago

Fixed with commit f6674e44840172dee5eb7e74be021ccf8403a72b Well... hopefully. Please test. As with all buffer modifying plugins, tread lightly until you're confident that it won't eat your cat.

E-O-H commented 5 years ago

Thanks! It seems to be working as expected now!

dahu commented 5 years ago

Great. You're welcome. Enjoy. :-)