3 ms·
I use Vim for editing Lisp. Basic :set lisp mode that dates back to ancient Unix implementations of vi and the % command for jumping between matching parenthese
by kazinator 10y ago
I use Vim for editing Lisp. Basic :set lisp mode that dates back to ancient Unix implementations of vi and the % command for jumping between matching parentheses. In Vim, selecting a range and typing = re-indents it, and == indents the current line. I set shiftwidth to 2. When I need to move the indentation of a whole block I use select and < or >. Or << and >> for the current line. With those basics, I comfortably do 95% of all Lisp editing.
For instance to move an expression: put cursor on one parenthesis, type v for visual select, type % to jump to the other paren, then x to delete. Move somewhere, p to paste. Adjust formatting here and there, done.
I edit C and other languages in pretty much exactly the same way.