diff options
Diffstat (limited to 'runtime/doc/nvim_clipboard.txt')
-rw-r--r-- | runtime/doc/nvim_clipboard.txt | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/runtime/doc/nvim_clipboard.txt b/runtime/doc/nvim_clipboard.txt index cf63685499..1183ad7a3c 100644 --- a/runtime/doc/nvim_clipboard.txt +++ b/runtime/doc/nvim_clipboard.txt @@ -4,7 +4,13 @@ NVIM REFERENCE MANUAL by Thiago de Arruda -Clipboard integration for Nvim *nvim-clipboard* +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 @@ -29,4 +35,25 @@ following option: 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: |