added the register link to Bill Joy article

master
mischa 2020-05-10 13:26:58 +02:00
parent ee74a16407
commit c57b73233d
1 changed files with 17 additions and 0 deletions

View File

@ -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.<br>
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).
</pre>
## Remove trailing whitespace from every line
:%s/\s\+$//
## Remove trailing whitespace from a block
:'k,'ls/\ *$//
@ -188,6 +195,16 @@ width = 40
</pre>
## Format whole document
:%!fmt -s
In your .nexrc
<pre>
map gF :%!fmt -s<u>&lt;CTRL-V&gt;&lt;ENTER&gt;</u>
</pre>
## Reverse all lines, move `m` all lines to 0
:g/1*/m0