svermeulen/vim-easyclip

Conflict with ctrlp

sassanh opened this issue · 2 comments

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?

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.

@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?