Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You probably know that, but there is smartparens mode which does similar magic to non-lisp languages: https://github.com/Fuco1/smartparens


In recent years, I have been spoiled by doom-emacs (and previously spacemacs). They have made everything work out of the box for me to such an extent that I mostly don't know what's active--I've just learned the right leader combination to get what I need done.

It turns out I've been using smartparens without realizing--just opened a file and checked the active modes to find out.

The keys I've learned are (using evil):

- [Visual mode] S -> surround by a pair

- [Visual mode] d <char> -> delete pair of <char>

- [Visual mode] c <c1> <c2> -> replace pair of <c1> with pair of <c2>

Those along with C-M-k to kill a sexp and % to go to the other end of a pair have been all I need for my work (the vast majority C/C++ and Python).

One thing I keep putting off is figuring out a way to jump to the opening/closing quotes. For those I still have to go medieval if there's any nesting.


I did not know that!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: