add extra tricks

master
mischa 2023-06-06 21:00:54 +00:00
parent 78d3de9890
commit 64a200c4df
1 changed files with 17 additions and 0 deletions

View File

@ -59,6 +59,13 @@ Tested with [nvi](https://en.wikipedia.org/wiki/Nvi) 1.79 and 2.1.3 (unicode).
</pre>
## Remove tabs
<pre>
:%s/<u>&lt;CTRL-V&gt;&lt;TAB&gt;</u>//g
</pre>
## Remove trailing whitespace from a block
<pre>
@ -100,6 +107,11 @@ N = 10
</pre>
## Search/replace ^M with LF
:g/<u>&lt;CTRL-V&gt;&lt;ENTER&gt;</u>/s///g
## Write the file as root
:w !doas tee %
@ -224,6 +236,11 @@ map gF :%!fmt -s<u>&lt;CTRL-V&gt;&lt;ENTER&gt;</u>
:%s/.*/\L&/
## Surround text with pattern
:%s/.*/`pattern` & `pattern`/
## Join all lines
:%j