If you would like to see it in action, a (very crude) demo video is available here.
Copy the following code snippet into your template and open it inside of a (modern) browser. Make sure that you have VIM running before you do so.
After doing so, you should be able to evaluate CSS buffers and JS
<LocalLeader>be as well as selections of JS. The changes should be
instantly reflected in your browser. Whenever you save a JS file or an HTML page,
the template will be fully refreshed, you can also refresh the template without
having to save the file using
If you installed the plugin someplace other than
~/.vim/bundle/browser-connect.vim you will have to paste the
following snippet into your
.vimrc file and update the path to
reflect the actual location of the
let g:bc_server_path = "/home/me/.vim/bundle/browser-connect.vim/server"
To disable the plugin from setting its own mappings, paste the
following into your
let g:bc_no_mappings = 1
You can set your
LocalLeader key to be
, by doing:
let maplocalleader = ","
If you would like to map your own keys to evaluate buffers, map them to the following commands:
vmap <silent><LocalLeader>be :BCEvaluateSelection<CR> nmap <silent><LocalLeader>be :BCEvaluateBuffer<CR> nmap <silent><LocalLeader>br :BCReloadPage<CR>
To disable automatic behavior on save add the following to your
let g:bc_no_au = 1
To run the plugin on Windows you must start the server yourself by
going into the
browser-connect.vim/server folder and running the
- VIM 7.0+ compiled with +python
- Python 2.6+
- Java 7+