neovide: I can't use the cmd+v to paste text on my mac;
Describe the bug I can’t use the cmd+v to paste text on my mac;
To Reproduce
- use cmd+c to copy something
- switch to neovide
- cmd+v to paste the text
Expected behavior paste the text to buffer/other
Screenshots
Desktop (please complete the following information):
- OS: 12.3
- Neovide Version 0.8.0
- Neovim Version 0.7.0
Please run neovide --log
and paste the contents of the .log
file here:
Additional context Add any other context about the problem here.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 6
- Comments: 24 (6 by maintainers)
Commits related to this issue
- fix neovide layer pasta, https://github.com/neovide/neovide/issues/1263\#issuecomment-1100895622 — committed to zhaozg/neospace by zhaozg a year ago
Based on @terhechte , I used this in
init.lua
:I think having something that works out of the box (without the need to search the project issue tracking, copying mappings and so on) would be much better.
cmd-v
is the standard paste command on macOS. A GUI user shouldn’t care about keycodes, mappings and this kind of stuff unless doing something custom. Pasting should “just work” like in the rest of the OS.@CG-man Actually, using
<D-v>
or<D-c>
does nothing on macOS because this PR disables the command key. Took me way too long to figure this out as it isn’t really documented.To enable Cmd + V / Cmd + P on macOS, I have these bindings:
Agreed with @metalelf0, as neovide is a GUI, I expect <kbd>⌘</kbd>+<kbd>v</kbd> to work. <kbd>⌘</kbd>+<kbd>v</kbd> already works in iTerm2 with neovim.
If a user has <kbd>⌘</kbd>+<kbd>v</kbd> mapped to something else, does that still work in iTerm/neovim?
The suggestions above are helpful, but don’t work in some situations (e.g., with fzf-lua, which was bothering me).
The most reliable (and correct imo) solution I’ve found is using
vim.api.nvim_paste
:@MultisampledNight It would be nice if you would consider updating the documentation with something like this using
vim.api.nvim_paste
.Fyi for people also stumbling upon this via a search, full solution here in the Docs :
We do have a PR open for updating the docs, but the problem is that it’s macOS specific
@shepherdjerred @i-am-the-slime My configuration is
@suyby It just doesn’t work: NVIM v0.8.0 macOS 13
In addition, the value should be assigned like this.
So, the final configuration should be
@MultisampledNight So it is a bit of a Neovim issue because Neovim introduces a non-standard setting that disables the command key by default. Personally, I think this setting should be default-enabled on macOS. Would be willing to crate a PR for that.