问题描述
我看过一个Vim插件叫 。解决您的问题的模式是:
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!
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:
这篇关于自动关闭Emacs中的大括号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!