Skip to content

Instantly share code, notes, and snippets.

@markwoodhall
Created October 13, 2016 18:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save markwoodhall/a7092991ee2fc0dde5eee9be4b58a00c to your computer and use it in GitHub Desktop.
Save markwoodhall/a7092991ee2fc0dde5eee9be4b58a00c to your computer and use it in GitHub Desktop.
function! Figwheel(...)
let evalString = "(do (require '[figwheel-sidecar.repl-api]) (when (not (figwheel-sidecar.repl-api/figwheel-running?)) (figwheel-sidecar.repl-api/start-figwheel!)))"
if a:0 > 0 && a:1 != ''
let evalString = evalString."(figwheel-sidecar.repl-api/start-autobuild ".join(a:000, ' ').")"
endif
execute "Eval ".evalString
endfunction
autocmd FileType clojure command! -nargs=* -buffer Figwheel :exe Figwheel(<q-args>)
autocmd FileType clojure command! -nargs=* -buffer FigwheelDevcards :exe Figwheel("devcards")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment