This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-02-28
Channels
- # beginners (226)
- # boot (18)
- # bristol-clojurians (4)
- # cider (1)
- # clara (77)
- # cljs-dev (79)
- # cljsjs (27)
- # clojure (178)
- # clojure-austin (9)
- # clojure-dev (30)
- # clojure-gamedev (11)
- # clojure-italy (5)
- # clojure-losangeles (3)
- # clojure-poland (1)
- # clojure-spec (42)
- # clojure-uk (34)
- # clojurescript (182)
- # core-async (5)
- # core-logic (2)
- # cursive (17)
- # datascript (12)
- # datomic (33)
- # emacs (8)
- # figwheel (1)
- # fulcro (25)
- # jobs (6)
- # jobs-discuss (27)
- # lein-figwheel (1)
- # lumo (18)
- # off-topic (17)
- # onyx (5)
- # pedestal (7)
- # re-frame (30)
- # reagent (52)
- # remote-jobs (1)
- # ring (2)
- # ring-swagger (1)
- # shadow-cljs (40)
- # spacemacs (5)
- # sql (31)
- # unrepl (12)
- # vim (25)
@dave Hadn't seen it, checked it, but it doesn't seem to give anything extra to my workflows, unless I start using :terminal for other things than the repl. Most likely I want to either send sexps (which the line based selection doesn't help) or have an interactive session with tab-completion, command history and so on, so I don't want to input commands via the :T
Is there a reasonable way to get the current namespace of the file, for running (run-tests 'your.namespace 'some.other.namespace) in the repl?
function! SendToTerm(lines)
call jobsend(g:last_term_job_id, add(a:lines, ''))
endfunction
function! SyncRepl()
call SendToREPL("(require '[clojure.pprint :refer [pprint]])(require '[clojure.repl :refer :all]) #_(require '[hara.reflect :refer :all]) #_(require '[hara.class :refer :all])")
call SendToTerm([" (in-ns '" . fireplace#ns() . ") "])
endfunction
function! SendToREPL(sexp)
call fireplace#session_eval(a:sexp)
endfunction
@tomi.hukkalainen_slac Curious to see where you end up w/ it. I usually just move to the top of the buffer, eval the ns
form to switch namespace, then just run-tests
, w/ no args.
fireplace#ns() is at https://github.com/tpope/vim-fireplace/blob/265fc95f7b1b3ec4371403a2f9074dc171bf7978/plugin/fireplace.vim#L574
And I'm one of those people who can't just stop at "it works" but has to go to "I understand it"
So I'm immediately stopping at things like "What's that a:0, the first argument?" and "is the s: in s:buf just a naming convention, or does it somehow change how the function works"
Make a keybinding that goes to the top of the file and eval’s the first form, which is almost always going to be the ns form.
I saw a post in Planet Clojure today, with some statistics about clojure developers. I don't know what the target group really was, but I was quite surprised that vim was listed above 10% in IDEs/editors.
Maybe clojure is different from older lisps, or I'm just pessimistic since noone else around me uses vim 🙂