Created
April 19, 2022 13:43
-
-
Save blue7wings/ae0eab7b47a2c6243ee0ab88f6731570 to your computer and use it in GitHub Desktop.
How to enable Neovim's Clipboard in Majanro
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- install xsel at first: `yay -S xsel` | |
-- add the bellow code in your config file | |
vim.opt.clipboard = vim.opt.clipboard + {'unnamed','unnamedplus'} | |
vim.cmd([[ | |
let g:clipboard = { | |
\ 'name': 'myClipboard', | |
\ 'copy': { | |
\ '+': ['xsel', '--nodetach', '-i', '-b'], | |
\ '*': ['xsel', '--nodetach', '-i', '-p'], | |
\ }, | |
\ 'paste': { | |
\ '+': ['xsel', '-o', '-b'], | |
\ '*': ['xsel', '-o', '-p'], | |
\ }, | |
\ 'cache_enabled': 1, | |
\ } | |
]]) | |
-- restart neovim, clipboard will be fine. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment