Open fairanswers opened 2 years ago
If I understand that you're trying to copy some text in Vim, then paste it elsewhere in the OS, this is not a Vimr specific issue, nor really an issue, just a gap in understanding.
First, Neovim and hence Vimr are always compiled with all features, so system copy/paste is supported in your instance.
Second, and more to your question, Vim uses a system of multiple registers to store deleted/copied text, the system clipboard being stored in the *
or +
register. So if you wanted to copy the word your cursor was under to later paste somewhere else in the OS, you would do "*yw. See :help registers
.
If you prefer more "standard" copy/paste behavior seen in other editors, where the un-prefixed yank commands use the system clipboard, consider mapping the unnamed register to the system register. See :help clipboard
.
Hope that helps.
@bronzehedwick I really appreciate this help.
this is not a Vimr specific issue, nor really an issue, just a gap in understanding. I'm certain you're right. It's me, I just can't find where I'm wrong.
Neovim and hence Vimr are always compiled with all features, so system copy/paste is supported in your instance. Thanks! That's one factor out of the way.
The problem is, in the version of VimR I installed last year the copy/paste works like you'd think (both with the "*y and cmd-c). I had to upgrade to Monterey and reinstall vimr, but the new version won't copy (but will paste).
If I "yy and "p both in the same vimr window, I get the line I yanked. If I copy something elsewhere and "*p into vimr, the new line pastes.
But if I "*yy in vimr and try to paste in a terminal OR a different vimr window, the clipboard has the old value.
I just confirmed on my account the ~/.vimrc and ~/.vim/vimrc.vim are both blank, if that helps.
@fairanswers What is the contents of your ~/.config/nvim/init.vim
? Neovim (and hence Vimr) have switched to XDG directories for configuration, so that's where the program will look. See :help xdg
or the link above.
Also, check the output of :checkhealth
and see if there's an error related to the clipboard integration.
Another line of troubleshooting: see if using "+yy results in the correct behavior.
For what its worth, I cannot replicate this problem on Vimr Version 0.39.0 (20220416.182927)
locally.
Hope that helps!
~/.config/nvim/init.vim just has this line
set runtimepath=~/.vim,~/.vim/pack/tpope/start/fireplace,~/.vim/pack/plugins/start/vimwiki,/usr/share/vim/vimfiles,/usr/share/vim/vim82,/usr/share/vim/vimfiles/after,~/.vim/after
And :checkhealth returns E5009: Invalid 'runtimepath'
But if I change it to set runtimepath=/usr/share/vim/vim82
which does exist, I get the same error.
Thx, Joe
I'd remove/comment out the runtimepath bit, since it's pointing to Vim8, and who knows what that could cause.
I re-installed vimr and now I can't figure out how to copy/paste out of it on a mac.
I've searched 3 different times, but other than 'make sure it's supported at compile time' which I don't know how to do, I can't figure it out.
Any clues are appreciated. Joe