1
0
mirror of https://github.com/amix/vimrc synced 2025-07-20 10:55:01 +08:00
This commit is contained in:
huangqundl
2017-03-17 23:12:53 +08:00
parent 47b213d974
commit cba39b7326
855 changed files with 59981 additions and 35298 deletions

View File

@ -10,30 +10,19 @@
"
"============================================================================
" To send additional options to less use the variable g:syntastic_less_options.
" The default is
" let g:syntastic_less_options = "--no-color"
"
" To use less-lint instead of less set the variable
" g:syntastic_less_use_less_lint.
if exists("g:loaded_syntastic_less_lessc_checker")
if exists('g:loaded_syntastic_less_lessc_checker')
finish
endif
let g:loaded_syntastic_less_lessc_checker = 1
if !exists("g:syntastic_less_options")
let g:syntastic_less_options = ""
endif
if !exists("g:syntastic_less_use_less_lint")
if !exists('g:syntastic_less_use_less_lint')
let g:syntastic_less_use_less_lint = 0
endif
let s:save_cpo = &cpo
set cpo&vim
let s:node_file = 'node ' . syntastic#util#shescape(expand('<sfile>:p:h') . syntastic#util#Slash() . 'less-lint.js')
let s:node_file = 'node ' . syntastic#util#shescape(expand('<sfile>:p:h', 1) . syntastic#util#Slash() . 'less-lint.js')
function! SyntaxCheckers_less_lessc_IsAvailable() dict
call self.log('g:syntastic_less_use_less_lint =', g:syntastic_less_use_less_lint)
@ -41,13 +30,10 @@ function! SyntaxCheckers_less_lessc_IsAvailable() dict
endfunction
function! SyntaxCheckers_less_lessc_GetLocList() dict
if !exists('s:check_file')
let s:check_file = g:syntastic_less_use_less_lint ? s:node_file : self.getExecEscaped()
endif
call syntastic#log#deprecationWarn('less_options', 'less_lessc_args')
let makeprg = self.makeprgBuild({
\ 'exe': s:check_file,
\ 'args': g:syntastic_less_options,
\ 'exe': (g:syntastic_less_use_less_lint ? s:node_file : self.getExecEscaped()),
\ 'args_after': '--no-color',
\ 'tail': '> ' . syntastic#util#DevNull() })
@ -60,7 +46,7 @@ function! SyntaxCheckers_less_lessc_GetLocList() dict
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'postprocess': ['guards'],
\ 'defaults': {'bufnr': bufnr(""), 'text': "Syntax error"} })
\ 'defaults': {'bufnr': bufnr(''), 'text': 'Syntax error'} })
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({
@ -70,4 +56,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set et sts=4 sw=4:
" vim: set sw=4 sts=4 et fdm=marker:

View File

@ -41,4 +41,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set et sts=4 sw=4:
" vim: set sw=4 sts=4 et fdm=marker: