zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Elliott Cable <me@ell.io>, zsh-users@zsh.org
Subject: Re: edit-command-line, vim, and pasting
Date: Sun, 1 Nov 2015 10:39:21 -0800	[thread overview]
Message-ID: <151101103921.ZM16163@torch.brasslantern.com> (raw)
In-Reply-To: <CAPZ477Oz5BCB797hpE5SO+X9f_Sz8BXX49nUZ9jPERgVGcXHzw@mail.gmail.com>

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.


  reply	other threads:[~2015-11-01 18:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-01 16:37 Elliott Cable
2015-11-01 18:39 ` Bart Schaefer [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=151101103921.ZM16163@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=me@ell.io \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).