Saturday, April 14, 2012

how to setup javascript compile & run in Vim with SingleCompile ?

I have read SingleCompile.vim's help file. And I installed some program like
gjs, nodejs, rhino.
I tried to set compiler manually by myself in vimrc.
call SingleCompile#ChooseCompiler('javascript', 'gjs')
but this does not work too.

Here is my error output:
|| JS ERROR: !!! Exception was: ReferenceError: alert is not defined
|| JS ERROR: !!! lineNumber = '5'
|| JS ERROR: !!! fileName = '"/home/chris/Templates/js.js"'
|| JS ERROR: !!! stack = '"@/home/chris/Templates/js.js:5
|| "'
|| JS ERROR: !!! message = '"alert is not defined"'
|| ReferenceError: alert is not defined

I hope a javascript file can run like a C file.

Does anybody knows how to setup this compiler for javascript ?

--
[stardiviner] <fuck you, world!> GPG key ID: 47C32433
IRC(freeenode): Evanescence Twitter: @numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36 CB99 B8C4 B8E5 47C3 2433
http://stardiviner.dyndns-blog.com/author.html

No comments: