svermeulen / vim-easyclip

Simplified clipboard functionality for Vim
689 stars 21 forks source link

It doesn't work in VISUAL Mode! #108

Open jcppython opened 6 years ago

jcppython commented 6 years ago

It doesn't work in master branch! I found that it's fine in VisualModeFixAttempt branch, certainly, some problem already.

Do you have plan to fix it? thank you!

svermeulen commented 6 years ago

Define "doesn't work" please. I'm not seeing an issue in my install.

jcppython commented 6 years ago

It work for full line, I can't copy/paste for a word, a block (visual mode) ...

some fail cases: image

image

svermeulen commented 6 years ago

What do you mean paste fail?

jcppython commented 6 years ago

No output after "p".

svermeulen commented 6 years ago

Not seeing this, please provide more detail on your environment, vim version, etc.

svermeulen commented 6 years ago

Also if you can reproduce with vanilla vim and a stripped down vimrc with just easyclip alone that would be great

jcppython commented 6 years ago

Following your guide "vimrc with just easyclip alone". It will be ok after removing "set clipboard=unnamed". 👍

But, I want to set clipboard=unnamed, as you point in part of "Clipboard setting"...

svermeulen commented 6 years ago

What was it set to that caused the issue?

jcppython commented 6 years ago

I don't know the specific reason. It will have some problem after add set clipboard=unnamed in vimrc.

vim8.0. Centos.

svermeulen commented 6 years ago

Ohh ok, I think I know what's happening. It's probably related to #23 . Having clipboard set to unnamed should work fine, I think we have to address that issue for it to work though

oryband commented 6 years ago

@svermeulen can confirm this bug. This is following the recent changes that were made in the last month or so. Easyclip has become unusable for me on Arch linux as well.

:echo EasyClip#GetDefaultReg()
+

My easyclip settings are:

set clipboard=unnamed,unnamedplus
let g:EasyClipShareYanks = 1
let g:EasyClipShareYanksDirectory = '$HOME/.vim'
nmap M <Plug>MoveMotionEndOfLinePlug

Any idea how to resolve this?

svermeulen commented 6 years ago

@oryband I reverted some recent changes that was causing some breakage so updating to master might help you. We still need to address #23 though

desprit commented 3 years ago

I have the following setting:

set clipboard=unnamed,unnamedplus
let g:EasyClipShareYanks=1

If I copy line with yy I can then paste it into a different nvim window with p. But when I copy in visual mode Vjjy, then copied lines are not available in another nvim window.

pfernandez commented 3 years ago

I noticed this today while comparing files with vimdiff and trying to (for example) yank a single word with viwyp: Nothing is yanked. It works when editing normally though. 😞 My related settings are:

Plug 'rickhowe/diffchar.vim'

set diffopt+=vertical
set diffopt+=iwhite
set diffexpr=""
if &diff | colorscheme molokai | endif

set clipboard=unnamedplus

let g:EasyClipAutoFormat = 1 
let g:EasyClipPreserveCursorPositionAfterYank = 1
let g:EasyClipShareYanks = 1
let g:EasyClipShareYanksDirectory = '$HOME/.vim'
nmap M <Plug>MoveMotionEndOfLinePlug

Reproduce by positioning the cursor over a word, then viwyp.