From 07e12d28ff07262be7db001371203fdb4bcafdb1 Mon Sep 17 00:00:00 2001 From: Thomas Ruoff Date: Tue, 6 Feb 2018 22:37:37 +0100 Subject: [PATCH] finally figured out yanking on all oses --- vim/cheetsheet.md | 13 +++++++++++++ vimrc | 4 ++++ 2 files changed, 17 insertions(+) diff --git a/vim/cheetsheet.md b/vim/cheetsheet.md index d5a86a8..1b133f0 100644 --- a/vim/cheetsheet.md +++ b/vim/cheetsheet.md @@ -4,6 +4,19 @@ Generel stuff that I need to get into my muscle memory. * `CTRL-W [hjkl]` - switch to window left, above, below, right +## yanking +* `"ay` - replace content of register 'a' +* `"Ay` - append to content of register 'a' +* `y` - will put stuff in the default register `""` and `"0` +* `d` - will put stuff just in the default register `""` - so `"0p` will still + paste the last yank +* `3yy` - yank next three lines +* `CTRL-r +` - paste register '+' in insert mode +* `"*` - linux the PRIMARY clipboard, system clipboard on other operating + systems +* `"+` - the system clipboard on all operating systems + + ## unimpared * `]b` - :bnext * `[b` - :bprevious diff --git a/vimrc b/vimrc index b7136d8..02b1a95 100644 --- a/vimrc +++ b/vimrc @@ -80,6 +80,10 @@ set wildignore+=*.swp,*.bak,*.jpg,*.gif,*.png,*.git, set splitright set splitbelow +" yank delete change and put operations go by default in `"+` register +" so in the systems clipboard accessable by CTRL-V on all OS types +set clipboard=unnamedplus + " set ignorecase set infercase set smartcase