top | item 42621928 (no title) _19qg | 1 year ago With paredit in GNU Emacs:1) place the cursor on the left parenthesis of the form2) type paredit-wrap-round: M-(3) type: if flagDoesn't appear to be overly complex. discuss order hn newest kagevf|1 year ago With built-in emacs functionality you can do:1. Place the cursor on the left parenthesis of the form (same as you wrote)2. C-M-Space to select the form.3. M-( to surrond with parenthesis.4. type "if flag" (same as you wrote for #3)One extra step, but no need for a plugin.Also, I added a simple "insert-quotes" that I think I mostly copy-pasted from the built-in "insert-parentheses": (defun insert-quotes (&optional arg) (interactive "P") (insert-pair arg ?\" ?\")) So I can replace my #3 above to wrap something with quotes instead of parentheses. lispm|1 year ago > So I can replace my #3 above to wrap something with quotes instead of parentheses.That's M-" . load replies (1) sudahtigabulan|1 year ago Typing "(if flag", and then C-Right to slurp the call in is also intuitive and short.What truly confuses me is how the PP claims they "went in completely" and "did this for a few months", yet they failed to learn the basics.
kagevf|1 year ago With built-in emacs functionality you can do:1. Place the cursor on the left parenthesis of the form (same as you wrote)2. C-M-Space to select the form.3. M-( to surrond with parenthesis.4. type "if flag" (same as you wrote for #3)One extra step, but no need for a plugin.Also, I added a simple "insert-quotes" that I think I mostly copy-pasted from the built-in "insert-parentheses": (defun insert-quotes (&optional arg) (interactive "P") (insert-pair arg ?\" ?\")) So I can replace my #3 above to wrap something with quotes instead of parentheses. lispm|1 year ago > So I can replace my #3 above to wrap something with quotes instead of parentheses.That's M-" . load replies (1)
lispm|1 year ago > So I can replace my #3 above to wrap something with quotes instead of parentheses.That's M-" . load replies (1)
sudahtigabulan|1 year ago Typing "(if flag", and then C-Right to slurp the call in is also intuitive and short.What truly confuses me is how the PP claims they "went in completely" and "did this for a few months", yet they failed to learn the basics.
kagevf|1 year ago
1. Place the cursor on the left parenthesis of the form (same as you wrote)
2. C-M-Space to select the form.
3. M-( to surrond with parenthesis.
4. type "if flag" (same as you wrote for #3)
One extra step, but no need for a plugin.
Also, I added a simple "insert-quotes" that I think I mostly copy-pasted from the built-in "insert-parentheses":
So I can replace my #3 above to wrap something with quotes instead of parentheses.lispm|1 year ago
That's M-" .
sudahtigabulan|1 year ago
What truly confuses me is how the PP claims they "went in completely" and "did this for a few months", yet they failed to learn the basics.