Fork me on GitHub
#vim
<
2017-08-09
>
biscuitpants07:08:47

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

biscuitpants08:08:51

thanks! been reading through that

biscuitpants08:08:59

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

dominicm08:08:25

Daily editor on massive clojure only codebases, alongside emacs users

dominicm08:08:43

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.

biscuitpants08:08:00

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)

biscuitpants08:08:13

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

dominicm08:08:02

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.

biscuitpants08:08:01

move it to an outer sexp?

biscuitpants08:08:51

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

dominicm08:08:19

It is, but it's a mental interruption.

dominicm08:08:53

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.

biscuitpants09:08:22

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

biscuitpants09:08:15

but i do agree. that annoyed me in the beginning

dominicm09:08:54

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.

dominicm09:08:11

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

jarrodctaylor12: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

dominicm12:08:34

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.

jarrodctaylor13: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.

dominicm13:08:39

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.

dominicm13:08:47

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.

jebberjeb19:08:26

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

dominicm19:08:51

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

jebberjeb19:08:17

yes, as text objects.

dominicm20:08:16

Yeah, not for clojure.

dominicm20:08:21

I do when writing markdown though.