-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
old idea, came back again (first attempt: https://github.com/mklabs/jsvim)
- Write VIM plugins as ES6 class / scripts
- Implement function / commands in JS, generates appropriate vimscript
- Relies on STDOUT result (
node file.js --vim --command => JSON) - Autoload generated API mapping ES6 class
this.command(':Foo', (args) => {
this.echo('Args: ', args)
})function! vimjs#node(type, ...)
let cmd = join(a:000, ' ')
let flag = '--' . type
return system('node plugin.js --vim ' . flag . ' -- ' . cmd)
endfunction
command! -nargs=+ Foo call vimjs#node('command', <args>):Foo bar tabac
Args: bar tabac
Metadata
Metadata
Assignees
Labels
No labels