mirror of
https://github.com/neovim/neovim.git
synced 2024-12-29 14:41:06 -07:00
fab635f858
We've never had an X11 GUI.
60 lines
2.1 KiB
Plaintext
60 lines
2.1 KiB
Plaintext
*nvim_clipboard.txt* For Nvim. {Nvim}
|
|
|
|
|
|
NVIM REFERENCE MANUAL by Thiago de Arruda
|
|
|
|
|
|
Clipboard integration for Nvim *nvim-clipboard*
|
|
|
|
1. Intro |nvim-clipboard-intro|
|
|
2. X11 selection mechanism |nvim-clipboard-x11|
|
|
|
|
==============================================================================
|
|
1. Intro *nvim-clipboard-intro*
|
|
|
|
Nvim has no direct connection to the system clipboard. Instead, it is
|
|
accessible through the |nvim-provider| infrastructure, which transparently
|
|
uses shell commands for communicating with the clipboard.
|
|
|
|
Clipboard access is implicitly enabled if any of the following clipboard tools
|
|
is found in your `$PATH`.
|
|
|
|
- xclip
|
|
- xsel (newer alternative to xclip)
|
|
- pbcopy/pbpaste (only for Mac OS X)
|
|
|
|
The presence of a suitable clipboard tool implicitly enables the '+' and '*'
|
|
registers.
|
|
|
|
If you want to ALWAYS use the clipboard for ALL operations (as opposed
|
|
to interacting with the '+' and/or '*' registers explicitly), set the
|
|
following option:
|
|
>
|
|
set clipboard+=unnamedplus
|
|
<
|
|
See 'clipboard' for details and more options.
|
|
|
|
==============================================================================
|
|
2. X11 selection mechanism *nvim-clipboard-x11* *x11-selection*
|
|
|
|
The clipboard providers for X11 store text in what is known as "selections".
|
|
Selections are "owned" by an application, so when the application is closed,
|
|
the selection text is lost.
|
|
|
|
The contents of selections are held by the originating application (e.g., upon
|
|
a copy), and only passed on to another application when that other application
|
|
asks for them (e.g., upon a paste).
|
|
|
|
*quoteplus* *quote+*
|
|
|
|
There are three documented X11 selections: `PRIMARY`, `SECONDARY`, and `CLIPBOARD`.
|
|
`CLIPBOARD` is typically used in X11 applications for copy/paste operations
|
|
(`Ctrl-c`/`v`), while `PRIMARY` is used for the last selected text, which is
|
|
generally inserted with the middle mouse button.
|
|
|
|
Nvim's X11 clipboard providers only utilize the `PRIMARY` and `CLIPBOARD`
|
|
selections, used for the '*' and '+' registers, respectively.
|
|
|
|
==============================================================================
|
|
vim:tw=78:ts=8:noet:ft=help:norl:
|