1 Test for "*Cmd" autocommands
5 :/^start/,$w! Xxx " write lines below to Xxx
6 :au BufReadCmd testA 0r Xxx|$del
7 :e testA " will read text of Xxd instead
8 :au BufWriteCmd testA call append(line("$"), "write")
9 :w " will append a line to the file
10 :r testA " should not read anything
16 :au FileReadCmd testB '[r Xxx
17 :2r testB " will read Xxx below line 2 instead
25 :au FileWriteCmd testC '[,']copy $
27 :4,5w testC " will copy lines 4 and 5 to the end
28 :r testC " should not read anything
38 :au FILEAppendCmd testD '[,']w! test.out
39 :w >>testD " will write all lines to test.out
40 :$r testD " should not read anything
41 :$w >>test.out " append "end of Xxx" to test.out
42 :au BufReadCmd testE 0r test.out|$del
43 :sp testE " split window with test.out
45 :au BufWriteCmd testE w! test.out
46 :wall " will write other window to test.out