对于那些不知道*print-length*
代表什么的人:
如果您在 REPL 中(set! *print-length* 200)
进行评估(range)
,这通常会导致打印无限的数字列表,则只会打印前 200 个数字。
我正在尝试将此设置为我所有 REPL 中的默认值profiles.clj
。现在我得到了这个,但它不起作用:
{:user {:plugins [[lein-swank "1.4.4"]
[lein-catnip "0.5.0"]]
:repl-options {*print-length* 200}}
:dev {:dependencies [[clj-ns-browser "1.2.0"]
[org.clojure/tools.trace "0.7.5"]]}}
这有什么问题?
更新。Tnx Michal 回答了这个问题。我的固定profiles.clj
现在看起来像这样。请注意,它仅适用于项目内部。
{:user {:plugins [[lein-swank "1.4.4"]
[lein-catnip "0.5.0"]]
:repl-options {:init (set! *print-length* 200)}}
:dev {:dependencies [[clj-ns-browser "1.2.0"]
[org.clojure/tools.trace "0.7.5"]]}}