zsh-users
 help / color / mirror / code / Atom feed
* edit-command-line, vim, and pasting
@ 2015-11-01 16:37 Elliott Cable
  2015-11-01 18:39 ` Bart Schaefer
  0 siblings, 1 reply; 6+ messages in thread
From: Elliott Cable @ 2015-11-01 16:37 UTC (permalink / raw)
  To: zsh-users

I've just set up my Zsh to allow me to use the `edit-command-line` widget:

    autoload -z edit-command-line && zle -N edit-command-line
    bindkey -M vicmd v edit-command-line

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.

When I attempt to paste even a single character, my terminal-bell
signals a few times, and then *part* of whatever I attempted to paste
(usually sans the first few characters, or in some other way messed
up) is actually inserted into the document.

I can't verify precisely what character-sequence vim is receiving, but
it's something mangled; there's clearly a couple BELs in there, and
some ESCs (because I'm already in insert mode when I ⌘V, and
normal-mode commands get run; sometimes the contents of a vim buffer
are inserted at the beginning of the *actual* paste, for instance.)

It's not anything in my Vim configuration, because it occurs in the
same way even if I set `VISUAL="vim -u ''"`, preventing Vim from
loading any configuration at all. Strangely enough, however, while it
does continue to occur if I invoke a new `zsh` without configuration
(`zsh -f`), it *does not* if I indirect that sub-invocation via env …
even when manually keeping all of the environment: `env -i "$(env)"
zsh -f (what the hell does that imply?)

This doesn't occur, ever, outside Zsh; or, specifically, outside of
the `edit-command-line` mode. Does anybody have any ideas what could
be causing this?


⁓ ELLIOTTCABLE — fly safe.
  http://ell.io/tt


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-12-11  5:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-01 16:37 edit-command-line, vim, and pasting Elliott Cable
2015-11-01 18:39 ` Bart Schaefer
2015-11-02 11:16   ` Oliver Kiddle
2015-12-07  3:01     ` Elliott Cable
2015-12-07  6:38       ` Bart Schaefer
2015-12-11  5:33       ` Oliver Kiddle

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).