This plugin makes available the control functions defined by the Figwheel REPL as vimscript functions.
This enables you to do a few things:
:FigwheelStart
will start the default cljsbuild.:FigwheelStart dev, devcards
will start the cljsbuilds defined with the "dev" and "devcards" ids.
Note the space between "dev," and "devcards" above. When specifying multiple build arguments to suitable functions they should always follow this format. For now.
:FighwheelStop
will stop Figwheel autobuild
:FigwheelSwitch devcards
will switch to the build defined with the "devcards" id.
:FigwheelClean devcards
will clean the build defined with the "devcards" id.
Install using your favourite plugin manager, I use vim-plug
Plug 'markwoodhall/vim-figwheel'
This plugin requires a Figwheel project, perhaps created with lein new figwheel
, and the Fighweel version must be at least 0.5.8
.
This plugin makes use of vim-fireplace so you will need to install this as well.
Plug 'tpope/vim-fireplace'
As is typical for vim-fireplace you will need a running REPL, lein repl
.
The following functions are made available:
:FigwheelStart " Starts the default Figwheel build or an optional list of builds
:FigwheelSwitch " Switch to a Figwheel build
:FigwheelClean " Deletes compiled cljs target files for the specfied builds
:FigwheelBuild " Builds a fighweel build once
:FigwheelBuilds " Gets a list of Figwheel build ids
:FigwheelReset " Stops, cleans and starts Figwheel autobuild
:FigwheelStop " Stops Figwheel autobuild
:FigwheelStatus " Gets the current state of Figwheel
:Figgieback " Piggiebacks onto the Figwheel browser REPL
The above functions map to the control functions defined by the Figwheel REPL. You can read more here
(stop-autobuild) ;; stops Figwheel autobuilder
(start-autobuild [id ...]) ;; starts autobuilder focused on optional ids
(switch-to-build id ...) ;; switches autobuilder to different build
(reset-autobuild) ;; stops, cleans, and starts autobuilder
(build-once [id ...]) ;; builds source one time
(clean-builds [id ..]) ;; deletes compiled cljs target files
(fig-status) ;; displays current state of system
Use Figwheel*
commands when in a Clojure buffer, use Figgieback in a ClojureScript buffer to enable the use of Figwheels ClojureScript REPL on top of a regular nREPL session.
Copyright © Mark Woodhall. Distributed under the same terms as Vim itself. See :help license