自动关闭Emacs中的大括号? [英] Automatically closing braces in Emacs?

查看:159
本文介绍了自动关闭Emacs中的大括号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看过一个Vim插件叫自动关闭(从发现此

例如;当我键入以下内容( | 是游标):

  int main(| 

我想要关闭自动为我插入:

  int main(|)


$ b $有没有人知道emacs有类似的功能 - Google这次失败了我!

还有 'paredit

但是,说实话,有一堆包围括号。维基所有这些都是这里列出的。解决您的问题的模式是:




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中的大括号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆