start with this text, cursor top-left position
abcd
abcd
type C-v
j
k
y
P
result is:
ab
ab
abcd
abcd
result should be:
ababcd
ababcd
I saw a fix for neovim neovim/neovim#1822, but it's still a issue here.
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Apr 29 2017 18:09:39)
MacOS X (unix) version
Included patches: 1-586
Compiled by Homebrew
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
clipboard=unnamedplus
Are you sure that you're on X11? If not, unnamedplus
should be unnamed
.
type C-v j k y P
You actually meant "type C-v j l y P", didn't you? With this key sequence, I got the expected result.
I saw a fix for neovim neovim/neovim#1822, but it's still a issue here.
Hmm, but it looks to me that the issue there is still open...
Are you sure that you're on X11? If not, unnamedplus should be unnamed.
Yes, I'm sure. I have XQuartz installed, and X11 enabled. Actually, I cannot share the clipboard between system and vim if it is unnamed
set.
You actually meant "type C-v j l y P", didn't you? With this key sequence, I got the expected result.
Ahh you're right. But I can reproduce this issue with vim -N -u NONE
and set clipboard=unnamedplus
. Maybe it only happens in macOS? Can anyone test with macOS to confirm it?
Hmm, but it looks to me that the issue there is still open...
Forget the issue...it is still open because of lack of proper solution to macOS.
Yes, I'm sure. I have XQuartz installed, and X11 enabled. Actually, I cannot share the clipboard between system and vim if it is unnamed set.
Since your vim comes from HoveBrew, it is highly likely to be made macOS' clipboard enabled but not X11's clipboard, and, as is explained in :help 'clipboard'
, unnamedplus
is for the latter, not for the former. The point of my previous comment is: Use 'set clipboard=unnamed' for macOS's.
Forget the issue...it is still open because of lack of proper solution to macOS.
Since they seemingly uses external programs to have their vim do copy & paste, the issue you're talking about cannot be made relevant to ours.
Since there has been neither reply from the OP nor follow-up from anyone for these 46 hours, allow me to add a comment to my previous one successively.
@frankyjuang
Would you tell us what value your Vim echoes when you do:
:echo has('clipboard')
:echo has('macunix')
:echo has('X11')
@nuko8 all of them gives 1
.
Then, would you tell us what do you have with
$ otool -L /your/path/to/vim
Plus, would you tell us how your Vim was configured? IOW, do you have src/auto/config.log
?
Output of otool
/usr/local/bin/vim:
/opt/X11/lib/libXt.6.dylib (compatibility version 7.0.0, current version 7.0.0)
/opt/X11/lib/libX11.6.dylib (compatibility version 10.0.0, current version 10.0.0)
/opt/X11/lib/libSM.6.dylib (compatibility version 7.0.0, current version 7.1.0)
/opt/X11/lib/libICE.6.dylib (compatibility version 10.0.0, current version 10.0.0)
/usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.4.0)
/usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 22.0.0)
/usr/local/opt/lua/lib/liblua.5.2.dylib (compatibility version 5.2.0, current version 5.2.4)
/usr/local/opt/perl/lib/perl5/5.24.1/darwin-thread-multi-2level/CORE/libperl.dylib (compatibility version 5.24.0, current version 5.24.1)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.51.1)
/usr/lib/libutil.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/local/opt/python/Frameworks/Python.framework/Versions/2.7/Python (compatibility version 2.7.0, current version 2.7.0)
/usr/local/opt/ruby/lib/libruby.2.4.1.dylib (compatibility version 2.4.0, current version 2.4.1)
/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1504.82.104)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1349.65.0)
/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 775.19.0)
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1349.64.0)
As I said above, I can reproduce it with pure vim -N -u NONE
with only set clipboard=unnamedplus
.
Here is my src/auto/config.log
. Thanks a lot.
config.log.txt
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
(Excerpt from config.log.txt)
$ auto/configure --prefix=/usr/local --mandir=/usr/local/Cellar/vim/8.0.0596/share/man --enable-multibyte --with-tlib=ncurses --enable-cscope --with-compiledby=Homebrew --enable-luainterp --enable-python3interp --enable-perlinterp --enable-rubyinterp --disable-nls --enable-gui=no --with-x --enable-luainterp --srcdir=. --cache-file=auto/config.cache
Among the options, I see --with-x
. Since you used --enable-gui=no
, it looks to me that --with-x
was apparently superfluous. Did you have any reason to include --with-x
into the set of options? If you actually don't need it, I recommend not including it. Note that Vim can work fully on xterm as well as on Terminal.app/iTerm.app even if it is not liked against any of X11-related libraries.
If you will, try re-configuring Vim with the same options except --with-x
and re-builing it. Then, the resultant Vim should work fine even if you don't set clipboard to any value (Rather, I recommend doing nothing with it).
Thanks a lot.
Don't mention it :)
It works! Finally I understand how all these factors affect each other. Thanks @nuko8 !
Closed #1670.