Skip to content

Instantly share code, notes, and snippets.

@iio7
Created December 2, 2021 21:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iio7/732b973210ecb947f48376e6b6967f6a to your computer and use it in GitHub Desktop.
Save iio7/732b973210ecb947f48376e6b6967f6a to your computer and use it in GitHub Desktop.
Set xsel as the default X clipboard on Neovim

Set the following in your init.vim. The backslash is required.

let g:clipboard = #{
      \   name: 'xsel',
      \   copy: {
      \     '+': ['xsel', '--nodetach', '-i', '-b'],
      \     '*': ['xsel', '--nodetach', '-i', '-p'],
      \   },
      \   paste: {
      \     '+': ['xsel', '-o', '-b'],
      \     '*': ['xsel', '-o', '-p'],
      \   },
      \   cache_enabled: 1,
      \ }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment