I've used XCode and Netbeans, and I've noticed that they have a feature to automatically complete quotation marks or parentheses (and I assume that other IDEs often do this also). I don't know what the name of this feature is, but is there any way to do this in Emacs?
For example, when I type
printf("
I would like it to automatically input
printf("")
placing the cursor in between the quotation marks.
Thank you.
The basic variant would be AutoPairs. The same effect but a little more sophisticated can also be achieved with YASnippet.
If you type M-(, that will insert both a ( and a ), and leave point in between; if you then type M-), that will move point across the closing ). I use this all the time.
There is also a mode called "paredit" (available from http://mumble.net/~campbell/emacs/paredit.el) which does this sort of thing for quotes as well, and probably other stuff.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With