You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Vim plugin that lets you copy and paste to a different GNU screen window.
Works only within a GNU screen session. (Detects $STY)
For interactive development, similar to Jupyter Notebook. You can paste your code on a bash shell or an ipython interpreter.
Detects vim/neovim and ipython running, and paste within an appropriate paste mode.
Note that it:
Uses many system calls. Tested mainly on Ubuntu and Windows WSL.
Features
[num]-: Paste line or selection to Screen window <num>. If [num] is not specified, paste to window 0. Detect if Vim or iPython is running on the window, and paste accordingly.
\-: Paste to window named -console.
[num]_, \_: Same as - but does not detect program nor add newline at the end.
<C-_>: Copy to Screen paste buffer. You can paste it with <C-a> ] anywhere.
Installation
Use your favourite plugin manager. I use vim-plug.
TL; DR: just add the following lines to your .vimrc. It will install vim-plug and this plugin all together.
" Install vim-plug if not foundlet data_dir =has('nvim') ? stdpath('data') . '/site' : '~/.vim'ifempty(glob(data_dir . '/autoload/plug.vim'))
silentexecute'!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'autocmdVimEnter* PlugInstall --sync | source$MYVIMRCendif" Run PlugInstall if there are missing pluginsautocmdVimEnter*iflen(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
\| PlugInstall --sync | source$MYVIMRC\|endifcallplug#begin()
Plug 'kiyoon/vim-screenpaste'callplug#end()
About
Vim plugin that lets you copy and paste to a different GNU screen window.