diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-06-10 22:41:01 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-06-10 22:58:15 -0400 |
commit | 8ebbeee1d0fe8c1fa67a95324ba98fe6a9794519 (patch) | |
tree | d4550a33f8065cd6be13ddc1f8269b4ff19e12ec /runtime | |
parent | d662dfde363b80ce8fc446ab7d8299cbd626f074 (diff) | |
download | rneovim-8ebbeee1d0fe8c1fa67a95324ba98fe6a9794519.tar.gz rneovim-8ebbeee1d0fe8c1fa67a95324ba98fe6a9794519.tar.bz2 rneovim-8ebbeee1d0fe8c1fa67a95324ba98fe6a9794519.zip |
vim-patch:8.2.2971: cannot yank a block without trailing spaces
Problem: Cannot yank a block without trailing spaces.
Solution: Add the "zy" command. (Christian Brabandt, closes vim/vim#8292)
https://github.com/vim/vim/commit/544a38e44db0f25ec4fa7a2a4666cf28a2336f33
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 924401be74..49c6d06fbf 100644 --- a/runtime/doc/change.txt +++ b/runtime/doc/change.txt @@ -1007,6 +1007,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|). @@ -1015,6 +1019,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 @@ -1094,7 +1104,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 17258f896d..c54b588e6b 100644 --- a/runtime/doc/index.txt +++ b/runtime/doc/index.txt @@ -865,6 +865,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" |