Fork me on GitHub
#vim
<
2018-05-08
>
eraserhd14:05:38

Here is a dumb, extremely useful thing:

function! FlashCursor()
  set cul cuc
  redraw
  sleep 50m
  set nocul nocuc
endfunction

nnoremap <silent> <CR> :<C-U>call FlashCursor()<CR>

dominicm14:05:53

There's a library for that, vim-halo I think

eraserhd14:05:03

Of course there is 😄

eraserhd14:05:36

My practice has been jkjkjkjkjk and look for the cursor. It often doesn't work on my bigger monitor.

eraserhd14:05:57

(and I've made my cursor orange and blink)

dominicm14:05:03

Oh, yours blocks.

dominicm14:05:07

vim-halo uses timers

fatihict17:05:24

@dominicm :ReplantApropos is awesome! parrot

eraserhd17:05:05

@dominicm Oh, your pretty printing for fireplace got merged!

dominicm17:05:44

@eraserhd thanks, I've found it really useful 🙂

eraserhd17:05:02

It's nice! I hadn't gotten around to trying it until just now.

dominicm17:05:06

@fatihict I'm glad you like it! I have a local version which only searches the current project, I'm rather happy with it, just figuring out how to expose the interface!

dominicm17:05:50

I also have a version which only lists tests, and I have some ideas about how you can create a filtered list of tests using regex, metadata, etc. and then test just those N tests.

dominicm17:05:39

@fatihict Sorry, what I meant to ask was, would you find a project-only version useful too? I think I would, but I'm not sure how idiosyncratic my usage is.

fatihict17:05:40

Oh! Only if it is faster than the global one.

dominicm17:05:16

It's faster, but not that much. Most of the time is spent loading it into fzf rather than generating the list.

fatihict17:05:46

Would love to try it out when it is on a branch

dominicm17:05:13

diff --git a/autoload/replant/generate.vim b/autoload/replant/generate.vim
index 6cd19a6..17b01c3 100644
--- a/autoload/replant/generate.vim
+++ b/autoload/replant/generate.vim
@@ -88,7 +88,7 @@ fun! replant#generate#test_stacktrace(ns,var,index)
 endf
 
 fun! replant#generate#apropos_all()
-  return {'op': 'apropos', 'ns': fireplace#ns(), 'doc?': 1, 'privates?': 1, 'query': '.*'}
+  return {'op': 'apropos', 'ns': fireplace#ns(), 'doc?': 1, 'var-query': {'ns-query': {'project?': 1, 'load-project-ns?': 1}, 'search': '.*', 'private?': 1}}
 endf
 
 fun! replant#generate#jump_to_source_full_symbol(full_symbol)
Should apply cleanly. Only works with cider-nrepl 0.17

dominicm17:05:43

git apply ...

fatihict18:05:05

That is a lot faster for me. Loading only 1696 instead of 13768 items.

dominicm18:05:39

@fatihict if Ctrl-i actually works I'll be impressed with that too.

dominicm18:05:50

There's a secret binding in the doc buffer, gF which will jump to source

dominicm18:05:19

The part I'm really struggling with here is that I need a good interface to expose several facets of functionality that's available: - privates y/n - project only y/n - tests y/n - current ns only y/n - with/without certain metadata y/n

fatihict19:05:45

Hmm interesting, I think you can expose everything with ex commands, e.g. :ReplantAproposTest :ReplantAproposPrivates etc.. And let the users define their own mappings which call those commands. And an option to define your own regex for the 'advanced users'.

dominicm20:05:00

None of those are mutually exclusive. I guess my only option is command flags?

dominicm20:05:00

:ReplantApropos -project -test *datomic*