This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-09-29
Channels
- # aws (2)
- # babashka (2)
- # beginners (86)
- # calva (1)
- # cider (17)
- # clojure (46)
- # clojure-conj (1)
- # clojure-nl (1)
- # clojure-uk (6)
- # clojurescript (8)
- # clojutre (2)
- # cursive (3)
- # data-science (1)
- # datascript (5)
- # datomic (1)
- # fulcro (9)
- # funcool (5)
- # jackdaw (1)
- # leiningen (6)
- # pathom (2)
- # re-frame (2)
- # rewrite-clj (2)
- # shadow-cljs (19)
- # spacemacs (12)
- # sql (2)
- # vim (26)
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…?)
Ok just tried, apparently also need the middleware. Still interested in learning from your workflow though 🙂
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.
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))
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.
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)
@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!!
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
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
yeah played around with that a bit. it doesn't seem to do too well with namespace aliases though
You can use cqp
followed by ctrl+p to go through previous commands (or cqq
to get it into a prefix list)
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..
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
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
.
@dominicm https://www.maartenbaert.be/simplescreenrecorder/ should work fine even in laptop
Anyone using coc + (neo)vim and have a way to re-show documentation/signature for a word that the cursor is currently hovering on?
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