errormarker.vim ã使ã£ã¦ flymake ã£ã½ããããã¤ã試ãã¦ã¿ã
smjs ã®ã³ãã³ãã©ã¤ã³ãªãã·ã§ã³ä¿®æ£ã詳ããã¯ã³ã¡ã³ãæ¬åç
§ã
ruby ç¨ã®è¨å®ã追è¨
dann@catalyst - Catalystグループãåèã«æ¸ãç´ããã°ãã¼ãã«å¤æ°ããªããªã£ãã!
ã¤ãã§ã«ããã¡ã¤ã«ãã¾ã¨ãã¦ã¿ãã
ãã¡ã¤ã«ã¿ã¤ããã¨ã«å
±éãªã¨ããã¯ããã£ã¨ã¾ã¨ãããã§ãããã§ããã
errormarker.vim - Highlights and sets error markers for lines with compile errors : vim onlineãã¤ã³ã¹ãã¼ã«ããå¾ã®è©±
for perl
ã¾ããperl ç¨ã®è¨å® (ref: errormarker.vim で flymake(Emacsの) る - #生存戦略 、それは - subtech)
cp /usr/share/vim/vim71/tools/efm_perl.pl ~/.vim/vimparse.pl
setlocal makeprg=$HOME/.vim/vimparse.pl\ -c\ %\ $* setlocal errorformat=%f:%l:%m au BufWritePost <buffer> silent make
~/.vim/ftplugin/perl/flyquickfixmake.vim ã«
setlocal makeprg=$HOME/.vim/vimparse.pl\ -c\ %\ $* setlocal errorformat=%f:%l:%m if !exists("g:perl_flyquickfixmake") let g:perl_flyquickfixmake = 1 au BufWritePost *.pm,*.pl,*.t silent make endif
for JavaScript
次ãJavaScript ç¨ã®è¨å® (ref: errormaker.vim と JS の syntax error 検知 - 冬通りに消え行く制服ガールは✖夢物語にリアルを求めない。 - subtech)
sudo aptitude install spidermonkey-bin
~/.vim/ftplugin/javascript.vim ã«
"" for spidermonkey setlocal makeprg=smjs\ -w\ -s\ -C\ % setlocal errorformat=%f:%l:%m " "" for rhino " setlocal makeprg=rhino\ -w\ -strict\ -debug\ % " setlocal errorformat="js: %f, line %l:%m" au BufWritePost <buffer> silent make
~/.vim/vimparse.js ã«
#!/bin/sh ## for rhino # rhino -w -strict -debug $* ## for spidermonkey ## sudo aptitude install spidermonkey-bin smjs -wsC $*
~/.vim/ftplugin/javascript/flyquickfixmake.vim ã«
setlocal makeprg=$HOME/.vim/vimparse.js\ %\ $* "" for rhino " setlocal errorformat="js: %f, line %l:%m" "" for spidermonkey setlocal errorformat=%f:%l:%m if !exists("g:javascript_flyquickfixmake") let g:javascript_flyquickfixmake = 1 au BufWritePost *.js silent make endif
smjs ã®ã³ãã³ãã©ã¤ã³ãªãã·ã§ã³ã®è©³ç´°ãä¸æã ã£ãã®ã§èª¿ã¹ããã©ããããããæ
å ±ãçºè¦ã§ãã...ã
ãããã£ã¦ãã¨ã§ãã³ãã³ãã©ã¤ã³ãªãã·ã§ã³è§£æé¨åã®ã³ã¼ããèªãã§ã¿ãçµæã以ä¸ã®ãããªæããããã
v | ãã¼ã¸ã§ã³æ å ±è¡¨ç¤º |
w | è¦å on |
W | è¦å off |
s | strict on |
x | xml on? |
P | ??? |
b | branch limit |
c | stack chunk size |
f | ãã¡ã¤ã«æå® |
e | ã³ãã³ãã©ã¤ã³ã§ãããããã®ãããã®ã¾ã¾å®è¡ |
C | compile only |
i | interactive mode |
S | max stack size |
z | ??? |
ã¨ããã§ãåã㯠smjs ã®ä»£ããã« rhino ã使ã£ã¦ã¿ããã ãã©ããã®ç¨éã§ã¯æç¶ smjs ã®æ¹ã軽ãã®ã§ smjs ã使ããã¨ã«ããã
% time smjs -wsC test.user.j test.user.js:11: SyntaxError: missing ; before statement: test.user.js:11: va r Class = function() { return function() { this.initialize.apply(this, arguments) } }; test.user.js:11: .......^ [2] 5723 exit 3 smjs -wsC test.user.j smjs -wsC test.user.js 0.00s user 0.00s system 0% cpu 0.017 total
% time rhino -w -strict -debug test.user.j js: "test.user.js", line 11: missing ; before statement js: va r Class = function() { return function() { this.initialize.apply(this, arguments) } }; js: ........^ js: "test.user.js", line 1: Compilation produced 1 syntax errors. [2] 5590 exit 3 rhino -w -strict -debug test.user.j rhino -w -strict -debug test.user.js 0.27s user 0.02s system 88% cpu 0.334 total
for ruby
""" for error marker setlocal makeprg=ruby\ -cdw\ % setlocal errorformat=%f:%l:%m au BufWritePost <buffer> silent make
~/.vim/ftplugin/ruby/flyquickfixmake.vim ã«
setlocal makeprg=ruby\ -cdw\ % setlocal errorformat=%f:%l:%m if !exists("g:ruby_flyquickfixmake") let g:ruby_flyquickfixmake = 1 au BufWritePost *.rb silent make endif