Comments (7)
Something I just noticed: yy
does copy because I see the message from osc52 when I do it. It's just the paste with p
that doesn't work.
from nvim-osc52.
When you set vim.opt.clipboard = "unnamedplus"
, you instruct Neovim to put all your yanked text into the +
register, which in turn calls the copy()
function with the given text. But Neovim still puts the text into your unnamed register "
as well. So when you copy text inside Neovim then use p
, it should work fine. Did you remap y
or yy
in your config?
Or did you mean copying text from outside Neovim and pasting inside with p
? Unfortunately this case is not supported by most terminal emulators, because letting applications read the clipboard is a security issue. In that case I suggest you use the plugin only to copy, and use your default clipboard provider for pasting. So if you want to copy with <leader>c
:
vim.opt.clipboard = 'unnamedplus'
vim.keymap.set('n', '<leader>c', require('osc52').copy_operator, {expr = true})
vim.keymap.set('n', '<leader>cc', '<leader>c_', {remap = true})
vim.keymap.set('x', '<leader>c', require('osc52').copy_visual)
Also note that if you don't change any of the default options, you don't need to call setup()
.
from nvim-osc52.
I've updated the README to address your question, but you can re-open this issue if you still have problems.
from nvim-osc52.
I was actually referring to text copied from inside neovim and pasting inside neovim. I already use Kitty's keybinding to paste from external applications. Thanks for suggesting that there may be a conflicting remap ... I removed whichkey
from my plugin list and yy+p works again! So, whichkey must be remapping it somehow.
from nvim-osc52.
I think this issue may be related: folke/which-key.nvim#202
from nvim-osc52.
Yes, indeed. If I fix my local copy of whichkey with the fix suggested in the above issue, yy+p within neovim works fine and so does the integration with the system clipboard. Thanks again for your help!
from nvim-osc52.
Good to know! Glad that your problem is resolved.
from nvim-osc52.
Related Issues (20)
- Feature: Query and paste from the clipboard HOT 7
- disable printing status, return status, <leader>cc not working. HOT 2
- dooes not work on WSL1 config tips? HOT 2
- Issues on displaying yanked region with vim-highlightedyank HOT 1
- Doesn't work inside tmux HOT 3
- copy_visual does not respect reselect-visual (gv) HOT 2
- osc52.lua line 43: attempt to index global 'visual_marks' (a nil value) HOT 1
- Why is the first yank after opening NVIM 0 characters? HOT 5
- Yank behavior on a remote machine: `yy` does not yank, but `"*yy` yanks HOT 4
- Copying does not overwrite HOT 2
- auto copy contents from register not working as expected HOT 2
- Can't make it work with Mosh HOT 5
- failed to copy text with mouse after using nvim-osc52 inside the tmux in kitty HOT 1
- Can I paste from local system clipboard to remote neovim by "p"? HOT 3
- Example configuration behaves unexpectedly (LazyVim) HOT 4
- difference between using as a clipboard provider vs not? HOT 2
- Config cannot be applied on neovim 0.9 or instructions are unclear HOT 4
- How to turn clipboard blockwise
- how to use nvim default osc52 provider? HOT 3
- One interesting bug with tmux after updating HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nvim-osc52.