27 lines · 431 B · Text
RawDownload
Tests for multi-line regexps with ":s". vim: set ft=vim : STARTTEST:" test if replacing a line break works with a back reference:/^1/,/^2/s/\n\(.\)/ \1/:" test if inserting a line break works with a back reference:/^3/,/^4/s/\(.\)$/\r\1/:" test if replacing a line break with another line break works:/^5/,/^6/s/\(\_d\{3}\)/x\1x/:/^1/,$w! test.out:qa!ENDTEST 1 aabbcc2 ddee3 efgh4 ij5 a88b c99d6 e777fxxxxx