Not for normies
| 1 | # System clipboard integration |
| 2 | # |
| 3 | # This file has support for doing system clipboard copy and paste operations |
| 4 | # from the command line in a generic cross-platform fashion. |
| 5 | # |
| 6 | # This is uses essentially the same heuristic as neovim, with the additional |
| 7 | # special support for Cygwin. |
| 8 | # See: https://github.com/neovim/neovim/blob/e682d799fa3cf2e80a02d00c6ea874599d58f0e7/runtime/autoload/provider/clipboard.vim#L55-L121 |
| 9 | # |
| 10 | # - pbcopy, pbpaste (macOS) |
| 11 | # - cygwin (Windows running Cygwin) |
| 12 | # - wl-copy, wl-paste (if $WAYLAND_DISPLAY is set) |
| 13 | # - xsel (if $DISPLAY is set) |
| 14 | # - xclip (if $DISPLAY is set) |
| 15 | # - lemonade (for SSH) https://github.com/pocke/lemonade |
| 16 | # - doitclient (for SSH) http://www.chiark.greenend.org.uk/~sgtatham/doit/ |
| 17 | # - win32yank (Windows) |
| 18 | # - tmux (if $TMUX is set) |
| 19 | # |
| 20 | # Defines two functions, clipcopy and clippaste, based on the detected platform. |
| 21 | ## |
| 22 | # |
| 23 | # clipcopy - Copy data to clipboard |
| 24 | # |
| 25 | # Usage: |
| 26 | # |
| 27 | # <command> | clipcopy - copies stdin to clipboard |
| 28 | # |
| 29 | # clipcopy <file> - copies a file's contents to clipboard |
| 30 | # |
| 31 | ## |
| 32 | # |
| 33 | # clippaste - "Paste" data from clipboard to stdout |
| 34 | # |
| 35 | # Usage: |
| 36 | # |
| 37 | # clippaste - writes clipboard's contents to stdout |
| 38 | # |
| 39 | # clippaste | <command> - pastes contents and pipes it to another process |
| 40 | # |
| 41 | # clippaste > <file> - paste contents to a file |
| 42 | # |
| 43 | # Examples: |
| 44 | # |
| 45 | # # Pipe to another process |
| 46 | # clippaste | grep foo |
| 47 | # |
| 48 | # # Paste to a file |
| 49 | # clippaste > file.txt |
| 50 | # |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | |
| 62 | |
| 63 | |
| 64 | |
| 65 | |
| 66 | |
| 67 | |
| 68 | |
| 69 | |
| 70 | |
| 71 | |
| 72 | |
| 73 | |
| 74 | |
| 75 | |
| 76 | |
| 77 | |
| 78 | |
| 79 | |
| 80 | |
| 81 | |
| 82 | |
| 83 | |
| 84 | |
| 85 | |
| 86 | |
| 87 | |
| 88 | |
| 89 | |
| 90 | |
| 91 | |
| 92 | |
| 93 | |
| 94 | |
| 95 | |
| 96 | |
| 97 | |
| 98 | |
| 99 | |
| 100 | |
| 101 | |
| 102 | |
| 103 | |
| 104 | |
| 105 | |
| 106 | |
| 107 |