vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
1.keys
(584B)
1 f<i<Space><Escape> /* move to first < and insert space */
2 o<Escape> /* insert new line */
3 jf{i<Enter><Escape> /* insert new line before { */
4 w. /* repeat to insert new line before puts */
5 f;a<Enter><Escape> /* insert new line after ; */
6 ;. /* repeat last f search, repeat append */
7 ki<Space><Escape> /* move line up, insert space */
8 3. /* insert 3 more spaces (TODO: implement [count]i ?) */
9 k^4. /* move line up, insert 4 spaces */