Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: edit-command-line, vim, and pasting



On Nov 1, 10:37am, Elliott Cable wrote:
}
} For some reason I can't puzzle out, though, `vim` *when invoked via
} `edit-command-line`* goes haywire when I try to *paste* something,
} even with `:set paste` enabled.

This is almost certainly yet another unexpected knock-on effect of the
new bracketed-paste handling.  Bracketed-paste is enabled when entering
ZLE and not disabled until exiting from zle, so any widget that invokes
an external command is going to hand over control of the terminal with
bracketed-paste still in effect.   This will cause the terminal to
send a sequence beginning with ESC at the start of the paste, which
will mess with whether vim is in insert mode.

We need a generalized fix for this.  Oliver?

Meanwhile you might be able to get away with using the "pastetoggle"
setting.  Examples here:

http://vimdoc.sourceforge.net/htmldoc/options.html#%27pastetoggle%27

The {keys} to use are  ESC [ 2 0 0 ~  to start and  ESC [ 2 0 1 ~  to
end paste mode.



Messages sorted by: Reverse Date, Date, Thread, Author