【问题标题】:Set fill-column for all cider output为所有苹果酒输出设置填充列
【发布时间】:2014-08-21 04:39:03
【问题描述】:

我想为所有苹果酒输出设置填充列值。我正在使用:

(require 'cider)
(setq cider-show-error-buffer              nil
      cider-docview-fill-column            76
      cider-stacktrace-fill-column         76
      nrepl-buffer-name-show-port          nil
      cider-repl-display-in-current-window t
      cider-repl-result-prefix             ";; => ")

但是当我打电话给meta 时,我得到了这个:

user> (meta #'str)
;; => {:added "1.0", :ns #<Namespace clojure.core>, :name str, :file "clojure/core.clj", :static true, :column 1, :line 511, :tag java.lang.String, :arglists ([] [x] [x & ys]), :doc "With no args, returns the empty string. With one arg x, returns\n  x.toString().  (str nil) returns the empty string. With more than\n  one arg, returns the concatenation of the str values of the args."}

一切都在一行中。我敢打赌有一些变量cider-...-fill-column 会对我有所帮助。我用谷歌搜索了它,但只找到了cider-docview-fill-columncider-stacktrace-fill-column

【问题讨论】:

    标签: emacs clojure cider


    【解决方案1】:

    没有这样的 REPL 填充列变量,但您可以在 REPL 中启用 eval 结果的漂亮打印(请参阅 REPL 的菜单)。您可以像这样从您的配置中启用它:

    (setq cider-repl-use-pretty-printing t)
    

    【讨论】:

    • 是的,M-x cider-repl-toggle-pretty-printing 有效。我可以在我的 .emacs 文件中启用它,让它默认工作吗?
    • 你能告诉我为什么漂亮的打印会禁用 cider-repl-result-prefix 吗?它们可以共存吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-11-02
    • 1970-01-01
    • 2014-12-01
    • 2016-04-07
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多