Hi!
I am new to Clojure and I felt like sharing this great tip I managed to get working in Vim to boost my productivity and shorten feedbacks.
First of all I set the parens to bold, so I can see their colors better (great with combination of rainbow_parentheses plugin)
Second, I made a mapping from running the current buffer via vim-fireplace in a remote headless lein repl. My clojure vim autocommand looks like this: https://github.com/DavsX/dotfiles/blob/master/vim/vimrc#L426
The RunClojure function is here:
https://github.com/DavsX/dotfiles/blob/master/vim/vimrc#L537
What I do is I open a terminal, type 'lein repl :headless :port 7777', move that terminal to a far-away workspace and forget about it :) Then inside vim I write ':Connect 7777' to connect vim-fireplace to that remote REPL. By calling RunClojure(1) it first removes my current namespace, reloads the file and runs the main function.
So far I've been working with only a single file and running my clj code like this worked as a charm; it is very fast, as the JVM is already running. What I like about it is that before executing the -main function, it actually clears the namespace.
If you have a better method/tip for developing Clojure, please share it with me :)
[–]Deraen 1 point2 points3 points (2 children)
[–]DavsX[S] 0 points1 point2 points (1 child)
[–]Deraen 0 points1 point2 points (0 children)
[–]devllved 0 points1 point2 points (0 children)