Fork me on GitHub
#vim
<
2016-10-03
>
dominicm06:10:01

I run lein repls outside of a project.. I have to connect manually, but it otherwise works.

chrisetheridge09:10:46

does anyone have a script / plugin that can automatically refactor clojure code on save? in emacs, i had a snippet that would ‘clean’ the buffer everytime it saved - basically remove trailing whitespace, and clj-refactor forms

zamaterian10:10:58

autocmd FileType clj,cljs,clojure autocmd BufWritePre <buffer> :%s/\s\+$//e just expand with a call to clj-refactor ..

dominicm10:10:11

autocmd FileType clj,cljs,clojure autocmd BufWritePre <buffer> :CCleanNS might work, if you're using nvim refactor

chrisetheridge10:10:01

oh, wow, that is so elegant!

chrisetheridge10:10:05

my lisp fn was so big

dominicm11:10:10

vim vs emacs on this stuff is sorta a pro/con thing. For anything large, I'd guess emacs would win on maintainability because everything is a function, and elisp and all that.

dominicm11:10:28

But vim is excellent at turning your repeated actions into automated ones.

dominicm11:10:37

nnoremap X diw I already know diw, and I want a quicker way to do it. Elisp as I understand is all about finding the corresponding function(s) that underly your keys, and adding a hook somewhere.

chrisetheridge11:10:25

yeah, i totally agree. Emacs has some nice ideas, but i found it a bit clunky and i really did not like the shortcuts. i did not like them cause they were just that - shortcuts. Vim shortcuts make sense, like diw - delete inner word. and cause i know d` is delete, i can add any motion to that. so knowing the simple parts, builds up to larger and complex parts

chrisetheridge11:10:31

also the . form is amazing

dominicm12:10:13

vim-repeat makes it better, although I've gotten by without it pretty well. Worth checking out though I think.

dominicm12:10:57

https://github.com/tpope/vim-repeat maybe I should install it and use it more

dominicm14:10:40

I will add, that I don't think vimscript scales to complex activities all that well. It's an amazing feat some of the things vim plugin authors pull off.

markwoodhall14:10:50

The answer is almost certainly yes but I’ll ask anyway, have you seen timl - https://github.com/tpope/timl

dominicm14:10:08

So. Slow. Though. 😞

markwoodhall14:10:07

Yeah, it was when I tried it as well.

dominicm14:10:56

Neovim is going to compile viml down to lua eventually. For a 10x speed boost or something crazy. So that should bring timl up to viml speeds?

snoe15:10:41

I've been super happy with the plugin power of neovim + cljs - just super frustrated that some upstream dependency breaks my plugins every month or so.

snoe15:10:25

which probably means it's time to work with @jebberjeb to get a full stack cljs neovim-host

dominicm15:10:34

I'd love to see this ^^

dominicm15:10:39

I've been thinking the same.

snoe15:10:24

but, yeah, writing plugins for a language in that language is the way to go.

dominicm15:10:00

I want to see a semantic highlighter for Clojure. I won't be happy now until we have something better than Emacs 😄

jebberjeb15:10:06

I'd like to get some help and/or input.

jebberjeb15:10:22

I'm honestly not sure what it takes to create a full-fledged plugin host

dominicm15:10:30

https://github.com/clojure-vim it would be good to try do it here.

dominicm15:10:16

That's a good question.

jebberjeb15:10:45

hmm, clojure-vim has no public members?

dominicm15:10:16

I just made my membership public

jebberjeb15:10:29

@dominicm I should separate one of the plugin samples from the actual plugin host project. After that I think moving it over to clojure-vim makes sense.

jebberjeb15:10:25

Or forking it, or whatever is best

dominicm15:10:25

I've done a transfer for my repositories, as it gains a redirect

dominicm15:10:32

@jebberjeb I invited you to the group

dominicm15:10:54

I like the idea that if I get hit by a bus, you guys can fix bugs in my vim plugins.

dominicm15:10:30

Plus, it makes us look really organised and a more serious competitor to emacs

jebberjeb15:10:01

definitely does help create more gravity for the cause, I agree