Back to front pageView on Hacker News (opens in a new tab)Show HN: Parinfer – a simpler way to write Lisp (opens in a new tab)shaunlebron.github.io674 pointsby undershirt (on Hacker News)11 years agoshaunlebron.github.io (opens in a new tab)Parinfer - simpler Lisp editingParinfer - simpler Lisp editingComments (134) 36 threadsShow all commentsShowing thread 4 of 36[-]da4c30ff11 years ago2 replies#For emacs, there's the electric-indentation-mode and the fantastic aggressive-indent-mode.https://github.com/Malabarba/aggressive-indent-modemsbarnett11 years ago#This reminds me more of Paredit, in that it handles s-expression aware source transformations, and not just indentation:http://emacsrocks.com/e14.htmlI would deeply love to see this kind of inference engine ported to emacs as an alternative to Paredit's chords[-]ruricolist11 years ago1 reply#A more direct comparison for Emacs would be `adjust-parens`:https://elpa.gnu.org/packages/adjust-parens.htmlalphapapa11 years ago#Wow! This is fantastic! This seems to do just what Parinfer does. Why isn't this mode more well-known?This makes it even better: (defun my/lisp-dedent-adjust-parens () (interactive) (save-excursion (x4-smarter-beginning-of-line) (call-interactively 'lisp-dedent-adjust-parens))) (defun my/lisp-indent-adjust-parens () (interactive) (save-excursion (x4-smarter-beginning-of-line) (call-interactively 'lisp-indent-adjust-parens))) (local-set-key (kbd "") 'my/lisp-dedent-adjust-parens) (local-set-key (kbd "") 'my/lisp-indent-adjust-parens) Now you can just M-left and M-right to adjust the indentation of any line, regardless of where the point is, and adjust-parens fixes the parens for you.
Show HN: Parinfer – a simpler way to write Lisp (opens in a new tab)shaunlebron.github.io674 pointsby undershirt (on Hacker News)11 years ago
da4c30ff11 years ago2 replies#For emacs, there's the electric-indentation-mode and the fantastic aggressive-indent-mode.https://github.com/Malabarba/aggressive-indent-mode
msbarnett11 years ago#This reminds me more of Paredit, in that it handles s-expression aware source transformations, and not just indentation:http://emacsrocks.com/e14.htmlI would deeply love to see this kind of inference engine ported to emacs as an alternative to Paredit's chords
ruricolist11 years ago1 reply#A more direct comparison for Emacs would be `adjust-parens`:https://elpa.gnu.org/packages/adjust-parens.html
alphapapa11 years ago#Wow! This is fantastic! This seems to do just what Parinfer does. Why isn't this mode more well-known?This makes it even better: (defun my/lisp-dedent-adjust-parens () (interactive) (save-excursion (x4-smarter-beginning-of-line) (call-interactively 'lisp-dedent-adjust-parens))) (defun my/lisp-indent-adjust-parens () (interactive) (save-excursion (x4-smarter-beginning-of-line) (call-interactively 'lisp-indent-adjust-parens))) (local-set-key (kbd "") 'my/lisp-dedent-adjust-parens) (local-set-key (kbd "") 'my/lisp-indent-adjust-parens) Now you can just M-left and M-right to adjust the indentation of any line, regardless of where the point is, and adjust-parens fixes the parens for you.
Comments (134) 36 threads
Show all comments
Showing thread 4 of 36
https://github.com/Malabarba/aggressive-indent-mode
http://emacsrocks.com/e14.html
I would deeply love to see this kind of inference engine ported to emacs as an alternative to Paredit's chords
https://elpa.gnu.org/packages/adjust-parens.html
This makes it even better:
Now you can just M-left and M-right to adjust the indentation of any line, regardless of where the point is, and adjust-parens fixes the parens for you.