zsh-users
 help / color / mirror / code / Atom feed
* bracketed-paste
@ 2016-02-24 15:55 rooom
  2016-02-29 21:09 ` bracketed-paste Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: rooom @ 2016-02-24 15:55 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 206 bytes --]

How can I bind some key to a widget so that it works with pasted text?
I used to do
    bindkey <key> widget-name
but now (probably since bracketed-paste was introduced) it doesn't work anymore.

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

* Re: bracketed-paste
  2016-02-24 15:55 bracketed-paste rooom
@ 2016-02-29 21:09 ` Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2016-02-29 21:09 UTC (permalink / raw)
  To: zsh-users

On Feb 24,  4:55pm, rooom wrote:
}
} How can I bind some key to a widget so that it works with pasted text?

You need the bracketed-paste-magic widget:

    autoload -Uz bracketed-paste-magic
    zle -N bracketed-paste-magic bracketed-paste

There have been some refinements to that (and the related internals) over
the past few releases, so depending on your specific zsh version you may
encounter problems with multibyte characters and widgets bound to some
key sequences, but for most simple usages it should work fine.

You could also turn off bracketed-paste to revert to the old behavior:

    unset zle_bracketed_paste


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

end of thread, other threads:[~2016-02-29 21:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-24 15:55 bracketed-paste rooom
2016-02-29 21:09 ` bracketed-paste Bart Schaefer

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).