From c57b73233d33683a79506aba1368d3a91eaf8a7b Mon Sep 17 00:00:00 2001 From: mischa Date: Sun, 10 May 2020 13:26:58 +0200 Subject: [PATCH] added the register link to Bill Joy article --- index.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/index.md b/index.md index 399bde6..fb3a830 100644 --- a/index.md +++ b/index.md @@ -13,6 +13,8 @@ text editor in any Unix-like operating system._ Here is a collection of [vi(1)](https://man.openbsd.org/vi.1)/[ex(1)](https://man.openbsd.org/ex.1) commands and command sequences.
Tested with [nvi](https://en.wikipedia.org/wiki/Nvi) 1.79 and 2.1.3 (unicode). +[Bill Joy's greatest gift to man - the vi editor](https://www.theregister.co.uk/2003/09/11/bill_joys_greatest_gift/) + ## Yank/delete lines @@ -50,6 +52,11 @@ Tested with [nvi](https://en.wikipedia.org/wiki/Nvi) 1.79 and 2.1.3 (unicode). +## Remove trailing whitespace from every line + + :%s/\s\+$// + + ## Remove trailing whitespace from a block :'k,'ls/\ *$// @@ -188,6 +195,16 @@ width = 40 +## Format whole document + + :%!fmt -s + +In your .nexrc + +
+map gF :%!fmt -s<CTRL-V><ENTER>
+
+ ## Reverse all lines, move `m` all lines to 0 :g/1*/m0