On 26 July 2015 at 03:56, Pickfire <pickf...@riseup.net> wrote:
> Hi, is there any way for st to use bracketed paste?

I have the following in my vimrc which works:

if &term =~ "st.*"
    let &t_ti = &t_ti . "\e[?2004h"
    let &t_te = "\e[?2004l" . &t_te
    function XTermPasteBegin(ret)
        set pastetoggle=<Esc>[201~
        set paste
        return a:ret
    endfunction
    map <expr> <Esc>[200~ XTermPasteBegin("i")
    imap <expr> <Esc>[200~ XTermPasteBegin("")
    cmap <Esc>[200~ <nop>
    cmap <Esc>[201~ <nop>
endif


I probably copy pasted it from somewhere on the internet…

Reply via email to