I just created a gist describing my Atom setup. I thought I'd mention it here. https://gist.github.com/jasongilman/d1f70507bed021b48625#file-my_atom_clojure_setup-md
Anyone using MacVim and Fireplace for Clojure? I usually use emacs for development, but I've been playing with Vim and Fireplace too. Fireplace seems to have a problem, though: I can connect to my repl without problems, and the formatting commands all work, but when I try cqc or cqp I get "not an editor command".
Is this a MacVim thing, or am I doing something wrong?
@nkraft: cqc
and cqp
are normal mode mappings not commands. (So not on the :
prompt).
Thanks @snoe. Still getting used to Vim for Clojure. I use it a lot for bash scripts, but that's been about it.
np, if you look up at @dominicm message he has a pretty good run down of some of the things you can do with vim and clojure.
I should push up my files and do a video
I've got some really nice stuff lately.
As in, since I started my job I've been forced to optimise.
I want to put together a motion for doing clojure comments over a range
I think that would be super cool
Not a motion, a, action?
@dominicm: That was a great list you put above, got me started with Vim and Clojure. Love to see more of your thoughts on the subject.
@nkraft I'll try. I'm pretty new to doing advanced stuff.
@dominicm: So am I, though you're ahead of me in the vim+clojure world. :simple_smile:
@nkraft: Ah, so you're not new to vim, I misread I think.
@dominicm: I've just used vim for quick hacks on bash and python scripts. This venture into vim+clojure is the first time I've tried to use vim for serious development. I usually turn to emacs+cider for that, but I find I'm enjoying vim a lot.
I ❤️ sexp.
Me too.
It brings a bunch of text objects you need.
Though I dislike paredit in any editor.
Steve Losh used Clojure for a while, so he has some interesting configs for sexp. But he uses Paredit.vim as well, I need to check out what he uses each for.
paredit.vim pretty much just provides sexp (with weird mappings imo), and paren balancing.
If it's anything like paredit in Emacs, I do not want a set of commands or mappings for editing parenthesis, I want to manage them in my editor. I could rant about paredit all afternoon, but I won't. Suffice to say that I've disliked it for more than 10 years, and I don't think I'm going to "see the light" anytime soon. :simple_smile:
Interesting.. 😛 I love the ability to just use a binding, and wrap an element in parens, move an element back and forth, etc.
Lots of people feel like you do about paredit. I know I'm in the minority. After years of common lisp and other lispy languages, I have muscle memory and a workflow that makes paredit feel like a rude guest in my editor.
I'm interested to see how you work more than anything 😛
It would be really cool.
@nkraft well I think that same feeling was an inspiration for parinfer. I would like to hear a rant on paredit though, it's something I hear every so often but don't fully understand.
@snoe what did you use pre-parinfer?
a mix of paredit and sexp
now I'm using all three :simple_smile: because nothing is great
ah, why a mix? Which parts? Might I want to copy that? HMMM? 😛
paredit for D
handling mostly. sexp for movement, transpose, wrapping. parinfer for paren ballencing etc
Yeah, that's pretty much all I miss from paredit.vim, I thought so
I've managed to survive without by just doing "dae" generally.
parinfer handles D
pretty well.`
I just have time for a mini-rant, but my biggest peeve is the way Paredit tries too hard to be "helpful" and enforce a way of writing code. If I have (fnc 1 2) and I want to add (a (fnc 1 2)) I want something to tell me when I don't match the parenthesis, but I don't want to hit '(' and get '() (fnc 1 2)' with a right parenthesis that I now can't move except with paredit's special commands. Changing (fnc 1 2) to (a (fnc 1 2)) takes me four keystrokes with no visual confusion. Paredit just doesn't improve on that.
I spend half the time using paredit with it disabled so it will get out of my way.
I agree there, vim-sexp has some insert mode mappings, and you can turn those off (without losing everything else)
although, I have become one with my editor in that case, and just do umm... ,i
and it wraps turns (fnc 1 2)
into ( (fnc 1 2))
My brain just doesn't think like that. When I want a parenthesis, my fingers hit the parenthesis keys. It does sound, though, like using paredit in vim might be a bit less trouble than it is in Emacs.
That's just me, though. Since I started coding before paredit was around, I already had a workflow and style when everyone jumped on the paredit bandwagon.
Well wrap exists in emacs paredit, and I think that vim's paredit stuff is much less "helpful" than emacs. It does sound like you might enjoy parinfer
I'll give it a try. I just installed it in my vim. Seems a lot less heavy-handed than Emacs paredit. Llet's see how the rest of the day goes.
Thanks for the parinfer pointer.
vim is generally less rude
I'm getting that feeling about vim.