delete all lines N long, suggested by @ixc@bsd.network
This commit is contained in:
parent
8f839d09b1
commit
f069fab63c
8
index.md
8
index.md
|
@ -47,6 +47,14 @@ Helpful documents:
|
||||||
|
|
||||||
:%s/^.\{0,5\}//
|
:%s/^.\{0,5\}//
|
||||||
|
|
||||||
|
#### Delete all lines N (10) characters long
|
||||||
|
|
||||||
|
:g/^.\{10\}$/d
|
||||||
|
|
||||||
|
#### Delete all lines _except_ N (10) characters long
|
||||||
|
|
||||||
|
:g!/^.\{10\}$/d
|
||||||
|
|
||||||
#### Search and replace PATHs, using different delimiter
|
#### Search and replace PATHs, using different delimiter
|
||||||
|
|
||||||
:%s#/usr/local/log#/var/log#g
|
:%s#/usr/local/log#/var/log#g
|
||||||
|
|
Loading…
Reference in New Issue