1
0
mirror of https://github.com/amix/vimrc synced 2025-06-24 07:44:59 +08:00

Updated vimrc

This commit is contained in:
amix
2015-07-13 11:22:46 +01:00
parent 9a2843c2a5
commit d7752b59ae
301 changed files with 4699 additions and 7969 deletions

View File

@ -9,7 +9,7 @@
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"============================================================================
if exists("g:loaded_syntastic_javascript_closurecompiler_checker")
if exists('g:loaded_syntastic_javascript_closurecompiler_checker')
finish
endif
let g:loaded_syntastic_javascript_closurecompiler_checker = 1

View File

@ -21,9 +21,20 @@ endif
let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_javascript_flow_IsAvailable() dict
if !executable(self.getExec())
return 0
endif
return syntastic#util#versionIsAtLeast(self.getVersion(), [0, 6])
endfunction
function! SyntaxCheckers_javascript_flow_GetLocList() dict
if syntastic#util#findFileInParent('.flowconfig', expand('%:p:h', 1)) ==# ''
return []
endif
let makeprg = self.makeprgBuild({
\ 'exe': self.getExecEscaped() . ' check',
\ 'exe': self.getExecEscaped() . ' status',
\ 'args_after': '--show-all-errors --json' })
let errorformat =

View File

@ -9,7 +9,7 @@
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"============================================================================
if exists("g:loaded_syntastic_javascript_gjslint_checker")
if exists('g:loaded_syntastic_javascript_gjslint_checker')
finish
endif
let g:loaded_syntastic_javascript_gjslint_checker = 1

View File

@ -9,7 +9,7 @@
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"============================================================================
if exists("g:loaded_syntastic_javascript_jscs_checker")
if exists('g:loaded_syntastic_javascript_jscs_checker')
finish
endif
let g:loaded_syntastic_javascript_jscs_checker = 1

View File

@ -9,7 +9,7 @@
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"============================================================================
if exists("g:loaded_syntastic_javascript_jsl_checker")
if exists('g:loaded_syntastic_javascript_jsl_checker')
finish
endif
let g:loaded_syntastic_javascript_jsl_checker = 1

View File

@ -10,7 +10,7 @@
"
"============================================================================
if exists("g:loaded_syntastic_javascript_jslint_checker")
if exists('g:loaded_syntastic_javascript_jslint_checker')
finish
endif
@ -21,7 +21,7 @@ set cpo&vim
function! SyntaxCheckers_javascript_jslint_GetHighlightRegex(item)
let term = matchstr(a:item['text'], '\mExpected .* and instead saw ''\zs.*\ze''')
if term != ''
if term !=# ''
let term = '\V\<' . escape(term, '\') . '\>'
endif
return term
@ -38,7 +38,7 @@ function! SyntaxCheckers_javascript_jslint_GetLocList() dict
return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'defaults': {'bufnr': bufnr("")} })
\ 'defaults': {'bufnr': bufnr('')} })
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({

View File

@ -18,15 +18,16 @@ let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_javascript_jsxhint_IsAvailable() dict
let jsxhint_version = syntastic#util#system(self.getExecEscaped() . ' --version')
if v:shell_error || (jsxhint_version !~# '\m^JSXHint\>')
return 0
let version_output = syntastic#util#system(self.getExecEscaped() . ' --version')
let parsed_ver = !v:shell_error && (version_output =~# '\m^JSXHint\>') ? syntastic#util#parseVersion(version_output) : []
if len(parsed_ver)
call self.setVersion(parsed_ver)
else
call syntastic#log#ndebug(g:_SYNTASTIC_DEBUG_LOCLIST, 'checker output:', split(version_output, "\n", 1))
call syntastic#log#error("checker javascript/jsxhint: can't parse version string (abnormal termination?)")
endif
let ver = syntastic#util#parseVersion(jsxhint_version)
call self.setVersion(ver)
return syntastic#util#versionIsAtLeast(ver, [0, 4, 1])
return syntastic#util#versionIsAtLeast(parsed_ver, [0, 4, 1])
endfunction
function! SyntaxCheckers_javascript_jsxhint_GetLocList() dict

View File

@ -9,7 +9,7 @@
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"============================================================================
if exists("g:loaded_syntastic_javascript_standard_checker")
if exists('g:loaded_syntastic_javascript_standard_checker')
finish
endif
let g:loaded_syntastic_javascript_standard_checker = 1