vis

a vi-like editor based on Plan 9's structural regular expressions

git clone https://9o.is/git/vis.git

1.keys

(516B)


      1 a<Enter><Space><Space><Escape>                  /* line break after {, indent following line with 2 spaces */
      2 qq                                              /* start macro recording */
      3 f{a<Enter><Space><Space><Space><Space><Escape>  /* line break after {, indent following line with 4 spaces */
      4 2f,l.
      5 2;l.
      6 t}a<Enter><Space><Space><Escape>
      7 e.x
      8 q
      9 @q
     10 4@@
     11 gg /* go to very first { of file */
     12 %  /* go to matching bracket at end of file */
     13 i<Enter><Escape> /* move it to a new line */
     14 jdd /* delete last line of file */