vim

For discussion on all things (neo)vim.
Olical 2020-05-13T13:25:49.090500Z

Conjure v3.1.0 is out! https://github.com/Olical/conjure/releases/tag/v3.1.0 a bunch of things added and fixed, enjoy!

πŸŽ‰ 2
b-ryan 2020-05-13T15:45:53.090900Z

Hey Olical, thanks! Conjure is really cool. I was trying it out a week ago and had a lot of fun. There are two main things from my workflow in fireplace that I couldn't figure out how to replicate though, I'm hoping you could help out. The first is that I frequently uses cqc which brings up a quick command line window. I tried using conjure's log buffer to put random one-off evaluations, but the log buffer isn't in the same namespace as my buffer, so there was enough friction there I couldn't figure out what to do. The second thing I think is just a feature request, although if there's a way to extend conjure in my init.vim that would be great too. Fireplace has a cpr command and I made a cps command, which I use to run tests. Is there any way I could replicate this? Otherwise to run a test I have been putting (clojure.test/test-vars [#'the-test-function']) and evaluating it.

dave 2020-05-13T16:01:53.095100Z

i just started using https://github.com/liuchengxu/vim-which-key and i'm enjoying it! i tend to create a lot of mappings that are organized by prefix, e.g. &lt;leader&gt;g followed by another key to do git-related things, like &lt;leader&gt;gb for :Gblame (via fugitive) etc. another example is &lt;leader&gt;b for buffer-related commands (`<leader>bd` to delete the current buffer, etc.) vim-which-key allows me to mindlessly type &lt;leader&gt;g or &lt;leader&gt;b and then wait half a second, and it shows me all of the mappings i have set up that begin with those two keys, so i can browse what sorts of things i can do and then pick the one i want the big win here, in my mind, is that i often set up useful mappings and then completely forget about them. by putting them in front of my face on a regular basis, i can remind myself of what mappings i've made available and remember that i have them at my disposal (if you've used spacemacs, this is a lot like what you get when you press the space key)

😎 1
dave 2020-05-13T16:03:00.096300Z

i was initially turned off by the default display, which is just to show you the command that would run instead of a description of it, but vim-which-key does allow you to provide descriptions of each binding so that you can understand them faster at a glance

dave 2020-05-13T16:04:09.096400Z

here's a screenshot

❀️ 2
dharrigan 2020-05-13T16:11:01.096800Z

I use which-key too - it's great!

Olical 2020-05-13T17:56:17.096900Z

So :ConjureEval (code-here...) may well serve your needs although I appreciate that it isn't a buffer.

Olical 2020-05-13T17:56:38.097100Z

I normally just write it into the buffer in question (either in the file then deleted or a comment)

Olical 2020-05-13T17:57:18.097300Z

There's already test mappings that will run the test under your cursor, the namespace or the -test variant of your namespace name (for testing while you evaluate the source)

Olical 2020-05-13T17:57:27.097500Z

They're under the &lt;prefix&gt;t prefix

Olical 2020-05-13T17:57:38.097700Z

You can always create your own mappings that call through to ConjureEval though!

Olical 2020-05-13T17:57:51.097900Z

That'll eval within the right namespace context.

Olical 2020-05-13T17:58:18.098100Z

&lt;prefix&gt;tc will evaluate the current test under your cursor (anywhere in the form) for example. Where &lt;prefix&gt; defaults to localleader.

b-ryan 2020-05-13T21:01:26.098300Z

Awesome info, thanks a lot. I will give that a shot.

2020-05-13T22:20:16.098900Z

Great! I'll use it ☺️