https://github.com/ferd/rebar3_shellrpc
A plugin to send commands to a running rebar3 shell
https://github.com/ferd/rebar3_shellrpc
Last synced: about 1 year ago
JSON representation
A plugin to send commands to a running rebar3 shell
- Host: GitHub
- URL: https://github.com/ferd/rebar3_shellrpc
- Owner: ferd
- License: other
- Created: 2016-04-02T01:37:09.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-04-04T19:03:21.000Z (about 10 years ago)
- Last Synced: 2025-03-24T05:27:02.806Z (about 1 year ago)
- Language: Erlang
- Size: 4.88 KB
- Stars: 10
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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` :
```erlang
{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:
```erlang
{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
```
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:
```vim
autocmd FileType erlang map :w\|:! rebar3 shellrpc compile
autocmd FileType erlang map :w\|:! rebar3 shellrpc ct
autocmd FileType erlang map :w\|:! rebar3 shellrpc dialyzer
```