vim terminal bracketed-paste from register ?

39 views
Skip to first unread message

mckel...@gmail.com

unread,
Aug 12, 2021, 12:49:06 AM8/12/21
to vim_use
Hi,

Thank you all always for awesome vim.
If I have a mapping -

    tnoremap <S-Insert> <C-w>"*

It does not seem to use bracketed-paste ?
A 'p' in normal mode vim does use bracketed-paste.
And a <C-r>* in insert mode vim does use bracketed-paste.
Its just the same buffer but pasted in the terminal.
Is bracketed-paste possible with a "* in a vim terminal ?
My TERM inside the vim terminal is set to xterm-256color.
vim termcap shows:
 t_BE=^[[?2004h    
 t_BD=^[[?2004l    
 t_PS <PasteStart> ^[[200~  
 t_PE <PasteEnd>  ^[[201~  

thx,
-m

mckel...@gmail.com

unread,
Aug 12, 2021, 7:17:30 AM8/12/21
to vim_use
Hi,

> A 'p' in normal mode vim does use bracketed-paste.
> And a <C-r>* in insert mode vim does use bracketed-paste.

I meant to say bracketed-paste is not applicable for these two cases, and that they work ok.

thx,
-m


Bram Moolenaar

unread,
Aug 12, 2021, 9:12:17 AM8/12/21
to vim...@googlegroups.com, mckel...@gmail.com
Not sure what exactly you are doing, but I would think that in a
terminal window bracketed paste is controlled by the program running in
the terminal. E.g. if you run Vim in a terminal window it should work.

--
Q: What's orange and sounds like a parrot?
A: A carrot

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

mckel...@gmail.com

unread,
Aug 12, 2021, 1:38:53 PM8/12/21
to vim_use
Hi,

ok, thanks Bram.
I was thinking perhaps something like -

let @b="\<Esc>[?2004h"
let @p="\<Esc>[?2004l"
<C-w>"b<C-w>"*<C-w>"p

might do it.  But no matter, I can make sure my 'outer' terminal pastes w/BP instead of sending S-Insert ...

take care,
-m
Reply all
Reply to author
Forward
0 new messages