From 28e0650bd547fd0f15635a625234f9378ce954ae Mon Sep 17 00:00:00 2001 From: Randy8080 Date: Thu, 26 Aug 2021 14:44:51 +0800 Subject: [PATCH] View the duplicates lines (very magic) --- vim.md | 1 + 1 file changed, 1 insertion(+) diff --git a/vim.md b/vim.md index 38ee1be..3685a1a 100644 --- a/vim.md +++ b/vim.md @@ -558,6 +558,7 @@ Search and Replace {.cols-3} :g/^pattern/s/$/mytext # Find and append text to the end :g/pattern/norm! @i # Run a macro on matching lines /^\(.*\)\(\r\?\n\1\)\+$ # View the duplicates lines +/\v^(.*)(\r?\n\1)+$ # View the duplicates lines (very magic) :v/./,/./-j # Compress blank lines into a blank line :g//,//d # Delete inclusively from to ```