View the duplicates lines (very magic)

This commit is contained in:
Randy8080 committed 2021-08-26 17:34:56 +08:00
1 parent 48b9bdde68
commit 28e0650bd5
1 file changed
+1
+1
View File
@@ -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/<p1>/,/<p2>/d # Delete inclusively from <p1> to <p2>
```