commit f069fab63c52aae63c74292f3ff010f9d25d2e33 from: mischa date: Tue Apr 16 07:45:50 2019 UTC delete all lines N long, suggested by @ixc@bsd.network commit - 8f839d09b1ce3498360c6ce0e686fce1c0f27404 commit + f069fab63c52aae63c74292f3ff010f9d25d2e33 blob - 76ff27f42df53bbabc07ae615d8ad3733a3b6364 blob + 9a3d54edb40a74e00f176579c59dc0741b8c0b95 --- index.md +++ index.md @@ -47,6 +47,14 @@ Helpful documents: :%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 :%s#/usr/local/log#/var/log#g