tpope / vim-fireplace

fireplace.vim: Clojure REPL support
https://www.vim.org/scripts/script.php?script_id=4978
1.74k stars 139 forks source link

Make pprint width configurable #364

Closed SevereOverfl0w closed 5 years ago

SevereOverfl0w commented 5 years ago

Currently appears to be tied to &columns. I find &columns too wide when I am working with lists of maps, I'd rather constrain the pprint to ~80-120 chars or so.

e.g.

({:a 10, :children [{:a 20, :children [:a :b :c]} {:a 30, :children [:a :b :c]}]} {:a 20, :children [:a :b :c]} {:a 30, :children [:a :b :c]})

is harder to read than

({:a 10, :children [{:a 20, :children [:a :b :c]} {:a 30, :children [:a :b :c]}]}    
 {:a 20, :children [:a :b :c]}                                                       
 {:a 30, :children [:a :b :c]})  

(the latter was done by reducing the width of my window by opening an adjacent terminal)

tpope commented 5 years ago

I'd accept a patch that does min([old_value, get(g:, 'fireplace_print_width', 9999)]).