added the register link to Bill Joy article
This commit is contained in:
parent
ee74a16407
commit
c57b73233d
17
index.md
17
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.<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><CTRL-V><ENTER></u>
|
||||
</pre>
|
||||
|
||||
## Reverse all lines, move `m` all lines to 0
|
||||
|
||||
:g/1*/m0
|
||||
|
Loading…
Reference in New Issue
Block a user