This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-04-17
Channels
- # announcements (4)
- # aws (17)
- # beginners (108)
- # calva (2)
- # clojure (164)
- # clojure-austin (1)
- # clojure-europe (3)
- # clojure-italy (1)
- # clojure-nl (17)
- # clojure-uk (98)
- # clojurescript (31)
- # code-reviews (1)
- # cursive (23)
- # data-science (1)
- # dirac (6)
- # emacs (21)
- # figwheel-main (1)
- # fulcro (53)
- # graphql (2)
- # hoplon (1)
- # lein-figwheel (1)
- # leiningen (2)
- # lumo (21)
- # off-topic (118)
- # onyx (4)
- # pathom (59)
- # pedestal (2)
- # planck (3)
- # reagent (47)
- # reitit (2)
- # shadow-cljs (258)
- # spacemacs (3)
- # sql (10)
- # tools-deps (37)
As far as I'm aware I'm the loudest vim/clojure proponent in the country š
@dev964 why did you suggest the vim talk btw? Is there some element you're curious about?
@dominicm we were discussing how much Vim tooling for Clojure had evolved, beyond just Fireplace. I certainly have a big gap in my knowledge of the state of the art Vim tooling for Clojure at the moment. Thanks to Spacemacs & Evil mode in Emacs, I have a much greater appreciation of Vim style editing, so I am curious about how good an experience I can get with Vim & itās plug-ins for Clojure.
I have tried spacemacs and visual studio code (with calva), but I keep drifting back to vim, since the keystrokes have burned themselves into my DNA (which I'm hopeful I've passed on to my offspring)
@dharrigan - As good a reason as any, I would say. Tool choice needs to be driven by what you feel is easy, not what someone tells you is easy.
I have a colleague who uses Cursive - it's a mystery to me, but it works for him š
@dharrigan Many moons ago I would have said the same but Emacs ended up working better for me where Clojure is concerned. Itās just the retuning of muscle memory. I still use vi for small stuff a lot though.
did you try out spacemacs with evil mode @dharrigan? How did you find it vs the vim set up you have now?
i migrated from vim to spacemacs. In many ways it's much much nicer. The default config is fantastic and the key mappings are sensible and it's great for working in multiple languages and fairly consistent across all. But god oh god it is sooo slow compared to neovim
Contraversial would be "People who use spacemacs/evil mode are dangerous perverts who must be wipedout!"
FWIW I am AC/DC Vim / Emacs, but I have come to find Spacemacs in Evil Mode to be VERY productive š
but in the end, vim is everywhere and I use it a lot, so getting comfortable using fireplace, etc.., is fine with me š
It's only got the built-in operators, there's no operator for things in emacs libraries, e.g. eval
. There's also no text objects for lisp at all, again, just the ones built into vim.
From anywhere within a function I can decide how much to evaluate.
It drives me nuts watching emacs users moving their cursors around so that it evaluates the "last sexp".
So what specifically is the vim/clojure way here? That say expand-region
and cider-eval-region
wouldnāt cover?
expand-region & eval-region get you close but it's not the "emacs way" (from what I've seen of emacs users)
yes it requires more expansions than youād likeā¦ though I wonder if itās configurable somehowā¦ I donāt tend to use expand-region much for that reasonā¦ might take a look one day. It is a bit annoying moving the cursor about to eval something
Iāve been using Emacs for 20+ years, so itās not gonna happenā¦ though I do quite like vim.
It doesnāt have org-mode though!
Yeah, I gave up on that. My wiki is markdown, and my todo list is http://todotxt.org
https://github.com/luxbock/evil-cleverparens adds some text objects, but then I didn't have an eval operator anyway, and they're missing my favorite from vim-sexp (`ie`, whatever the element at my cursor is as clojure would read it)
oh sorry lispy is an emacs modeā¦ i thought it was a vim plugin
interesting š
At the point I was looking at adding evil-cleverparens to spacemacs I realized that I'm at the level of customization that I might as well be using vim.
I was being coerced into spacemacs anyway, for convenience and unity. It was in no way convenient, so I gave up.
I've been doing vim for like 8 years now, so it's a hard habit to break anyway. I decided evil mode was just a pretender and moved on.
To belabor the point (because I'm between tickets), vim is about multiplying together "Operators" (actions, verbs, e.g. "copy", "delete") and "Text Objects" (nouns, e.g. "paragraph", "word", "closest matching parens", "clojure form at cursor") and combining them. In evil mode there's not many operators available, especially that you'd regularly use: copy/delete. There's very few emacs plugins that actually add new ones too (surround has something I believe?). https://github.com/search?utf8=%E2%9C%93&q=vim+operator&type= there's loads for vim, commenting toggling, whitespace alignment, exchange, grep, camel-snakeKebab, and importantly for Clojure: Eval. Same goes for text objects, in emacs you've got word, paragraph, and the built-in vim ones. Those are great for C/documents, but Clojure is a lisp, we have way more objects to talk about. Top level forms, closest matching brackets, the string on cursor, the closest symbol, there's loads! In emacs, you have to learn way more to do things, so people don't actually learn those things, they work around it. I can comment out a top-level-defun (as I think cider/clojure-mode calls it) without having to think, I can also comment out the whole file, the string near my cursor, whatever. If I have a set of operators: delete, comment, camel-snake, grep, comment, eval And I have a set of objects: paragraph, word, symbol, closest form of any kind, string, top-level-defun, sneak, find In emacs that's 48 individual commands, and I bet most of them wouldn't exist. In vim that's 14 different things to learn.
that's a compact evocation @dominicm - and makes me want to learn vim properly
https://stackoverflow.com/a/1220118 this is the better explanation of what I'm trying to say I think
I ā¤ļø Vim, have done for forever. I use Emacs (Spacemacs in Evil Mode) to be "closer" to what I feel is the Clojure norm...
I expect that I would use Vim if more people did, and I still use it for "other things"(tm) š
> In evil mode thereās not many operators available which operators do you feel are missing?
I don't need emacs to be everywhere as emacs goes everywhere I need it to (I ā¤ļø tramp)
I think vim-surround (and ergo the evil clone of it) is not as good as a true operator surround like vim-sandwich.
@dominicm It would be useful to see this vim magic in action, are there any videos / screencasts of what you are suggesting. I am not able to understand what I am missing out on. Thanks.
I'm going to create some more Spacemacs evil-mode videos over the holiday weekend, so will refer to the stack overflow post to see what I am already doing and what is still missing. Thanks.
Ah, I spotted http://vimcasts.org/ in that post, that looks very useful to me
there're not many resources that cover vim+clojure magic AFIK though š
a follow up to the blog post would be great!
These are the updates that I'm aware of:
- acid has had a complete rewrite and has a jazz
companion
- iced
- integrated plugin
- joker
- plethora of completion plugins like coc.vim, ale, compliment and ...
- conjure
- spacevim
a lot of the plugins seem to have overlapping functionality
Coc.vim and all the lsp stuff is pretty much dead for clojure outside a tiny lsp server which last I checked doesn't work with non-lein projects, and is incredibly static
which as fair as I understand would provide similar completion to fireplace but with no blocking?
no clue whether it's a good idea :thinking_face:
Itās not a cryptic message @maleghast š
To be fair, you should have registered http://jadebellphotography.co.uk ā¤ļø
This was over 10 years ago. I gave him my domain name once I didnāt need it any more. I just get the odd reminder email for it and forward it to him. Then itās a āHi, how ya doināā kinda deal š
Always do good things, never do bad things. Never put a sock in a toaster, never put jam on a magnet, never lean on a Tuesdayā¦ā¦
who says jam on a magnet is bad ?
@jr0cket I vaguely recall a "speakers tutorial" or something around London Clojure, am I remembering correctly?
@dominicm there is this one I did a while ago, mainly about creating a good talk submission. https://skillsmatter.com/skillscasts/7853-workshop-giving-your-first-meetup-or-clojure-exchange-talk