clipboard does not work
Closed this issue · 3 comments
0rtz commented
Describe the bug
When leaving nnn clipboard content seems to dissapear
To Reproduce
So i have this init.vim
let data_dir = stdpath('data') . '/site'
if empty(glob(data_dir . '/autoload/plug.vim'))
silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
endif
call plug#begin()
Plug 'mcchrish/nnn.vim'
call plug#end()
nnoremap <silent> \f :NnnPicker<CR>
let g:nnn#command = 'nnn'
and this bash script which i use as an nnn module
#!/usr/bin/env sh
echo $1 | tr -d '\n' | xclip -i -selection clipboard
I set module as export NNN_PLUG="y:nnn_file_path_yank;"
in my .zshrc
And when i launch nnn from inside neovim, do ;y
and quit nnn, clipboard content dissapears. Even though it's there until i quit nnn, i can paste it, but when i quit nnn - it's lost.
Its seems to be a wierd problem and maybe im missing something in my own setup, but if you could take a look it will be great
- Shell: [e.g. zsh 5.8]
- Vim version: [neovim 0.6.0]
- Plugin manager: [vim-plug]
- Plugin version: [master]
- Nnn version: [v4.4]
N-R-K commented
Try this out and report back if it works or not.
#!/usr/bin/env sh
printf "%s" "$1" | setsid -f xclip -i -selection clipboard
jarun commented
Closing as no response.