add extra tricks
This commit is contained in:
parent
78d3de9890
commit
64a200c4df
17
index.md
17
index.md
|
@ -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><CTRL-V><TAB></u>//g
|
||||
</pre>
|
||||
|
||||
|
||||
## Remove trailing whitespace from a block
|
||||
|
||||
<pre>
|
||||
|
@ -100,6 +107,11 @@ N = 10
|
|||
</pre>
|
||||
|
||||
|
||||
## Search/replace ^M with LF
|
||||
|
||||
:g/<u><CTRL-V><ENTER></u>/s///g
|
||||
|
||||
|
||||
## Write the file as root
|
||||
|
||||
:w !doas tee %
|
||||
|
@ -224,6 +236,11 @@ map gF :%!fmt -s<u><CTRL-V><ENTER></u>
|
|||
:%s/.*/\L&/
|
||||
|
||||
|
||||
## Surround text with pattern
|
||||
|
||||
:%s/.*/`pattern` & `pattern`/
|
||||
|
||||
|
||||
## Join all lines
|
||||
|
||||
:%j
|
||||
|
|
Loading…
Reference in New Issue