Fork me on GitHub

could anyone show me an example setup, for Clojure with repl, in vim?


thanks! been reading through that


so you use it as a daily editor? works fine without hiccups?


Daily editor on massive clojure only codebases, alongside emacs users


I've been trying spacemacs this week, and I'm convinced that vim is way better. I thought I was missing the debugger most, but I've tried it, and I'm not that impressed anyway.


so i’ve been using emacs a lot, and it works really well. i don’t use the debugger much, mainly just compiling within a repl (local or on a host)


and our codebases are pure clojure/script, so that sounds like a good fit


I can edit sexp better than evil&emacs can. Evil doesn't bring enough text objects & operators. I'm finding the cider eval-last-sexpr quite awkward to use as I have to move the cursor before I can do anything.


move it to an outer sexp?


surely with vim motions, it’d be easy to move to the right sexp you want to eval?


It is, but it's a mental interruption.


It's a weird thing, might just be personal taste, but mentally the interruption of figuring out where I need to place my cursor precisely to do the right thing just messes with me.


do you have highlighting for matching bracket? that helps me a lot


but i do agree. that annoyed me in the beginning


Yeah, it's probably just a thing where you get used to it. I'm really just trying it for a week for cross-pollination of ideas. It already encouraged me to write a funky new mapping for something I thought was neat.


Although, I'm not keeping up very well, and I keep ending up back in vim.

Jarrod Taylor (Clojure team)12:08:13

I hear so much about spacemacs that I too have considered giving it a spin just for Clojure dev to see what it is all about. Besides the discussed cursor position for evaluation what other points have lead you to feel vim is way better @dominicm


Evil is very good at plain vim emulation. But the rest of the ecosystem is largely unconcerned with being a part of that, which makes sense. But it means that, for example, there is no fireplace cp equivalent for emacs. There's also no ae,`aF`,etc. from vim-sexp. Instead you're given a list of things you might want to do: - Evaluate top level form - Evaluate last sexpr The lack of good text objects means that even things like daF doesn't exist, instead there's a specialized keybinding for deleting the top level form. tl;dr Spacemacs is really just emacs with states, but it doesn't fully utilise all of the other parts which make Vim great, e.g. the above rant on text objects & operators.

Jarrod Taylor (Clojure team)13:08:43

Good summary. I have no holy war grudge against Emacs or anything, but I haven't heard a specific concise position on what any truly compelling reasons would be for someone heavily invested in Vim to switch. I have seen people who are minimally invested in Vim happily make the switch and I have always attributed that to Spacemacs possibly having a lower time between install and evaling Clojure in your editor. Which understandably is something people desired when they are initially learning a new language.


I believe it is largely to do with the easy layers (in the Hickey sense) and also that vim bindings such as ctrl-f, etc. are really useful in themselves. I spent around 2 years not really grokking the text object & operator power, and not really taking advantage of them.


It's extremely anti-vim philosophy to build a spacemacs-like, so it's a little slow coming. There are various spacevims (all with that name, with varying amounts of capitalization and hyphenation). They just don't really appeal to me, I can't use what I can't understand.


@dominicm do you find yourself using sentences and paragraphs much?


@jebberjeb As text objects? Not in vim, no.


yes, as text objects.


Yeah, not for clojure.


I do when writing markdown though.