繁体   English   中英

无法在vim中使用带有syntime的google闭包

[英]Not able to use google closure with syntastic in vim

我在我的vimrc文件中包含以下行来运行syntastic插件。[关闭]

let g:syntastic_mode_map = { 'mode': 'active',
                           \ 'active_filetypes': [],
                           \ 'passive_filetypes': ['html'] }

" To enable this plugin, edit the .vimrc like this:
let g:syntastic_javascript_checker = "closurecompiler" 
" and set the path to the Google Closure Compiler:
   let g:syntastic_javascript_closure_compiler_path = '~/.vim/closure-compier/compiler.jar'

 let g:syntastic_enable_signs=1
 let g:syntastic_auto_loc_list=1

但它似乎没有用,我试图调试closurecompiler.vim脚本.Inside它的函数SyntaxCheckers_javascript_GetLocList()有makeprg变量当我回显变量它打印下面的行

 java -jar ~/.vim/closure/closure.jar --js 'workspace/abc.js'

但是没有显示任何错误,但是如果我在控制台中输入相同的行我得到所有错误我在设置中做错了什么。 你可以在github上看到我的设置

我想我发现了你的错误。 我刚刚通过github下载了你的设置 ,这行.vimrc文件中有一个拼写错误:

let g:syntastic_javascript_closure_compiler_path = '~/.vim/closure-compier/compiler.jar'

当我将此行更改为:

let g:syntastic_javascript_closure_compiler_path = '~/.vim/closure-compiler/compiler.jar'

并启动了gvim abc.js我得到了这个:

vim w / abc.js和关闭的ss

似乎现在正在工作。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM