1 | ;
|
2 |
|
3 | var readlineVim = require('readline-vim')
|
4 | , wire = require('./wire')
|
5 | , vim;
|
6 |
|
7 | module.exports = function hookVim(repl) {
|
8 | vim = readlineVim(repl.rli);
|
9 |
|
10 | // TODO: no clue why this doesn't work in here, but inside manage-plugins it does
|
11 | // wire.on('emit-code.start', vim.forceInsert.bind(vim));
|
12 |
|
13 | return vim;
|
14 | };
|
15 |
|
16 | // needs to be getter since vim is initialized only once bindings are applied
|
17 | module.exports.__defineGetter__('vim', function () { return vim; });
|