Emacs Clojure模式没有paredit [英] Emacs Clojure mode without paredit

查看:183
本文介绍了Emacs Clojure模式没有paredit的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用ELPA的Clojure模式包。否则一切都很好,但我只是不能忍受paredit模式。我似乎不能轻易地关闭它,现在我只是禁用它为我打开的每个缓冲区。我尝试将此变量设置为nil:

I'm using the Clojure mode package from ELPA. Otherwise everything is fine, but I just can't stand paredit mode. I can't seem to turn it off easily, now I just disable it for every buffer I open. I tried setting this variable to nil:

(setq clojure-enable-paredit nil)

但仍然显示paredit。任何想法?

But paredit still appears. Any ideas?

推荐答案

不是你的实际问题的答案,但给予paredit模式一个机会。我也很害怕它自动关闭我的括号,并拒绝为我删除只是一个简单。

Not an answer to your actual question, but give paredit mode a chance. I, too, was really annoyed with it automatically closing my parens, and refusing to delete just a single paren for me.

但这样做使它能够确定次的缓冲区是一个平衡良好的sexp,所以它可以为你执行许多有用的sexp导向的任务,而不仅仅是文本导向的任务。例如,我一直使用以下

But doing this enables it to be certain at all times that the buffer is a well-balanced sexp, so it can perform many useful sexp-oriented tasks for you instead of just text-oriented tasks. For example, I use the following all the time:


  • M-例如,将(map f some-list)变成(doto(map f some-list)println) / li>
  • C-)将另一个sexpslurp到当前一个,例如转动(let [x 10])(println x)(let [x 10](println x))

  • M-<在源树中的某个级别更高,破坏包装它的东西,例如将(first(map f some-list))转换为(map f some-list)(第一个列表)

  • M-( to wrap a sexp with a new one, eg turn (map f some-list) into (doto (map f some-list) println)
  • C-) to "slurp" another sexp into the current one, eg turn (let [x 10]) (println x) into (let [x 10] (println x))
  • M-<UP> and/or M-r to pull the sexp at point a level "higher" in the source tree, destroying the thing that was wrapping it, eg to turn (first (map f some-list)) into (map f some-list) or (first some-list)

有这么多有用的功能,让你开始编辑代码而不是文本。虽然有很多优秀的Lisp黑客谁不喜欢paredit模式,我建议你不要决定反对它,然后才能实现它可以为你做的真棒的东西。

There are zillions of useful features like this, that let you start editing code instead of text. And while there are plenty of excellent Lisp hackers who don't like paredit mode, I advise you not to decide against it before you realize the awesome stuff it can do for you.

这篇关于Emacs Clojure模式没有paredit的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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