3 ms·
> My brain thinks in terms of editing lines, not s-expressions; I didn't get the hang of paredit, and editing without paredit required really tedious edit opera
by felideon 10y ago
> My brain thinks in terms of editing lines, not s-expressions; I didn't get the hang of paredit, and editing without paredit required really tedious edit operations.
In my experience, learning and then working in Common Lisp, starting with paredit is tough. I disabled paredit for a while until I got the hang of thinking in s-expressions as you say. After a while when I tried paredit again, it was glorious.
Early on I did set up % as a global key that goes to the matching parenthesis if on parenthesis, and otherwise inserts the character typed.
Also, I hope you were setting https://www.emacswiki.org/emacs/ShowParenMode https://www.emacswiki.org/emacs/ShowParenMode
Just my 2¢.
- kazinator 10y agoI 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.