Ⅰ. 插件描述
A vim plugin to provide access to FigwheelⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'markwoodhall/vim-figwheel'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'markwoodhall/vim-figwheel'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'markwoodhall/vim-figwheel'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/markwoodhall/vim-figwheel
Ⅳ. 文档说明
## Purpose
This plugin makes available the control functions defined by the Figwheel REPL as vimscript functions.
This enables you to do a few things:
Start Figwheel from vim.
:FigwheelStartwill start the default cljsbuild.:FigwheelStart dev, devcardswill 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.

Stop Figwheel from vim.
:FighwheelStopwill stop Figwheel autobuild

Switch Figwheel from vim.
:FigwheelSwitch devcardswill switch to the build defined with the "devcards" id.

Clean Figwheel from vim.
:FigwheelClean devcardswill clean the build defined with the "devcards" id.

Get quick access to Fighwheels status in vim.

Get list of Figwheel build ids in vim

Installation
Install using your favourite plugin manager,
I use vim-plug
Plug 'markwoodhall/vim-figwheel'Requirements
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.
Usage
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 REPLThe 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 systemTips
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.
License
Copyright © Mark Woodhall. Distributed under the same terms as Vim itself. See :help license