a /* line break after {, indent following line with 2 spaces */ qq /* start macro recording */ f{a /* line break after {, indent following line with 4 spaces */ 2f,l. 2;l. t}a e.x q @q 4@@ gg /* go to very first { of file */ % /* go to matching bracket at end of file */ i /* move it to a new line */ jdd /* delete last line of file */