Skip to content

Instantly share code, notes, and snippets.

View zamaterian's full-sized avatar

Thomas Engelschmidt zamaterian

View GitHub Profile
@zamaterian
zamaterian / clojure.vim
Created January 20, 2016 09:14
Run a single clojure test within a fixture from vim
" depends on vim-fireplace
function! ClojureTestFixture() abort
"Eval the toplevel clojure form (a deftest) and then test-var the result.
"http://blog.venanti.us/clojure-vim/
normal! ^
let line1 = searchpair('(','',')', 'bcrn', g:fireplace#skip)
let line2 = searchpair('(','',')', 'rn', g:fireplace#skip)
let expr = join(getline(line1, line2), "\n")
let var = fireplace#session_eval(expr)
@zamaterian
zamaterian / clojure-repl.vim
Created January 20, 2016 09:43
Clojure in neovim, using neovims terminal to communication with lein repl in a split window, instead of tmux.
" requires neovim
"https://github.com/neovim/neovim/pull/2076#issuecomment-77793644
if has("nvim")
tnoremap <Leader>e <C-\><C-n>
tnoremap <C-Enter> startinsert
au TermOpen * let g:last_term_job_id = b:terminal_job_id
endif
function! SendToTerm(lines)
{:as-of-entry 70,
:as-of-timestamp 1473787430350,
:entry {:args {:acker-exclude-inputs false,
:acker-exclude-outputs false,
:acker-percentage 1,
:exempt-tasks (),
:flux-policies {},
:id #uuid "00000000-c35f-0816-0000-000077cb05ee",
:inputs (:partition-keys),
:min-required-peers {:partition-keys 1,
@zamaterian
zamaterian / keybase.md
Created December 8, 2019 16:10
keybase.md

Keybase proof

I hereby claim:

  • I am zamaterian on github.
  • I am zamaterian (https://keybase.io/zamaterian) on keybase.
  • I have a public key ASBptsXYt-CY51WgeYJGNXtY4Ba2aSoa9X68TrUzGYO3OAo

To claim this, I am signing this object: