Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/clavery/vim-chrome-repl

a REPL for a remote chrome instance in VIM.
https://github.com/clavery/vim-chrome-repl

Last synced: 1 day ago
JSON representation

a REPL for a remote chrome instance in VIM.

Awesome Lists containing this project

README

        

# vim-chrome-repl

A work in progress vim plugin that sends javascript to a running Chrome remote
debugger and displays the output.

Currently only displays output logged to the console (ie. console.log) and *not*
the result of expressions like the normal chrome console (which can be confusing
when not displayed inline). Also currently only executes on tab 0 (the currently
visible chrome tab).

thrown exceptions are also caught.

Requires nodejs and a Vim with python support (uses python to manage the
subprocess). The node module [chrome-remote-interface](https://github.com/cyrus-and/chrome-remote-interface) is required and bundled however you might need to rebuild them in the
`plugin` directory:

```sh
$ cd plugin
$ npm rebuild
```

## Usage

```sh
# start chrome with debugger port
...Chrome.app --args --remote-debugger-port=9222
```

Run `:SendToChrome` or map this command to a keystroke. This can be used with a
visual selection or the in normal mode (which sends the entire buffer).

## TODO

* Configurable/menu selectable tab
* Configurable display options (ie. show expression results)
* Default keybind
* Possible debugger support (breakpoints, etc)