From 41c4ba9acbb9f88380ee25587e1d11450f489c5f Mon Sep 17 00:00:00 2001 From: srdusr Date: Tue, 22 Nov 2022 23:57:46 +0200 Subject: Added info on how to copy text/paste/clipboard using vim --- tools/vim.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tools/vim.md') 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 +``` -- cgit v1.2.3