Automatically closing braces in Emacs?
emacs, typing
Solution
There's also `'paredit`. The cheat sheet shows you all the commands available. happen to like it better than the electric mode suggested in another answer. Though paredit does only apply to (), so it may not meed your needs.
But, to be honest, there's a bunch of packages surrounding parenthesis. The wiki has them all listed here. The modes addressing your question are:
- balancedel
- electricdotanddash
- universalcloseparen
- electricpair
- skeleton
- parenthesis
- AutoPairs
Problem
I've seen a plugin for Vim called AutoClose (discovered from this post) which automatically adds the closing brace when typing '(', '{' etc. For example; when I type the following ( `|` is the cursor): ``` int main(| ``` I would like the closing `)` to be inserted automatically for me: ``` int main(|) ``` Does anyone know of a similar feature for emacs - Google has failed me this time!