On Thu, Sep 19, 2013, at 10:51, Nick wrote: > To check, how does this work exactly? Does X send the escape code to > any window when pasting with middle click, and those which don't > understand it just ignore it? And then once st has done the > appropriate stuff with the pasted text, vim (for example) will > detect that and behave as though :paste is enabled for the duration > of the paste?
The application has to request it be enabled with a private mode escape sequence. I don't believe vim presently has any built-in support for it, but I could be wrong - and you could probably hack it by putting the mode in t_is or t_ti, putting the end escape sequence in :set paste, and setting a keybinding for the start sequence.