A plugin to send commands to a running rebar3 shell
Erlang
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
.gitignore
LICENSE
README.md
rebar.config
rebar.lock

README.md

rebar3_shellrpc

A rebar plugin

Build

$ rebar3 compile

Use

Add the plugin to your rebar config, possibly the global one in ~/.config/rebar3/rebar.config :

{plugins, [rebar3_shellrpc]}.

Use the dist_node option of rebar 3.1.x or a nightly build in any project for which you want the feature to work:

{dist_node, [{sname, myproject}]}.

Boot a shell in a tab or terminal window:

$ rebar3 shell
...

Then just call your plugin directly in the project

$ rebar3 shellrpc <cmd>

And will be sent to the shell that is currently running in the local project. For example:

$ rebar3 shellrpc compile

Will recompile and reload code.

Vim Bindings

The following bindinds map F5 to save + compile, F6 to save + common test, and F7 to save + dialyzer:

autocmd FileType erlang map <F5> <esc>:w\|:! rebar3 shellrpc compile<cr>
autocmd FileType erlang map <F6> <esc>:w\|:! rebar3 shellrpc ct<cr>
autocmd FileType erlang map <F7> <esc>:w\|:! rebar3 shellrpc dialyzer<cr>