Fork me on GitHub
#vim
<
2019-09-29
>
Stefan07:09:27

Thanks @dominicm. So in my case I should add cider/cider-nrepl to the alias that I’m using. Should I also add cider.nrepl/cider-middleware to the command line, and if yes: do you have an example of an alias that you’re using (or ideally a description of your way of working: how do you launch a repl of some sort, do you use a separate repl window where you can type directly into the repl, things like that…?)

Stefan07:09:24

Ok just tried, apparently also need the middleware. Still interested in learning from your workflow though 🙂

dominicm07:09:19

I wrote vim-jack-in to start the repl. It uses dispatch.vim which can run commands in jobs, terminal tabs, new X Windows, etc. I barely ever type into it directly, I work from a buffer almost always. I've started making promises to do some videos of my workflow and record them.

Stefan07:09:51

hehe looking forward to those then 🙂

Stefan07:09:28

Another question: I’m using comment blocks inside my source code to try out stuff. E.g.

(comment
   (+ 1 (* 2 3))
)
I can’t find an easy way to evaluate the outermost form inside the comment block. So for example when the cursor is on the 2, evaluate the (+ 1 (* 2 3))

Stefan07:09:34

Is there something for that?

Stefan07:09:44

(Outermost seems to eval the comment block itself)

dominicm07:09:18

My laptop doesn't have a gpu, so I either fill up the disk or my laptop comes to a crawl every time I try and record the screen. I need to figure something out.

dominicm07:09:44

If you have vim-sexp installed then cp2af should do it. There's also a neat trick someone in this channel came up with for "top most except comments", you'll have to search the logs for this channel though (on zulip)

Stefan07:09:02

Ok will do, thanks!

Stefan07:09:46

(Can’t help you with the recording btw, no experience with that…)

Stefan08:09:06

@vaalha I found on the Zulip chat that you created a vim script to eval the outermost form inside a comment block. The code itself is apparently not archived on Zulip thought. Could you maybe repost the source code or put it in a gist on github or something like that? Thanks!!

thiru16:09:01

Would also love to see your workflow @dominicm (or anyone else here). I've been using fireplace all this time but really only using it to easily look up docs or go-to-definition. I have another terminal with rebel readline to do most of my testing. To me the sexps in a comment block didn't seem as good as having a terminal-like experience in a true repl where I can go back in history and more easily run previous commands. But maybe I'm missing something here. It seems most people prefer to stick with a vim buffer

dave02:09:15

i've started using https://github.com/Olical/conjure, and one of the cool things about conjure is that evaluated expressions and their results all go into a buffer, and you can then re-eval things in that buffer, so you get the history that way

thiru01:10:18

yeah played around with that a bit. it doesn't seem to do too well with namespace aliases though

thiru01:10:53

also haven't been able to get clojurescript working with figwheel-main..

uosl11:10:52

You can use cqp followed by ctrl+p to go through previous commands (or cqq to get it into a prefix list)

uosl11:10:08

If you haven't read :help fireplace yet, I strongly recommend it!

thiru16:09:47

Somewhat unrelated but I'm also curious about people's workflow with git. I see that vim-fugitive is very popular but a regular terminal seems faster to me. Again maybe I'm missing something..

dave02:09:56

i use three different plugins for git things: fugitive, just for :Gblame - i like fugitive's blame view better than these other two plugins' https://github.com/lambdalisue/gina.vim for most git things. i like it a lot. it's super fast and it does things asynchronously where it makes sense to do so. for example, when i do :Gina push, i can immediately go back to editing and the result will pop up when it's done. you can use any git command exactly like you would from the command line, e.g. git diff -w => :Gina diff -w. overall, it feels sort of like you have a terminal inside of vim and you're just running the git commands, except that you're also in an ncurses interface (i.e. vim) and you can do useful things like, in the :Gina status view, press >> while your cursor is on a line to stage that file https://github.com/jreybert/vimagit is also great. i used it exclusively up until i discovered gina, which is a lot faster. vimagit is great, though, especially for committing only parts of a file that you've changed

thiru01:10:05

gina sounds cool.. will check it out. thanks!

uosl11:10:29

I only use vim-fugitive, and where I find it most efficient is when commiting. I have lots of bindings for it, so ;gs opens :Gstatus. You can then use ctrl+n/p to go through changes, check diffs with =, stage/unstage hunks or whole files with - (or undo with X) and commit with cc followed by a message an :wq.

dominicm18:09:44

I'll give it a go, I used ffmpeg directly before.

dharrigan19:09:49

Anyone using coc + (neo)vim and have a way to re-show documentation/signature for a word that the cursor is currently hovering on?

dharrigan19:09:04

(in a floating window)

dave02:09:56

i use three different plugins for git things: fugitive, just for :Gblame - i like fugitive's blame view better than these other two plugins' https://github.com/lambdalisue/gina.vim for most git things. i like it a lot. it's super fast and it does things asynchronously where it makes sense to do so. for example, when i do :Gina push, i can immediately go back to editing and the result will pop up when it's done. you can use any git command exactly like you would from the command line, e.g. git diff -w => :Gina diff -w. overall, it feels sort of like you have a terminal inside of vim and you're just running the git commands, except that you're also in an ncurses interface (i.e. vim) and you can do useful things like, in the :Gina status view, press >> while your cursor is on a line to stage that file https://github.com/jreybert/vimagit is also great. i used it exclusively up until i discovered gina, which is a lot faster. vimagit is great, though, especially for committing only parts of a file that you've changed