Fork me on GitHub
#clojure-uk
<
2019-04-17
>
dominicm05:04:49

If there was demand, I am probably well positioned to give such a talk.

dominicm05:04:09

As far as I'm aware I'm the loudest vim/clojure proponent in the country šŸ˜„

šŸ‘ 24
zyxmn14:04:25

if you get the chance, do it bro

zyxmn14:04:52

probably you will be an assassination target after but it'll be worth it

dominicm15:04:57

Not a great speaker really, so something to ponder on :)

thomas07:04:23

mogge šŸ˜¼

dominicm07:04:04

@dev964 why did you suggest the vim talk btw? Is there some element you're curious about?

practicalli-johnny08:04:06

@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.

maleghast09:04:07

@dominicm - Dooo Eeeet! šŸ˜‰

dharrigan09:04:52

I'm learning clojure and since I'm a vim(ster?) it's my go-to. So far so good.

dharrigan09:04:43

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)

šŸ˜‚ 8
maleghast09:04:39

@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.

maleghast09:04:01

I have a colleague who uses Cursive - it's a mystery to me, but it works for him šŸ™‚

jasonbell09:04:24

@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.

Sam H09:04:42

did you try out spacemacs with evil mode @dharrigan? How did you find it vs the vim set up you have now?

flefik09:04:10

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

dominicm09:04:42

Controversial: I can't stand spacemacs/evil mode.

šŸ‘ 4
maleghast09:04:22

@dominicm - That's not contrasversial IMHO

maleghast09:04:00

Contraversial would be "People who use spacemacs/evil mode are dangerous perverts who must be wipedout!"

maleghast09:04:50

FWIW I am AC/DC Vim / Emacs, but I have come to find Spacemacs in Evil Mode to be VERY productive šŸ˜‰

dharrigan09:04:55

but in the end, vim is everywhere and I use it a lot, so getting comfortable using fireplace, etc.., is fine with me šŸ™‚

dominicm09:04:12

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.

dominicm09:04:34

It drives me nuts watching emacs users moving their cursors around so that it evaluates the "last sexp".

rickmoynihan15:04:45

So what specifically is the vim/clojure way here? That say expand-region and cider-eval-region wouldnā€™t cover?

dominicm15:04:57

expand-region & eval-region get you close but it's not the "emacs way" (from what I've seen of emacs users)

dominicm15:04:17

expand-region is less precise / more key presses.

rickmoynihan15:04:54

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

rickmoynihan15:04:35

Iā€™ve been using Emacs for 20+ years, so itā€™s not gonna happenā€¦ though I do quite like vim.

dominicm15:04:27

I think lispy provides a couple of common shortcuts for doing stuff

rickmoynihan15:04:52

It doesnā€™t have org-mode though!

dominicm15:04:08

Yeah, I gave up on that. My wiki is markdown, and my todo list is http://todotxt.org

dominicm15:04:05

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)

rickmoynihan15:04:08

oh sorry lispy is an emacs modeā€¦ i thought it was a vim plugin

rickmoynihan15:04:37

interesting šŸ‘€

dominicm15:04:22

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.

dominicm15:04:48

I was being coerced into spacemacs anyway, for convenience and unity. It was in no way convenient, so I gave up.

dominicm15:04:39

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.

dominicm09:04:49

And there's a different command to evaluate a symbol?!

dominicm09:04:18

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&amp;q=vim+operator&amp;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.

zyxmn14:04:10

it has begun . muwahaha

mccraigmccraig10:04:26

that's a compact evocation @dominicm - and makes me want to learn vim properly

dominicm10:04:26

https://stackoverflow.com/a/1220118 this is the better explanation of what I'm trying to say I think

maleghast10:04:29

I ā¤ļø Vim, have done for forever. I use Emacs (Spacemacs in Evil Mode) to be "closer" to what I feel is the Clojure norm...

maleghast10:04:02

I expect that I would use Vim if more people did, and I still use it for "other things"(tm) šŸ˜‰

Sam H11:04:29

> In evil mode thereā€™s not many operators available which operators do you feel are missing?

otfrom11:04:17

I don't need emacs to be everywhere as emacs goes everywhere I need it to (I ā¤ļø tramp)

dominicm11:04:28

@shan eval is the one I use every day that I couldn't live without.

dominicm11:04:51

I think vim-surround (and ergo the evil clone of it) is not as good as a true operator surround like vim-sandwich.

dominicm11:04:07

The comment one is pretty useful, not sure if spacemacs has that?

jasonbell12:04:36

Only you @thomas only you.

šŸ˜¬ 4
practicalli-johnny13:04:33

@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.

dominicm13:04:04

I think that SO is the canonical reference in generic terms

practicalli-johnny13:04:29

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.

practicalli-johnny13:04:24

Ah, I spotted http://vimcasts.org/ in that post, that looks very useful to me

šŸ‘ 4
Aleksander00:04:50

there're not many resources that cover vim+clojure magic AFIK though šŸ˜‰

dominicm08:04:06

My blog post is quite popular :)

dominicm08:04:15

I had every intention of doing a follow up

Aleksander11:04:54

a follow up to the blog post would be great!

Aleksander12:04:00

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

dominicm12:04:44

I wouldn't consider acid/iced/conjure to be in widespread use yet.

dominicm12:04:50

Looks like spacevim has landed clojure now, that's new

dominicm12:04:48

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

Aleksander12:04:52

which as fair as I understand would provide similar completion to fireplace but with no blocking?

Aleksander12:04:38

no clue whether it's a good idea :thinking_face:

dominicm12:04:28

I wrote async-clj-omni which adds that to deoplete

dominicm12:04:33

Coc is on my list

jasonbell14:04:44

Itā€™s not a cryptic message @maleghast šŸ™‚

maleghast15:04:15

I was just wondering if you have two professional personas or not...

jasonbell15:04:34

Kind of, Jason Bell tried to sue me šŸ™‚

zyxmn15:04:17

Why šŸ˜®

jasonbell15:04:44

I had and he had

yogidevbear15:04:28

To be fair, you should have registered http://jadebellphotography.co.uk troll ā¤ļø

jasonbell21:04:12

Nah, no need to as Iā€™m not doing anything commercially.

jasonbell15:04:52

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 šŸ™‚

zyxmn15:04:36

That was very generous of you

jasonbell15:04:44

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ā€¦ā€¦

mccraigmccraig15:04:13

who says jam on a magnet is bad ?

jasonbell15:04:49

Paulā€™s letter to the Corinthiansā€¦. well Eddie Izzardā€™s version anyway.

zyxmn15:04:12

I shall take your word for it .

dominicm17:04:05

@jr0cket I vaguely recall a "speakers tutorial" or something around London Clojure, am I remembering correctly?

practicalli-johnny17:04:45

@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

šŸ‘ 8
parrot 4