ConradIrwin / vim-bracketed-paste

Handles bracketed-paste-mode in vim (aka. automatic `:set paste`)
MIT License
481 stars 28 forks source link

Support GNU screen #26

Closed redneb closed 6 years ago

redneb commented 7 years ago

It appears that GNU screen filters the escape sequence used to enable/disable the bracketed paste mode. So we escape it to make GNU screen pass it to the outer terminal. This is similar to how tmux is handled. Note that I have reused the g:bracketed_paste_tmux_wrap variable that enables the user to override this behavior.

bluss commented 7 years ago

Thanks, very useful :+1:

redneb commented 7 years ago

I'm actually having second thoughts about this approach. It works great if all the programs that you run under screen support bracketed paste (such as vim with vim-bracketed-paste). But if you run some programs that do and some that don't in the same screen session, things can get messy.

I have devised a much more complicated (and ugly) solution for that, which does not involve vim-bracketed-paste but instead uses an auxiliary program to wrap other programs running under screen, but I have not put it on github yet.