Automatically closing braces in Emacs?

前端 未结 4 1670
臣服心动
臣服心动 2020-12-05 13:30

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

4条回答
  •  余生分开走
    2020-12-05 14:23

    cmarcelo has written a wonderful post about this using skeleton mode. He also shows how to remove the balanced bracket if you delete the opening bracket and how to deal with the case that you accidentally type the closing bracket. (Incidentally both behaviors copy TextMate).

    Update:

    Since I posted this answer, I've discovered Autopair which is a pretty much perfect system for this use case. I've been using it a lot and loving it.

提交回复
热议问题