svermeulen / vim-easyclip

Simplified clipboard functionality for Vim
693 stars 21 forks source link

Conflict with ctrlp #77

Open sassanh opened 8 years ago

sassanh commented 8 years ago

If you type <c-p>comm "really fast" (in less than .3s for example) while ctrlp and easyclip plugins are active, it'll show "E21: Cannot make changes, 'modifiable' is off" in statusbar as an error and types only co in ctrlp prompt instead of comm (and same happens for dd instead of mm). It's pretty annoying when you have a comment.py file in your project. It doesn't happen if I disable easyclip. Any idea what's going wrong here?

svermeulen commented 8 years ago

I could be wrong but I think the way ctrlp works is that it creates a new buffer, then remaps all the keys to its own functions, then sets updatetime to zero, so that multi-key mappings also don't work. So my guess is that you are typing mm fast enough that even with the updatetime set to zero, it still reads it as a single command.

sassanh commented 8 years ago

@svermeulen I investigated the issue a little bit more and saw that it's not required to press <c-p>comm all in less than .3s. It happens even if CtrlP window has been opened long time ago. Pressing comm or domm (or even codd or dodd) fast enough reproduces the issue no matter how long CtrlP window is open. It doesn't happen with mm alone, it should be prepend with co or do. Do you check for modifiable-ity of the buffer?