srdusr
aboutsummaryrefslogtreecommitdiffstats
path: root/tools/vim.md
diff options
context:
space:
mode:
authorsrdusr <[email protected]>2022-11-22 23:57:46 +0200
committersrdusr <[email protected]>2022-11-22 23:57:46 +0200
commit41c4ba9acbb9f88380ee25587e1d11450f489c5f (patch)
treebf1b6adf35654f1011a5afb8034380e5ce7fdfec /tools/vim.md
parent1e9d2ec49e7729d8a0bbf4740ee0dae6f0901c51 (diff)
downloadnotes-41c4ba9acbb9f88380ee25587e1d11450f489c5f.tar.gz
notes-41c4ba9acbb9f88380ee25587e1d11450f489c5f.zip
Added info on how to copy text/paste/clipboard using vim
Diffstat (limited to 'tools/vim.md')
-rw-r--r--tools/vim.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/vim.md b/tools/vim.md
index e69de29..bc4ff5a 100644
--- a/tools/vim.md
+++ b/tools/vim.md
@@ -0,0 +1,13 @@
+## Copy text from (n)vim to
+```
+* linux:
+ :w !xclip -sel c # copy the whole file
+ $ xclip -o sel -c # paste from the clipboard
+or
+ :w !xsel -b # copy the whole file
+ $ xsel -o -b # paste from the clipboard
+-- Note: In case neither of these tools (xsel and xclip) are preinstalled on your distro, you can probably find them in the repos
+* macos:
+ :%w !pbcopy # copy the whole file
+ :r !pbpaste # paste from the clipboard
+```