diff options
author | Christian Brabandt <cb@256bit.org> | 2021-06-10 19:39:11 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-06-10 19:39:11 +0200 |
commit | 544a38e44db0f25ec4fa7a2a4666cf28a2336f33 (patch) | |
tree | aa6a3da517185bbdb604f7d31bde07ef4dc36c31 /runtime | |
parent | 31e299c08f250b126b2c2c0ecce12ee563b70fdc (diff) | |
download | vim-git-544a38e44db0f25ec4fa7a2a4666cf28a2336f33.tar.gz |
patch 8.2.2971: cannot yank a block without trailing spacesv8.2.2971
Problem: Cannot yank a block without trailing spaces.
Solution: Add the "zy" command. (Christian Brabandt, closes #8292)
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/change.txt | 13 | ||||
-rw-r--r-- | runtime/doc/index.txt | 1 |
2 files changed, 13 insertions, 1 deletions
diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt index 6040926f6..6c6a0c9bd 100644 --- a/runtime/doc/change.txt +++ b/runtime/doc/change.txt @@ -1042,6 +1042,10 @@ inside of strings can change! Also see 'softtabstop' option. > cursor to the end of line (which is more logical, but not Vi-compatible) use ":map Y y$". + *zy* +["x]zy{motion} Yank {motion} text [into register x]. Only differs + from `y` when selecting a block of text, see |v_zy|. + *v_y* {Visual}["x]y Yank the highlighted text [into register x] (for {Visual} see |Visual-mode|). @@ -1050,6 +1054,12 @@ inside of strings can change! Also see 'softtabstop' option. > {Visual}["x]Y Yank the highlighted lines [into register x] (for {Visual} see |Visual-mode|). + *v_zy* +{Visual}["x]zy Yank the highlighted text [into register x]. Trailing + whitespace at the end of each line of a selected block + won't be yanked. Especially useful in combination + with `zp`. (for {Visual} see |Visual-mode|) + *:y* *:yank* *E850* :[range]y[ank] [x] Yank [range] lines [into register x]. Yanking to the "* or "+ registers is possible only when the @@ -1129,7 +1139,8 @@ inside of strings can change! Also see 'softtabstop' option. > ["x]zp or *zp* *zP* ["x]zP Like "p" and "P", except without adding trailing spaces when pasting a block. Thus the inserted text will not - always be a rectangle. + always be a rectangle. Especially useful in + combination with |v_zy|. You can use these commands to copy text from one place to another. Do this by first getting the text into a register with a yank, delete or change diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt index 118bc2217..00db07606 100644 --- a/runtime/doc/index.txt +++ b/runtime/doc/index.txt @@ -878,6 +878,7 @@ tag char note action in Normal mode ~ |zv| zv open enough folds to view the cursor line |zw| zw permanently mark word as incorrectly spelled |zx| zx re-apply 'foldlevel' and do "zv" +|zy| zy yank without trailing spaces |zz| zz redraw, cursor line at center of window |z<Left>| z<Left> same as "zh" |z<Right>| z<Right> same as "zl" |