1
0
Fork 0
mirror of synced 2024-12-23 23:33:21 -05:00

Updated plugins. Removed the tabstop merge that 010c2940ce introduced

This commit is contained in:
amix 2014-10-14 14:30:33 +01:00
parent d283422444
commit fe77d23852
99 changed files with 1142 additions and 359 deletions

View file

@ -39,13 +39,13 @@ Ada, AppleScript, Arduino, AsciiDoc, ASM, BEMHTML, Bro, Bourne shell, C,
C++, C#, Cabal, Chef, CoffeeScript, Coco, Coq, CSS, Cucumber, CUDA, D, Dart,
DocBook, Dust, Elixir, Erlang, eRuby, Fortran, Gentoo metadata, GLSL, Go,
Haml, Haskell, Haxe, Handlebars, HSS, HTML, Java, JavaScript, JSON, JSX, LESS,
Lex, Limbo, LISP, LLVM intermediate language, Lua, MATLAB, NASM, Objective-C,
Objective-C++, OCaml, Perl, Perl POD, PHP, gettext Portable Object, OS X and
iOS property lists, Puppet, Python, Racket, R, reStructuredText, RPM spec,
Ruby, SASS/SCSS, Scala, Slim, Tcl, TeX, Texinfo, Twig, TypeScript, Vala,
Verilog, VHDL, VimL, xHtml, XML, XSLT, YACC, YAML, z80, Zope page templates,
and zsh. See the [wiki][3] for details about the corresponding supported
checkers.
Lex, Limbo, LISP, LLVM intermediate language, Lua, Markdown, MATLAB, NASM,
Objective-C, Objective-C++, OCaml, Perl, Perl POD, PHP, gettext Portable
Object, OS X and iOS property lists, Puppet, Python, R, Racket, Relax NG,
reStructuredText, RPM spec, Ruby, SASS/SCSS, Scala, Slim, Tcl, TeX, Texinfo,
Twig, TypeScript, Vala, Verilog, VHDL, VimL, xHtml, XML, XSLT, YACC, YAML,
z80, Zope page templates, and zsh. See the [wiki][3] for details about the
corresponding supported checkers.
Below is a screenshot showing the methods that Syntastic uses to display syntax
errors. Note that, in practise, you will only have a subset of these methods
@ -264,8 +264,8 @@ See `:help syntastic_quiet_messages` for details.
<a name="faqaggregate"></a>
__Q. How can I display together the errors found by all checkers enabled for
the current file?__
__Q. I have enabled multiple checkers for the current filetype. How can I
display all of the errors from all of the checkers together?__
A. Set `g:syntastic_aggregate_errors` to 1 in your vimrc:
```vim

View file

@ -91,21 +91,21 @@ function! s:_init() " {{{2
let s:handlers = []
let s:cflags = {}
call s:_regHandler('\m\<cairo', 'syntastic#c#checkPKG', ['cairo', 'cairo'])
call s:_regHandler('\m\<freetype', 'syntastic#c#checkPKG', ['freetype', 'freetype2', 'freetype'])
call s:_regHandler('\m\<glade', 'syntastic#c#checkPKG', ['glade', 'libglade-2.0', 'libglade'])
call s:_regHandler('\m\<glib', 'syntastic#c#checkPKG', ['glib', 'glib-2.0', 'glib'])
call s:_regHandler('\m\<gtk', 'syntastic#c#checkPKG', ['gtk', 'gtk+-2.0', 'gtk+', 'glib-2.0', 'glib'])
call s:_regHandler('\m\<libsoup', 'syntastic#c#checkPKG', ['libsoup', 'libsoup-2.4', 'libsoup-2.2'])
call s:_regHandler('\m\<libxml', 'syntastic#c#checkPKG', ['libxml', 'libxml-2.0', 'libxml'])
call s:_regHandler('\m\<pango', 'syntastic#c#checkPKG', ['pango', 'pango'])
call s:_regHandler('\m\<SDL', 'syntastic#c#checkPKG', ['sdl', 'sdl'])
call s:_regHandler('\m\<opengl', 'syntastic#c#checkPKG', ['opengl', 'gl'])
call s:_regHandler('\m\<webkit', 'syntastic#c#checkPKG', ['webkit', 'webkit-1.0'])
call s:_regHandler('\m\<cairo', 's:_check_pkg', ['cairo', 'cairo'])
call s:_regHandler('\m\<freetype', 's:_check_pkg', ['freetype', 'freetype2', 'freetype'])
call s:_regHandler('\m\<glade', 's:_check_pkg', ['glade', 'libglade-2.0', 'libglade'])
call s:_regHandler('\m\<glib', 's:_check_pkg', ['glib', 'glib-2.0', 'glib'])
call s:_regHandler('\m\<gtk', 's:_check_pkg', ['gtk', 'gtk+-2.0', 'gtk+', 'glib-2.0', 'glib'])
call s:_regHandler('\m\<libsoup', 's:_check_pkg', ['libsoup', 'libsoup-2.4', 'libsoup-2.2'])
call s:_regHandler('\m\<libxml', 's:_check_pkg', ['libxml', 'libxml-2.0', 'libxml'])
call s:_regHandler('\m\<pango', 's:_check_pkg', ['pango', 'pango'])
call s:_regHandler('\m\<SDL', 's:_check_pkg', ['sdl', 'sdl'])
call s:_regHandler('\m\<opengl', 's:_check_pkg', ['opengl', 'gl'])
call s:_regHandler('\m\<webkit', 's:_check_pkg', ['webkit', 'webkit-1.0'])
call s:_regHandler('\m\<php\.h\>', 'syntastic#c#checkPHP', [])
call s:_regHandler('\m\<Python\.h\>', 'syntastic#c#checkPython', [])
call s:_regHandler('\m\<ruby', 'syntastic#c#checkRuby', [])
call s:_regHandler('\m\<php\.h\>', 's:_check_php', [])
call s:_regHandler('\m\<Python\.h\>', 's:_check_python', [])
call s:_regHandler('\m\<ruby', 's:_check_ruby', [])
endfunction " }}}2
" return a handler dictionary object
@ -253,7 +253,7 @@ endfunction " }}}2
" try to find library with 'pkg-config'
" search possible libraries from first to last given
" argument until one is found
function! syntastic#c#checkPKG(name, ...) " {{{2
function! s:_check_pkg(name, ...) " {{{2
if executable('pkg-config')
if !has_key(s:cflags, a:name)
for pkg in a:000
@ -274,7 +274,7 @@ function! syntastic#c#checkPKG(name, ...) " {{{2
endfunction " }}}2
" try to find PHP includes with 'php-config'
function! syntastic#c#checkPHP() " {{{2
function! s:_check_php() " {{{2
if executable('php-config')
if !has_key(s:cflags, 'php')
let s:cflags['php'] = system('php-config --includes')
@ -286,7 +286,7 @@ function! syntastic#c#checkPHP() " {{{2
endfunction " }}}2
" try to find the ruby headers with 'rbconfig'
function! syntastic#c#checkRuby() " {{{2
function! s:_check_ruby() " {{{2
if executable('ruby')
if !has_key(s:cflags, 'ruby')
let s:cflags['ruby'] = system('ruby -r rbconfig -e ' .
@ -300,7 +300,7 @@ function! syntastic#c#checkRuby() " {{{2
endfunction " }}}2
" try to find the python headers with distutils
function! syntastic#c#checkPython() " {{{2
function! s:_check_python() " {{{2
if executable('python')
if !has_key(s:cflags, 'python')
let s:cflags['python'] = system('python -c ''from distutils import ' .

View file

@ -24,6 +24,54 @@ function! syntastic#util#Slash() abort " {{{2
return (!exists("+shellslash") || &shellslash) ? '/' : '\'
endfunction " }}}2
" Create a temporary directory
function! syntastic#util#tmpdir() " {{{2
let tempdir = ''
if (has('unix') || has('mac')) && executable('mktemp')
" TODO: option "-t" to mktemp(1) is not portable
let tmp = $TMPDIR != '' ? $TMPDIR : $TMP != '' ? $TMP : '/tmp'
let out = split(system('mktemp -q -d ' . tmp . '/vim-syntastic-' . getpid() . '-XXXXXXXX'), "\n")
if v:shell_error == 0 && len(out) == 1
let tempdir = out[0]
endif
endif
if tempdir == ''
if has('win32') || has('win64')
let tempdir = $TEMP . syntastic#util#Slash() . 'vim-syntastic-' . getpid()
elseif has('win32unix')
let tempdir = s:CygwinPath('/tmp/vim-syntastic-' . getpid())
elseif $TMPDIR != ''
let tempdir = $TMPDIR . '/vim-syntastic-' . getpid()
else
let tempdir = '/tmp/vim-syntastic-' . getpid()
endif
endif
return tempdir
endfunction " }}}2
" Recursively remove a directory
function! syntastic#util#rmrf(what) " {{{2
if getftype(a:what) ==# 'dir'
if !exists('s:rmrf')
let s:rmrf =
\ has('unix') || has('mac') ? 'rm -rf' :
\ has('win32') || has('win64') ? 'rmdir /S /Q' :
\ has('win16') || has('win95') || has('dos16') || has('dos32') ? 'deltree /Y' : ''
endif
if s:rmrf != ''
silent! call system(s:rmrf . ' ' . syntastic#util#shescape(a:what))
else
call s:_rmrf(a:what)
endif
else
silent! call delete(a:what)
endif
endfunction " }}}2
"search the first 5 lines of the file for a magic number and return a map
"containing the args and the executable
"
@ -278,6 +326,21 @@ function! s:_translateElement(key, term) " {{{2
return ret
endfunction " }}}2
function! s:_rmrf(what) " {{{2
if !exists('s:rmdir')
let s:rmdir = syntastic#util#shescape(get(g:, 'netrw_localrmdir', 'rmdir'))
endif
if getftype(a:what) ==# 'dir'
for f in split(globpath(a:what, '*'), "\n")
call s:_rmrf(f)
endfor
silent! call system(s:rmdir . ' ' . syntastic#util#shescape(a:what))
else
silent! call delete(a:what)
endif
endfunction " }}}2
" }}}1
let &cpo = s:save_cpo

View file

@ -554,11 +554,12 @@ Default: 0
Set this to the sum of one or more of the following flags to enable
debugging:
1 - trace checker calls
1 - trace general workflow
2 - dump location lists
4 - trace notifiers
8 - trace autocommands
16 - dump options
32 - trace running of specific checkers
Example: >
let g:syntastic_debug = 1

View file

@ -19,12 +19,20 @@ if has('reltime')
lockvar! g:syntastic_start
endif
let g:syntastic_version = '3.5.0-37'
let g:syntastic_version = '3.5.0-65'
lockvar g:syntastic_version
" Sanity checks {{{1
for s:feature in ['autocmd', 'eval', 'modify_fname', 'quickfix', 'reltime', 'user_commands']
for s:feature in [
\ 'autocmd',
\ 'eval',
\ 'file_in_path',
\ 'modify_fname',
\ 'quickfix',
\ 'reltime',
\ 'user_commands'
\ ]
if !has(s:feature)
call syntastic#log#error("need Vim compiled with feature " . s:feature)
finish
@ -38,7 +46,7 @@ if !s:running_windows && executable('uname')
try
let s:uname = system('uname')
catch /\m^Vim\%((\a\+)\)\=:E484/
call syntastic#log#error("your shell " . &shell . " doesn't use traditional UNIX syntax for redirections")
call syntastic#log#error("your shell " . &shell . " can't handle traditional UNIX syntax for redirections")
finish
endtry
lockvar s:uname
@ -53,7 +61,7 @@ let g:syntastic_defaults = {
\ 'always_populate_loc_list': 0,
\ 'auto_jump': 0,
\ 'auto_loc_list': 2,
\ 'bash_hack': 1,
\ 'bash_hack': 0,
\ 'check_on_open': 0,
\ 'check_on_wq': 1,
\ 'cursor_columns': 1,
@ -82,7 +90,7 @@ lockvar! g:syntastic_defaults
for s:key in keys(g:syntastic_defaults)
if !exists('g:syntastic_' . s:key)
let g:syntastic_{s:key} = g:syntastic_defaults[s:key]
let g:syntastic_{s:key} = copy(g:syntastic_defaults[s:key])
endif
endfor
@ -128,6 +136,8 @@ let g:SyntasticDebugAutocommands = 8
lockvar g:SyntasticDebugAutocommands
let g:SyntasticDebugVariables = 16
lockvar g:SyntasticDebugVariables
let g:SyntasticDebugCheckers = 32
lockvar g:SyntasticDebugCheckers
" }}}1
@ -389,7 +399,7 @@ endfunction " }}}2
function! s:ToggleMode() " {{{2
call s:modemap.toggleMode()
call s:ClearCache()
call s:UpdateErrors(1)
call s:notifiers.refresh(g:SyntasticLoclist.New([]))
call s:modemap.echoMode()
endfunction " }}}2
@ -421,7 +431,6 @@ function! SyntasticMake(options) " {{{2
call syntastic#log#debug(g:SyntasticDebugTrace, 'SyntasticMake: called with options:', a:options)
" save options and locale env variables {{{3
let old_shell = &shell
let old_shellredir = &shellredir
let old_local_errorformat = &l:errorformat
let old_errorformat = &errorformat
@ -497,7 +506,6 @@ function! SyntasticMake(options) " {{{2
let &errorformat = old_errorformat
let &l:errorformat = old_local_errorformat
let &shellredir = old_shellredir
let &shell = old_shell
" }}}3
if !s:running_windows && (s:uname() =~ "FreeBSD" || s:uname() =~ "OpenBSD")
@ -587,22 +595,21 @@ function! s:addToErrors(errors, options) " {{{2
return a:errors
endfunction " }}}2
" The script changes &shellredir and &shell to stop the screen flicking when
" shelling out to syntax checkers. Not all OSs support the hacks though.
" XXX: Is this still needed?
" The script changes &shellredir to stop the screen
" flicking when shelling out to syntax checkers.
function! s:bashHack() " {{{2
if !exists('s:bash')
if !s:running_windows && (s:uname() !~# "FreeBSD") && (s:uname() !~# "OpenBSD")
let s:bash =
\ executable('/usr/local/bin/bash') ? '/usr/local/bin/bash' :
\ executable('/bin/bash') ? '/bin/bash' : ''
else
let s:bash = ''
if g:syntastic_bash_hack
if !exists('s:shell_is_bash')
let s:shell_is_bash =
\ !s:running_windows &&
\ (s:uname() !~# "FreeBSD") && (s:uname() !~# "OpenBSD") &&
\ &shell =~# '\m\<bash$'
endif
endif
if g:syntastic_bash_hack && s:bash != ''
let &shell = s:bash
let &shellredir = '&>'
if s:shell_is_bash
let &shellredir = '&>'
endif
endif
endfunction " }}}2

View file

@ -82,6 +82,15 @@ function! g:SyntasticChecker.setWantSort(val) " {{{2
let self._sort = a:val
endfunction " }}}2
function! g:SyntasticChecker.log(msg, ...) " {{{2
let leader = self._filetype . '/' . self._name . ': '
if a:0 > 0
call syntastic#log#debug(g:SyntasticDebugCheckers, leader . a:msg, a:1)
else
call syntastic#log#debug(g:SyntasticDebugCheckers, leader . a:msg)
endif
endfunction " }}}2
function! g:SyntasticChecker.makeprgBuild(opts) " {{{2
let basename = self._filetype . '_' . self._name . '_'

View file

@ -51,6 +51,7 @@ let s:defaultCheckers = {
\ 'lisp': ['clisp'],
\ 'llvm': ['llvm'],
\ 'lua': ['luac'],
\ 'markdown': ['mdl'],
\ 'matlab': ['mlint'],
\ 'nasm': ['nasm'],
\ 'nroff': ['mandoc'],
@ -65,6 +66,7 @@ let s:defaultCheckers = {
\ 'python': ['python', 'flake8', 'pylint'],
\ 'r': [],
\ 'racket': ['racket'],
\ 'rnc': ['rnv'],
\ 'rst': ['rst2pseudoxml'],
\ 'ruby': ['mri'],
\ 'sass': ['sass'],
@ -96,9 +98,13 @@ lockvar! s:defaultCheckers
let s:defaultFiletypeMap = {
\ 'gentoo-metadata': 'xml',
\ 'groff': 'nroff',
\ 'lhaskell': 'haskell',
\ 'litcoffee': 'coffee',
\ 'mail': 'text'
\ 'mail': 'text',
\ 'mkd': 'markdown',
\ 'sgml': 'docbk',
\ 'sgmllnx': 'docbk',
\ }
lockvar! s:defaultFiletypeMap

View file

@ -18,15 +18,30 @@ let g:loaded_syntastic_bro_bro_checker = 1
let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_bro_bro_GetHighlightRegex(item)
let term = matchstr(a:item['text'], '\m at or near "\zs[^"]\+\ze"')
return term != '' ? '\V\<' . escape(term, '\') . '\>' : ''
endfunction
function! SyntaxCheckers_bro_bro_IsAvailable() dict
return system(self.getExecEscaped() . ' --help') =~# '--parse-only'
if !executable(self.getExec())
return 0
endif
if system(self.getExecEscaped() . ' --help') !~# '--parse-only'
call self.log('unknown option "--parse-only"')
return 0
endif
return 1
endfunction
function! SyntaxCheckers_bro_bro_GetLocList() dict
let makeprg = self.makeprgBuild({ 'args_before': '--parse-only' })
"example: error in ./foo.bro, line 3: unknown identifier banana, at or "near "banana"
"example: error in ./foo.bro, line 3: unknown identifier banana, at or near "banana"
let errorformat =
\ 'fatal %trror in %f\, line %l: %m,' .
\ '%trror in %f\, line %l: %m,' .
\ '%tarning in %f\, line %l: %m'

View file

@ -18,18 +18,20 @@ let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_c_checkpatch_IsAvailable() dict
call syntastic#log#deprecationWarn('c_checker_checkpatch_location', 'c_checkpatch_exe')
call syntastic#log#deprecationWarn('c_checker_checkpatch_location', 'c_checkpatch_exec')
if !exists('g:syntastic_c_checkpatch_exe') && !executable(self.getExec())
if !exists('g:syntastic_c_checkpatch_exec') && !executable(self.getExec())
if executable('checkpatch')
let g:syntastic_c_checkpatch_exe = 'checkpatch'
let g:syntastic_c_checkpatch_exec = 'checkpatch'
elseif executable('./scripts/checkpatch.pl')
let g:syntastic_c_checkpatch_exe = fnamemodify('./scripts/checkpatch.pl', ':p')
let g:syntastic_c_checkpatch_exec = fnamemodify('./scripts/checkpatch.pl', ':p')
elseif executable('./scripts/checkpatch')
let g:syntastic_c_checkpatch_exe = fnamemodify('./scripts/checkpatch', ':p')
let g:syntastic_c_checkpatch_exec = fnamemodify('./scripts/checkpatch', ':p')
endif
endif
call self.log('exec =', self.getExec())
return executable(self.getExec())
endfunction

View file

@ -21,10 +21,6 @@ endif
let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_c_clang_check_IsAvailable() dict
return executable(self.getExec())
endfunction
function! SyntaxCheckers_c_clang_check_GetLocList() dict
let makeprg = self.makeprgBuild({
\ 'post_args':

View file

@ -21,10 +21,6 @@ endif
let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_c_clang_tidy_IsAvailable() dict
return executable(self.getExec())
endfunction
function! SyntaxCheckers_c_clang_tidy_GetLocList() dict
let makeprg = self.makeprgBuild({
\ 'post_args':

View file

@ -26,6 +26,7 @@ function! SyntaxCheckers_c_gcc_IsAvailable() dict
if !exists('g:syntastic_c_compiler')
let g:syntastic_c_compiler = executable(self.getExec()) ? self.getExec() : 'clang'
endif
call self.log('g:syntastic_c_compiler =', g:syntastic_c_compiler)
return executable(expand(g:syntastic_c_compiler))
endfunction

View file

@ -24,6 +24,7 @@ endif
function! SyntaxCheckers_c_pc_lint_GetLocList() dict
let config = findfile(g:syntastic_pc_lint_config_file, '.;')
call self.log('config =', config)
" -hFs1 - show filename, add space after messages, try to make message 1 line
" -width(0,0) - make sure there are no line breaks

View file

@ -19,7 +19,7 @@ let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_co_coco_GetLocList() dict
let tmpdir = $TMPDIR != '' ? $TMPDIR : $TMP != '' ? $TMP : '/tmp'
let tmpdir = syntastic#util#tmpdir()
let makeprg = self.makeprgBuild({ 'args_after': '-c -o ' . tmpdir })
let errorformat =
@ -28,9 +28,13 @@ function! SyntaxCheckers_co_coco_GetLocList() dict
\ '%EFailed at: %f,'.
\ '%Z%trror: Parse error on line %l: %m'
return SyntasticMake({
let loclist = SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat })
call syntastic#util#rmrf(tmpdir)
return loclist
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({

View file

@ -27,6 +27,7 @@ function! SyntaxCheckers_cobol_cobc_IsAvailable() dict
if !exists('g:syntastic_cobol_compiler')
let g:syntastic_cobol_compiler = self.getExec()
endif
call self.log('g:syntastic_cobol_compiler =', g:syntastic_cobol_compiler)
return executable(expand(g:syntastic_cobol_compiler))
endfunction

View file

@ -22,9 +22,14 @@ let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_coffee_coffee_IsAvailable() dict
return executable(self.getExec()) &&
\ syntastic#util#versionIsAtLeast(syntastic#util#getVersion(
\ self.getExecEscaped() . ' --version 2>' . syntastic#util#DevNull()), [1,6,2])
if !executable(self.getExec())
return 0
endif
let ver = syntastic#util#getVersion(self.getExecEscaped() . ' --version 2>' . syntastic#util#DevNull())
call self.log(self.getExec() . ' version = ', ver)
return syntastic#util#versionIsAtLeast(ver, [1, 6, 2])
endfunction
function! SyntaxCheckers_coffee_coffee_GetLocList() dict

View file

@ -20,8 +20,9 @@ set cpo&vim
function! SyntaxCheckers_coffee_coffeelint_GetLocList() dict
if !exists('s:coffeelint_new')
let s:coffeelint_new = syntastic#util#versionIsAtLeast(syntastic#util#getVersion(
\ self.getExecEscaped() . ' --version'), [1, 4])
let ver = syntastic#util#getVersion(self.getExecEscaped() . ' --version')
call self.log(self.getExec() . ' version =', ver)
let s:coffeelint_new = syntastic#util#versionIsAtLeast(ver, [1, 4])
endif
let makeprg = self.makeprgBuild({ 'args_after': (s:coffeelint_new ? '--reporter csv' : '--csv') })

View file

@ -26,6 +26,7 @@ function! SyntaxCheckers_cpp_gcc_IsAvailable() dict
if !exists('g:syntastic_cpp_compiler')
let g:syntastic_cpp_compiler = executable(self.getExec()) ? self.getExec() : 'clang++'
endif
call self.log('g:syntastic_cpp_compiler =', g:syntastic_cpp_compiler)
return executable(expand(g:syntastic_cpp_compiler))
endfunction

View file

@ -31,6 +31,7 @@ function! SyntaxCheckers_d_dmd_IsAvailable() dict
if !exists('g:syntastic_d_compiler')
let g:syntastic_d_compiler = self.getExec()
endif
call self.log('g:syntastic_d_compiler =', g:syntastic_d_compiler)
return executable(expand(g:syntastic_d_compiler))
endfunction

View file

@ -0,0 +1,55 @@
"============================================================================
"File: igor.vim
"Description: Syntax checking plugin for syntastic.vim
"Maintainer: LCD 47 <lcd047 at gmail dot com>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
" it and/or modify it under the terms of the Do What The Fuck You
" Want To Public License, Version 2, as published by Sam Hocevar.
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"
"============================================================================
if exists('g:loaded_syntastic_docbk_igor_checker')
finish
endif
let g:loaded_syntastic_docbk_igor_checker = 1
let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_docbk_igor_GetLocList() dict
let makeprg = self.makeprgBuild({})
let errorformat = '%f:%l:%m'
let loclist = SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'defaults': { 'type': 'W' },
\ 'subtype': 'Style',
\ 'returns': [0] })
let buf = bufnr('')
for e in loclist
" XXX: igor strips directories from filenames
let e['bufnr'] = buf
let e['hl'] = '\V' . escape( substitute(e['text'], '\m[^:]*:', '', ''), '\' )
let e['hl'] = substitute(e['hl'], '\V[', '\\zs', 'g')
let e['hl'] = substitute(e['hl'], '\V]', '\\ze', 'g')
" let e['text'] = substitute(e['text'], '\m:.*$', '', '')
endfor
return loclist
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'docbk',
\ 'name': 'igor'})
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set et sts=4 sw=4:

View file

@ -20,6 +20,9 @@ set cpo&vim
" TODO: we should probably split this into separate checkers
function! SyntaxCheckers_elixir_elixir_IsAvailable() dict
call self.log(g:SyntasticDebugCheckers,
\ 'executable("elixir") = ' . executable('elixir') . ', ' .
\ 'executable("mix") = ' . executable('mix'))
return executable('elixir') && executable('mix')
endfunction

View file

@ -21,6 +21,7 @@ set cpo&vim
function! SyntaxCheckers_eruby_ruby_IsAvailable() dict
if !exists('g:syntastic_eruby_ruby_exec') && exists('g:syntastic_ruby_exec')
let g:syntastic_eruby_ruby_exec = g:syntastic_ruby_exec
call self.log('g:syntastic_eruby_ruby_exec =', g:syntastic_eruby_ruby_exec)
endif
return executable(self.getExec())
endfunction

View file

@ -26,6 +26,7 @@ function! SyntaxCheckers_fortran_gfortran_IsAvailable() dict
if !exists('g:syntastic_fortran_compiler')
let g:syntastic_fortran_compiler = self.getExec()
endif
call self.log('g:syntastic_fortran_compiler = ', g:syntastic_fortran_compiler)
return executable(expand(g:syntastic_fortran_compiler))
endfunction

View file

@ -21,7 +21,9 @@ set cpo&vim
function! SyntaxCheckers_go_golint_GetLocList() dict
let makeprg = self.makeprgBuild({})
let errorformat = '%f:%l:%c: %m,%-G%.%#'
let errorformat =
\ '%f:%l:%c: %m,' .
\ '%-G%.%#'
return SyntasticMake({
\ 'makeprg': makeprg,

View file

@ -29,13 +29,11 @@ function! SyntaxCheckers_go_gotype_GetLocList() dict
" the package for the same reasons specified in go.vim ("figuring out
" the import path is fickle").
let errors = SyntasticMake({
return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'cwd': expand('%:p:h'),
\ 'defaults': {'type': 'e'} })
return errors
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({

View file

@ -24,19 +24,21 @@ endfunction
function! SyntaxCheckers_go_govet_GetLocList() dict
let makeprg = 'go vet'
let errorformat = '%Evet: %.%\+: %f:%l:%c: %m,%W%f:%l: %m,%-G%.%#'
let errorformat =
\ '%Evet: %.%\+: %f:%l:%c: %m,' .
\ '%W%f:%l: %m,' .
\ '%-G%.%#'
" The go compiler needs to either be run with an import path as an
" argument or directly from the package directory. Since figuring out
" the proper import path is fickle, just cwd to the package.
let errors = SyntasticMake({
return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'cwd': expand('%:p:h'),
\ 'defaults': {'type': 'w'} })
return errors
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({

View file

@ -21,10 +21,33 @@ let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_haskell_ghc_mod_IsAvailable() dict
" We need either a Vim version that can handle NULs in system() output,
" or a ghc-mod version that has the --boundary option.
let exe = self.getExec()
let s:ghc_mod_new = executable(exe) ? s:GhcModNew(exe) : -1
if !executable(self.getExec())
return 0
endif
" ghc-mod 5.0.0 and later needs the "version" command to print the
" version. But the "version" command appeared in 4.1.0. Thus, we need to
" know the version in order to know how to find out the version. :)
" Try "ghc-mod version".
let ver = filter(split(system(self.getExecEscaped() . ' version'), '\n'), 'v:val =~# ''\m^ghc-mod version''')
if !len(ver)
" That didn't work. Try "ghc-mod" alone.
let ver = filter(split(system(self.getExecEscaped()), '\n'), 'v:val =~# ''\m^ghc-mod version''')
endif
if len(ver)
" Encouraged by the great success in finding out the version, now we
" need either a Vim that can handle NULs in system() output, or a
" ghc-mod that has the "--boundary" option.
let parsed_ver = syntastic#util#parseVersion(ver[0])
call self.log(self.getExec() . ' version =', parsed_ver)
let s:ghc_mod_new = syntastic#util#versionIsAtLeast(parsed_ver, [2, 1, 2])
else
call syntastic#log#error("checker haskell/ghc_mod: can't parse version string (abnormal termination?)")
let s:ghc_mod_new = -1
endif
return (s:ghc_mod_new >= 0) && (v:version >= 704 || s:ghc_mod_new)
endfunction
@ -49,18 +72,6 @@ function! SyntaxCheckers_haskell_ghc_mod_GetLocList() dict
\ 'returns': [0] })
endfunction
function! s:GhcModNew(exe)
let exe = syntastic#util#shescape(a:exe)
try
let ghc_mod_version = filter(split(system(exe), '\n'), 'v:val =~# ''\m^ghc-mod version''')[0]
let ret = syntastic#util#versionIsAtLeast(syntastic#util#parseVersion(ghc_mod_version), [2, 1, 2])
catch /\m^Vim\%((\a\+)\)\=:E684/
call syntastic#log#error("checker haskell/ghc_mod: can't parse version string (abnormal termination?)")
let ret = -1
endtry
return ret
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'haskell',
\ 'name': 'ghc_mod',

View file

@ -28,6 +28,8 @@ function! SyntaxCheckers_haxe_haxe_GetLocList() dict
endif
let hxml = fnamemodify(hxml, ':p')
call self.log('hxml =', hxml)
if hxml != ''
let makeprg = self.makeprgBuild({
\ 'fname': syntastic#util#shescape(fnamemodify(hxml, ':t')) })

View file

@ -19,8 +19,14 @@ set cpo&vim
function! SyntaxCheckers_html_jshint_IsAvailable() dict
call syntastic#log#deprecationWarn('jshint_exec', 'html_jshint_exec')
return executable(self.getExec()) &&
\ syntastic#util#versionIsAtLeast(syntastic#util#getVersion(self.getExecEscaped() . ' --version'), [2,4])
if !executable(self.getExec())
return 0
endif
let ver = syntastic#util#getVersion(self.getExecEscaped() . ' --version')
call self.log(self.getExec() . ' version =', ver)
return syntastic#util#versionIsAtLeast(ver, [2, 4])
endfunction
function! SyntaxCheckers_html_jshint_GetLocList() dict

View file

@ -164,8 +164,8 @@ let s:empty_tags = [
lockvar! s:empty_tags
function! s:IgnoreError(text)
for i in s:ignore_errors + g:syntastic_html_tidy_ignore_errors
if stridx(a:text, i) != -1
for item in s:ignore_errors + g:syntastic_html_tidy_ignore_errors
if stridx(a:text, item) != -1
return 1
endif
endfor

View file

@ -28,10 +28,17 @@ let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_java_checkstyle_IsAvailable() dict
return
\ executable(self.getExec()) &&
\ filereadable(expand(g:syntastic_java_checkstyle_classpath)) &&
\ filereadable(expand(g:syntastic_java_checkstyle_conf_file))
if !executable(self.getExec())
return 0
endif
let classpath = expand(g:syntastic_java_checkstyle_classpath)
let conf_file = expand(g:syntastic_java_checkstyle_conf_file)
call self.log(
\ 'filereadable(' . string(classpath) . ') = ' . filereadable(classpath) . ', ' .
\ 'filereadable(' . string(conf_file) . ') = ' . filereadable(conf_file))
return filereadable(classpath) && filereadable(conf_file)
endfunction
function! SyntaxCheckers_java_checkstyle_GetLocList() dict

View file

@ -51,15 +51,7 @@ function! s:CygwinPath(path)
endfunction
if !exists('g:syntastic_java_javac_temp_dir')
if has('win32') || has('win64')
let g:syntastic_java_javac_temp_dir = $TEMP . syntastic#util#Slash() . 'vim-syntastic-javac'
elseif has('win32unix')
let g:syntastic_java_javac_temp_dir = s:CygwinPath('/tmp/vim-syntastic-javac')
elseif $TMPDIR != ''
let g:syntastic_java_javac_temp_dir = $TMPDIR . '/vim-syntastic-javac'
else
let g:syntastic_java_javac_temp_dir = '/tmp/vim-syntastic-javac'
endif
let g:syntastic_java_javac_temp_dir = syntastic#util#tmpdir()
endif
if !exists('g:syntastic_java_javac_autoload_maven_classpath')
@ -90,18 +82,6 @@ function! s:RemoveCarriageReturn(line)
return substitute(a:line, "\r", '', 'g')
endfunction
" recursively remove directory and all it's sub-directories
function! s:RemoveDir(dir)
if isdirectory(a:dir)
for f in split(globpath(a:dir, '*'), "\n")
call s:RemoveDir(f)
endfor
silent! call system('rmdir ' . syntastic#util#shescape(a:dir))
else
silent! call delete(a:dir)
endif
endfunction
function! s:ClassSep()
return (syntastic#util#isRunningWindows() || has('win32unix')) ? ';' : ':'
endfunction
@ -419,7 +399,7 @@ function! SyntaxCheckers_java_javac_GetLocList() dict
\ 'postprocess': ['cygwinRemoveCR'] })
if g:syntastic_java_javac_delete_output
call s:RemoveDir(output_dir)
call syntastic#util#rmrf(output_dir)
endif
return errors

View file

@ -20,25 +20,33 @@ set cpo&vim
function! SyntaxCheckers_javascript_closurecompiler_IsAvailable() dict
call syntastic#log#deprecationWarn('javascript_closure_compiler_path', 'javascript_closurecompiler_path')
return
\ executable("java") &&
\ exists("g:syntastic_javascript_closurecompiler_path") &&
\ filereadable(g:syntastic_javascript_closurecompiler_path)
if !executable(self.getExec())
return 0
endif
let cp = get(g:, 'syntastic_javascript_closurecompiler_path', '')
call self.log('g:syntastic_javascript_closurecompiler_path =', cp)
let jar = expand(cp)
call self.log('filereadable(' . string(jar) . ') = ' . filereadable(jar))
return filereadable(jar)
endfunction
function! SyntaxCheckers_javascript_closurecompiler_GetLocList() dict
call syntastic#log#deprecationWarn('javascript_closure_compiler_options', 'javascript_closurecompiler_args')
call syntastic#log#deprecationWarn('javascript_closure_compiler_file_list', 'javascript_closurecompiler_file_list')
if exists("g:syntastic_javascript_closurecompiler_file_list")
let file_list = join(readfile(g:syntastic_javascript_closurecompiler_file_list))
let flist = expand(get(g:, 'syntastic_javascript_closurecompiler_file_list', ''))
if filereadable(flist)
let file_list = map( readfile(flist), 'expand(v:var)' )
else
let file_list = syntastic#util#shexpand('%')
let file_list = [expand('%')]
endif
let makeprg = self.makeprgBuild({
\ 'exe_after': '-jar ' . g:syntastic_javascript_closurecompiler_path,
\ 'args_after': '--js' ,
\ 'exe_after': ['-jar', expand(g:syntastic_javascript_closurecompiler_path)],
\ 'args_after': '--js',
\ 'fname': file_list })
let errorformat =

View file

@ -18,9 +18,14 @@ let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_javascript_eslint_IsAvailable() dict
return
\ executable(self.getExec()) &&
\ syntastic#util#versionIsAtLeast(syntastic#util#getVersion(self.getExecEscaped() . ' --version'), [0, 1])
if !executable(self.getExec())
return 0
endif
let ver = syntastic#util#getVersion(self.getExecEscaped() . ' --version')
call self.log(self.getExec() . ' version =', ver)
return syntastic#util#versionIsAtLeast(ver, [0, 1])
endfunction
function! SyntaxCheckers_javascript_eslint_GetLocList() dict

View file

@ -22,7 +22,10 @@ function! SyntaxCheckers_javascript_jshint_IsAvailable() dict
if !executable(self.getExec())
return 0
endif
let s:jshint_version = syntastic#util#getVersion(self.getExecEscaped() . ' --version')
call self.log(self.getExec() . ' version =', s:jshint_version)
return syntastic#util#versionIsAtLeast(s:jshint_version, [1])
endfunction

View file

@ -19,10 +19,14 @@ set cpo&vim
function! SyntaxCheckers_javascript_jsxhint_IsAvailable() dict
let jsxhint_version = system(self.getExecEscaped() . ' --version')
return
\ v:shell_error == 0 &&
\ jsxhint_version =~# '\m^JSXHint\>' &&
\ syntastic#util#versionIsAtLeast(syntastic#util#parseVersion(jsxhint_version), [0, 4, 1])
if v:shell_error || (jsxhint_version !~# '\m^JSXHint\>')
return 0
endif
let ver = syntastic#util#parseVersion(jsxhint_version)
call self.log(self.getExec() . ' version =', ver)
return syntastic#util#versionIsAtLeast(ver, [0, 4, 1])
endfunction
function! SyntaxCheckers_javascript_jsxhint_GetLocList() dict

View file

@ -36,6 +36,7 @@ set cpo&vim
let s:node_file = 'node ' . syntastic#util#shescape(expand('<sfile>:p:h') . 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)
return g:syntastic_less_use_less_lint ? executable('node') : executable(self.getExec())
endfunction

View file

@ -47,7 +47,7 @@ endfunction
function! SyntaxCheckers_lua_luac_GetLocList() dict
let makeprg = self.makeprgBuild({ 'args_after': '-p' })
let errorformat = 'luac: %#%f:%l: %m'
let errorformat = 'luac: %#%f:%l: %m'
return SyntasticMake({
\ 'makeprg': makeprg,

View file

@ -0,0 +1,45 @@
"============================================================================
"File: mdl.vim
"Description: Syntax checking plugin for syntastic.vim
"Maintainer: Charles Beynon <etothepiipower at gmail dot com>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
" it and/or modify it under the terms of the Do What The Fuck You
" Want To Public License, Version 2, as published by Sam Hocevar.
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"
"============================================================================
if exists("g:loaded_syntastic_markdown_mdl_checker")
finish
endif
let g:loaded_syntastic_markdown_mdl_checker = 1
let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_markdown_mdl_GetLocList() dict
let makeprg = self.makeprgBuild({ 'args': '--warnings' })
let errorformat =
\ '%E%f:%l: %m,'.
\ '%W%f: Kramdown Warning: %m found on line %l'
let loclist = SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'subtype': 'Style' })
call self.setWantSort(1)
return loclist
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'markdown',
\ 'name': 'mdl'})
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set et sts=4 sw=4:

View file

@ -0,0 +1,25 @@
"============================================================================
"File: igor.vim
"Description: Syntax checking plugin for syntastic.vim
"Maintainer: LCD 47 <lcd047 at gmail dot com>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
" it and/or modify it under the terms of the Do What The Fuck You
" Want To Public License, Version 2, as published by Sam Hocevar.
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"
"============================================================================
if exists('g:loaded_syntastic_nroff_igor_checker')
finish
endif
let g:loaded_syntastic_nroff_igor_checker = 1
runtime! syntax_checkers/docbk/*.vim
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'nroff',
\ 'name': 'igor',
\ 'redirect': 'docbk/igor'})
" vim: set et sts=4 sw=4:

View file

@ -26,6 +26,7 @@ function! SyntaxCheckers_objc_gcc_IsAvailable() dict
if !exists('g:syntastic_objc_compiler')
let g:syntastic_objc_compiler = executable(self.getExec()) ? self.getExec() : 'clang'
endif
call self.log('g:syntastic_objc_compiler =', g:syntastic_objc_compiler)
return executable(expand(g:syntastic_objc_compiler))
endfunction

View file

@ -26,6 +26,7 @@ function! SyntaxCheckers_objcpp_gcc_IsAvailable() dict
if !exists('g:syntastic_c_compiler')
let g:syntastic_objcpp_compiler = executable(self.getExec()) ? self.getExec() : 'clang'
endif
call self.log('g:syntastic_objcpp_compiler =', g:syntastic_objcpp_compiler)
return executable(expand(g:syntastic_objcpp_compiler))
endfunction

View file

@ -19,9 +19,12 @@ let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_puppet_puppet_GetLocList() dict
let ver = syntastic#util#getVersion(self.getExecEscaped() . ' --version 2>' . syntastic#util#DevNull())
if !exists('s:puppet_version')
let s:puppet_version = syntastic#util#getVersion(self.getExecEscaped() . ' --version 2>' . syntastic#util#DevNull())
call self.log(self.getExec() . ' version =', s:puppet_version)
endif
if syntastic#util#versionIsAtLeast(ver, [2,7,0])
if syntastic#util#versionIsAtLeast(s:puppet_version, [2,7,0])
let args = 'parser validate --color=false'
else
let args = '--color=false --parseonly'

View file

@ -19,11 +19,16 @@ let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_puppet_puppetlint_IsAvailable() dict
return
\ executable("puppet") &&
\ executable(self.getExec()) &&
\ syntastic#util#versionIsAtLeast(syntastic#util#getVersion(
\ self.getExecEscaped() . ' --version 2>' . syntastic#util#DevNull()), [0,1,10])
call self.log("executable('puppet') = " . executable('puppet') . ', ' .
\ "executable(" . string(self.getExec()) . ") = " . executable(self.getExec()))
if !executable('puppet') || !executable(self.getExec())
return 0
endif
let ver = syntastic#util#getVersion(self.getExecEscaped() . ' --version 2>' . syntastic#util#DevNull())
call self.log(self.getExec() . ' version =', ver)
return syntastic#util#versionIsAtLeast(ver, [0, 1, 10])
endfunction
function! SyntaxCheckers_puppet_puppetlint_GetLocList() dict

View file

@ -0,0 +1,35 @@
"============================================================================
"File: mypy.vim
"Description: Syntax checking plugin for syntastic.vim
"Author: Russ Hewgill <Russ dot Hewgill at gmail dot com>
"
"============================================================================
if exists("g:loaded_syntastic_python_mypy_checker")
finish
endif
let g:loaded_syntastic_python_mypy_checker = 1
let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_python_mypy_GetLocList() dict
let makeprg = self.makeprgBuild({})
let errorformat = '%f\, line %l: %m'
return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'defaults': { 'type': 'E' },
\ 'returns': [0, 1] })
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'python',
\ 'name': 'mypy'})
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set et sts=4 sw=4:

View file

@ -15,8 +15,9 @@ set cpo&vim
function! SyntaxCheckers_python_pep257_GetLocList() dict
if !exists('s:pep257_new')
let s:pep257_new = syntastic#util#versionIsAtLeast(syntastic#util#getVersion(
\ self.getExecEscaped() . ' --version'), [0, 3])
let ver = syntastic#util#getVersion(self.getExecEscaped() . ' --version')
call self.log(self.getExec() . ' version =', ver)
let s:pep257_new = syntastic#util#versionIsAtLeast(ver, [0, 3])
endif
let makeprg = self.makeprgBuild({})

View file

@ -16,14 +16,38 @@ let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_python_pylint_IsAvailable() dict
let exe = self.getExec()
let s:pylint_new = executable(exe) ? s:PylintNew(exe) : -1
if !executable(self.getExec())
return 0
endif
try
" On Windows the version is shown as "pylint-script.py 1.0.0".
" On Gentoo Linux it's "pylint-python2.7 0.28.0".
" On NixOS, that would be ".pylint-wrapped 0.26.0".
" On Arch Linux it's "pylint2 1.1.0".
" On new-ish Fedora it's "python3-pylint 1.2.0".
" Have you guys considered switching to creative writing yet? ;)
let pylint_version = filter( split(system(self.getExecEscaped() . ' --version'), '\m, \=\|\n'),
\ 'v:val =~# ''\m^\(python[-0-9]*-\|\.\)\=pylint[-0-9]*\>''' )[0]
let ver = syntastic#util#parseVersion(substitute(pylint_version, '\v^\S+\s+', '', ''))
call self.log(self.getExec() . ' version =', ver)
let s:pylint_new = syntastic#util#versionIsAtLeast(ver, [1])
catch /\m^Vim\%((\a\+)\)\=:E684/
call syntastic#log#error("checker python/pylint: can't parse version string (abnormal termination?)")
let s:pylint_new = -1
endtry
return s:pylint_new >= 0
endfunction
function! SyntaxCheckers_python_pylint_GetLocList() dict
let makeprg = self.makeprgBuild({
\ 'args_after': (s:pylint_new ? '-f text --msg-template="{path}:{line}:{column}:{C}: [{symbol}] {msg}" -r n' : '-f parseable -r n -i y') })
\ 'args_after': (s:pylint_new ?
\ '-f text --msg-template="{path}:{line}:{column}:{C}: [{symbol}] {msg}" -r n' :
\ '-f parseable -r n -i y') })
let errorformat =
\ '%A%f:%l:%c:%t: %m,' .
@ -62,26 +86,6 @@ function! SyntaxCheckers_python_pylint_GetLocList() dict
return loclist
endfunction
function! s:PylintNew(exe)
let exe = syntastic#util#shescape(a:exe)
try
" On Windows the version is shown as "pylint-script.py 1.0.0".
" On Gentoo Linux it's "pylint-python2.7 0.28.0".
" On NixOS, that would be ".pylint-wrapped 0.26.0".
" On Arch Linux it's "pylint2 1.1.0".
" On new-ish Fedora it's "python3-pylint 1.2.0".
" Have you guys considered switching to creative writing yet? ;)
let pylint_version = filter( split(system(exe . ' --version'), '\m, \=\|\n'),
\ 'v:val =~# ''\m^\(python[-0-9]*-\|\.\)\=pylint[-0-9]*\>''' )[0]
let pylint_version = substitute(pylint_version, '\v^\S+\s+', '', '')
let ret = syntastic#util#versionIsAtLeast(syntastic#util#parseVersion(pylint_version), [1])
catch /\m^Vim\%((\a\+)\)\=:E684/
call syntastic#log#error("checker python/pylint: can't parse version string (abnormal termination?)")
let ret = -1
endtry
return ret
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'python',
\ 'name': 'pylint' })

View file

@ -21,8 +21,14 @@ set cpo&vim
let s:compiler = expand('<sfile>:p:h') . syntastic#util#Slash() . 'compile.py'
function! SyntaxCheckers_python_python_IsAvailable() dict
return executable(self.getExec()) &&
\ syntastic#util#versionIsAtLeast(syntastic#util#getVersion(self.getExecEscaped() . ' --version'), [2, 6])
if !executable(self.getExec())
return 0
endif
let ver = syntastic#util#getVersion(self.getExecEscaped() . ' --version')
call self.log(self.getExec() . ' version =', ver)
return syntastic#util#versionIsAtLeast(ver, [2, 6])
endfunction
function! SyntaxCheckers_python_python_GetLocList() dict

View file

@ -0,0 +1,38 @@
"============================================================================
"File: rnv.vim
"Description: RelaxNG RNV syntax checking plugin for syntastic.vim
"Maintainer: Remko Tronçon <remko at el-tramo dot be>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
" it and/or modify it under the terms of the Do What The Fuck You
" Want To Public License, Version 2, as published by Sam Hocevar.
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"============================================================================
if exists("g:loaded_syntastic_rnc_rnv_checker")
finish
endif
let g:loaded_syntastic_rnc_rnv_checker = 1
let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_rnc_rnv_GetLocList() dict
let makeprg = self.makeprgBuild({ 'args': '-c' })
let errorformat =
\ '%f:%l:%c: %trror: %m'
return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat })
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'rnc',
\ 'name': 'rnv'})
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set et sts=4 sw=4:

View file

@ -1,6 +1,6 @@
"============================================================================
"File: rst.vim
"Description: Syntax checking plugin for docutil's reStructuredText files
"Description: Syntax checking plugin for docutils' reStructuredText files
"Maintainer: James Rowe <jnrowe at gmail dot com>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute

View file

@ -21,6 +21,7 @@ set cpo&vim
function! SyntaxCheckers_ruby_mri_IsAvailable() dict
if !exists('g:syntastic_ruby_mri_exec') && exists('g:syntastic_ruby_exec')
let g:syntastic_ruby_mri_exec = g:syntastic_ruby_exec
call self.log('g:syntastic_ruby_exec =', g:syntastic_ruby_exec)
endif
return executable(self.getExec())
endfunction

View file

@ -22,9 +22,14 @@ let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_ruby_rubocop_IsAvailable() dict
return
\ executable(self.getExec()) &&
\ syntastic#util#versionIsAtLeast(syntastic#util#getVersion(self.getExecEscaped() . ' --version'), [0, 9, 0])
if !executable(self.getExec())
return 0
endif
let ver = syntastic#util#getVersion(self.getExecEscaped() . ' --version')
call self.log(self.getExec() . ' version =', ver)
return syntastic#util#versionIsAtLeast(ver, [0, 9, 0])
endfunction
function! SyntaxCheckers_ruby_rubocop_GetLocList() dict

View file

@ -21,8 +21,9 @@ set cpo&vim
function! SyntaxCheckers_ruby_rubylint_GetLocList() dict
if !exists('s:rubylint_new')
let s:rubylint_new = syntastic#util#versionIsAtLeast(syntastic#util#getVersion(
\ self.getExecEscaped() . ' --version'), [2])
let ver = syntastic#util#getVersion(self.getExecEscaped() . ' --version')
call self.log(self.getExec() . ' version =', ver)
let s:rubylint_new = syntastic#util#versionIsAtLeast(ver, [2])
endif
let makeprg = self.makeprgBuild({ 'args': (s:rubylint_new ? '' : 'analyze ') . '--presenter=syntastic' })

View file

@ -17,9 +17,13 @@ let g:loaded_syntastic_sass_sass_checker = 1
"sass caching for large files drastically speeds up the checking, but store it
"in a temp location otherwise sass puts .sass_cache dirs in the users project
let s:sass_cache_location = tempname()
let s:sass_cache_location = syntastic#util#tmpdir()
lockvar s:sass_cache_location
augroup syntastic
autocmd VimLeave * call syntastic#util#rmrf(s:sass_cache_location)
augroup END
"By default do not check partials as unknown variables are a syntax error
if !exists("g:syntastic_sass_check_partials")
let g:syntastic_sass_check_partials = 0

View file

@ -27,10 +27,16 @@ let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_scala_scalastyle_IsAvailable() dict
return
\ executable(self.getExec()) &&
\ filereadable(expand(g:syntastic_scala_scalastyle_jar)) &&
\ filereadable(expand(g:syntastic_scala_scalastyle_config_file))
if !executable(self.getExec())
return 0
endif
let jar = expand(g:syntastic_scala_scalastyle_jar)
let conf_file = expand(g:syntastic_scala_scalastyle_config_file)
call self.log('filereadable(' . string(jar) . ') = ' . filereadable(jar) . ', ' .
\ 'filereadable(' . string(conf_file) . ') = ' . filereadable(conf_file))
return filereadable(jar) && filereadable(conf_file)
endfunction
function! SyntaxCheckers_scala_scalastyle_GetLocList() dict

View file

@ -18,10 +18,14 @@ let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_scss_scss_lint_IsAvailable() dict
return
\ executable(self.getExec()) &&
\ syntastic#util#versionIsAtLeast(syntastic#util#getVersion(
\ self.getExecEscaped() . ' --version'), [0, 12])
if !executable(self.getExec())
return 0
endif
let ver = syntastic#util#getVersion(self.getExecEscaped() . ' --version')
call self.log(self.getExec() . ' version =', ver)
return syntastic#util#versionIsAtLeast(ver, [0, 12])
endfunction
function! SyntaxCheckers_scss_scss_lint_GetLocList() dict

View file

@ -19,6 +19,7 @@ let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_sh_sh_IsAvailable() dict
call self.log('shell =', s:GetShell())
return s:IsShellValid()
endfunction

View file

@ -20,8 +20,9 @@ set cpo&vim
function! SyntaxCheckers_slim_slimrb_GetLocList() dict
if !exists('s:slimrb_new')
let s:slimrb_new = syntastic#util#versionIsAtLeast(syntastic#util#getVersion(
\ self.getExecEscaped() . ' --version 2>'. syntastic#util#DevNull()), [1, 3, 1])
let ver = syntastic#util#getVersion(self.getExecEscaped() . ' --version 2>'. syntastic#util#DevNull())
call self.log(self.getExec() . ' version =', ver)
let s:slimrb_new = syntastic#util#versionIsAtLeast(ver, [1, 3, 1])
endif
let makeprg = self.makeprgBuild({ 'args_after': '-c' })

View file

@ -9,19 +9,6 @@
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"
"============================================================================
"
" For details about ChkTeX see:
"
" http://baruch.ev-en.org/proj/chktex/
"
" Checker options:
"
" - g:syntastic_tex_chktex_showmsgs (boolean; default: 1)
" whether to show informational messages (chktex option "-m");
" by default informational messages are shown as warnings
"
" - g:syntastic_tex_chktex_args (string; default: empty)
" command line options to pass to chktex
if exists('g:loaded_syntastic_tex_chktex_checker')
finish

View file

@ -0,0 +1,25 @@
"============================================================================
"File: igor.vim
"Description: Syntax checking plugin for syntastic.vim
"Maintainer: LCD 47 <lcd047 at gmail dot com>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
" it and/or modify it under the terms of the Do What The Fuck You
" Want To Public License, Version 2, as published by Sam Hocevar.
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"
"============================================================================
if exists('g:loaded_syntastic_text_igor_checker')
finish
endif
let g:loaded_syntastic_text_igor_checker = 1
runtime! syntax_checkers/docbk/*.vim
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'text',
\ 'name': 'igor',
\ 'redirect': 'docbk/igor'})
" vim: set et sts=4 sw=4:

View file

@ -63,7 +63,7 @@ function! s:GetValaVapiDirs()
elseif type(g:syntastic_vala_vapi_dirs) == type([])
return copy(g:syntastic_vala_vapi_dirs)
else
echoerr 'g:syntastic_vala_vapi_dirs must be either list or string: fallback to in file modules string'
echoerr 'g:syntastic_vala_vapi_dirs must be either a list, or a string: fallback to in-file modules string'
endif
endif

View file

@ -20,6 +20,7 @@ function! SyntaxCheckers_verilog_verilator_IsAvailable() dict
if !exists('g:syntastic_verilog_compiler')
let g:syntastic_verilog_compiler = self.getExec()
endif
call self.log('g:syntastic_verilog_compiler =', g:syntastic_verilog_compiler)
return executable(expand(g:syntastic_verilog_compiler))
endfunction

View file

@ -36,9 +36,11 @@ function! SyntaxCheckers_vim_vimlint_GetHighlightRegex(item)
endfunction
function! SyntaxCheckers_vim_vimlint_IsAvailable() dict
return
\ globpath(&runtimepath, 'autoload/vimlparser.vim') != '' &&
\ globpath(&runtimepath, 'autoload/vimlint.vim') != ''
let vimlparser = globpath(&runtimepath, 'autoload/vimlparser.vim')
let vimlint = globpath(&runtimepath, 'autoload/vimlint.vim')
call self.log("globpath(&runtimepath, 'autoload/vimlparser.vim') = " . string(vimlparser) . ', ' .
\ "globpath(&runtimepath, 'autoload/vimlint.vim') = " . string(vimlint))
return vimlparser != '' && vimlint != ''
endfunction
function! SyntaxCheckers_vim_vimlint_GetLocList() dict

View file

@ -47,8 +47,8 @@ function! s:TidyEncOptByFenc()
endfunction
function! s:IgnoreError(text)
for i in g:syntastic_xhtml_tidy_ignore_errors
if stridx(a:text, i) != -1
for item in g:syntastic_xhtml_tidy_ignore_errors
if stridx(a:text, item) != -1
return 1
endif
endfor

View file

@ -23,8 +23,9 @@ set cpo&vim
function! SyntaxCheckers_yaml_jsyaml_GetLocList() dict
if !exists('s:js_yaml_new')
let s:js_yaml_new =
\ syntastic#util#versionIsAtLeast(syntastic#util#getVersion(self.getExecEscaped() . ' --version'), [2])
let ver = syntastic#util#getVersion(self.getExecEscaped() . ' --version')
call self.log(self.getExec() . ' version =', ver)
let s:js_yaml_new = syntastic#util#versionIsAtLeast(ver, [2])
endif
let makeprg = self.makeprgBuild({ 'args_after': (s:js_yaml_new ? '' : '--compact') })

View file

@ -191,7 +191,7 @@ MIT License. Copyright (c) 2013-2014 Bailey Ling.
[17]: https://github.com/mbbill/undotree
[18]: https://github.com/scrooloose/nerdtree
[19]: https://github.com/majutsushi/tagbar
[20]: https://powerline.readthedocs.org/en/latest/fontpatching.html
[20]: https://powerline.readthedocs.org/en/master/installation.html#patched-fonts
[21]: https://bitbucket.org/ludovicchabant/vim-lawrencium
[22]: https://github.com/MarcWeber/vim-addon-manager
[23]: https://github.com/altercation/solarized

View file

@ -0,0 +1,85 @@
let g:airline#themes#raven#palette = {}
let g:airline#themes#raven#palette.accents = {
\ 'red': [ '#ff2121' , '' , 196 , '' , '' ],
\ }
let s:N1 = [ '#c8c8c8' , '#2e2e2e' , 188 , 235 ]
let s:N2 = [ '#c8c8c8' , '#2e2e2e' , 188 , 235 ]
let s:N3 = [ '#c8c8c8' , '#2e2e2e' , 188 , 235 ]
let g:airline#themes#raven#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3)
let g:airline#themes#raven#palette.normal_modified = {
\ 'airline_c': [ '#e25000' , '#2e2e2e' , 166 , 235 , '' ] ,
\ }
let s:I1 = [ '#11c279' , '#2e2e2e' , 36 , 235 ]
let s:I2 = [ '#11c279' , '#2e2e2e' , 36 , 235 ]
let s:I3 = [ '#11c279' , '#2e2e2e' , 36 , 235 ]
let g:airline#themes#raven#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3)
let g:airline#themes#raven#palette.insert_modified = {
\ 'airline_c': [ '#e25000' , '#2e2e2e' , 166 , 235 , '' ] ,
\ }
let g:airline#themes#raven#palette.insert_paste = {
\ 'airline_a': [ s:I1[0] , '#2e2e2e' , s:I1[2] , 235 , '' ] ,
\ }
let g:airline#themes#raven#palette.replace = copy(g:airline#themes#raven#palette.insert)
let g:airline#themes#raven#palette.replace.airline_a = [ '#e60000' , s:I1[1] , 160 , s:I1[3] , '' ]
let g:airline#themes#raven#palette.replace.airline_z = [ '#e60000' , s:I1[1] , 160 , s:I1[3] , '' ]
let g:airline#themes#raven#palette.replace_modified = g:airline#themes#raven#palette.insert_modified
let s:V1 = [ '#6565ff' , '#2e2e2e' , 63 , 235 ]
let s:V2 = [ '#6565ff' , '#2e2e2e' , 63 , 235 ]
let s:V3 = [ '#6565ff' , '#2e2e2e' , 63 , 235 ]
let g:airline#themes#raven#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3)
let g:airline#themes#raven#palette.visual_modified = {
\ 'airline_c': [ '#e25000' , '#2e2e2e' , 166 , 235 , '' ] ,
\ }
let s:IA = [ '#5e5e5e' , '#222222' , 59 , 235 , '' ]
let g:airline#themes#raven#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA)
let g:airline#themes#raven#palette.inactive_modified = {
\ 'airline_c': [ '#e25000' , '' , 166 , '' , '' ] ,
\ }
let g:airline#themes#raven#palette.tabline = {
\ 'airline_tab': ['#c8c8c8' , '#2e2e2e' , 188 , 235 , '' ],
\ 'airline_tabsel': ['#2e2e2e' , '#a4c639' , 235 , 149 , '' ],
\ 'airline_tabtype': ['#c8c8c8' , '#2e2e2e' , 188 , 235 , '' ],
\ 'airline_tabfill': ['#c8c8c8' , '#2e2e2e' , 188 , 235 , '' ],
\ 'airline_tabmod': ['#2e2e2e' , '#a4c639' , 235 , 149 , '' ],
\ }
let s:WI = [ '#ff0000', '#2e2e2e', 196, 235 ]
let g:airline#themes#raven#palette.normal.airline_warning = [
\ s:WI[0], s:WI[1], s:WI[2], s:WI[3]
\ ]
let g:airline#themes#raven#palette.normal_modified.airline_warning =
\ g:airline#themes#raven#palette.normal.airline_warning
let g:airline#themes#raven#palette.insert.airline_warning =
\ g:airline#themes#raven#palette.normal.airline_warning
let g:airline#themes#raven#palette.insert_modified.airline_warning =
\ g:airline#themes#raven#palette.normal.airline_warning
let g:airline#themes#raven#palette.visual.airline_warning =
\ g:airline#themes#raven#palette.normal.airline_warning
let g:airline#themes#raven#palette.visual_modified.airline_warning =
\ g:airline#themes#raven#palette.normal.airline_warning
let g:airline#themes#raven#palette.replace.airline_warning =
\ g:airline#themes#raven#palette.normal.airline_warning
let g:airline#themes#raven#palette.replace_modified.airline_warning =
\ g:airline#themes#raven#palette.normal.airline_warning
if !get(g:, 'loaded_ctrlp', 0)
finish
endif
let g:airline#themes#raven#palette.ctrlp = airline#extensions#ctrlp#generate_color_map(
\ [ '#c8c8c8' , '#2e2e2e' , 188 , 235 , '' ] ,
\ [ '#c8c8c8' , '#2e2e2e' , 188 , 235 , '' ] ,
\ [ '#2e2e2e' , '#a4c639' , 235 , 149 , '' ] )

View file

@ -0,0 +1,85 @@
let g:airline#themes#silver#palette = {}
let g:airline#themes#silver#palette.accents = {
\ 'red': [ '#ff2121' , '' , 196 , '' , '' ],
\ }
let s:N1 = [ '#414141' , '#e1e1e1' , 59 , 188 ]
let s:N2 = [ '#414141' , '#e1e1e1' , 59 , 188 ]
let s:N3 = [ '#414141' , '#e1e1e1' , 59 , 188 ]
let g:airline#themes#silver#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3)
let g:airline#themes#silver#palette.normal_modified = {
\ 'airline_c': [ '#e25000' , '#e1e1e1' , 166 , 188 , '' ] ,
\ }
let s:I1 = [ '#0d935c' , '#e1e1e1' , 29 , 188 ]
let s:I2 = [ '#0d935c' , '#e1e1e1' , 29 , 188 ]
let s:I3 = [ '#0d935c' , '#e1e1e1' , 29 , 188 ]
let g:airline#themes#silver#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3)
let g:airline#themes#silver#palette.insert_modified = {
\ 'airline_c': [ '#e25000' , '#e1e1e1' , 166 , 188 , '' ] ,
\ }
let g:airline#themes#silver#palette.insert_paste = {
\ 'airline_a': [ s:I1[0] , '#e1e1e1' , s:I1[2] , 188 , '' ] ,
\ }
let g:airline#themes#silver#palette.replace = copy(g:airline#themes#silver#palette.insert)
let g:airline#themes#silver#palette.replace.airline_a = [ '#b30000' , s:I1[1] , 124 , s:I1[3] , '' ]
let g:airline#themes#silver#palette.replace.airline_z = [ '#b30000' , s:I1[1] , 124 , s:I1[3] , '' ]
let g:airline#themes#silver#palette.replace_modified = g:airline#themes#silver#palette.insert_modified
let s:V1 = [ '#0000b3' , '#e1e1e1' , 19 , 188 ]
let s:V2 = [ '#0000b3' , '#e1e1e1' , 19 , 188 ]
let s:V3 = [ '#0000b3' , '#e1e1e1' , 19 , 188 ]
let g:airline#themes#silver#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3)
let g:airline#themes#silver#palette.visual_modified = {
\ 'airline_c': [ '#e25000' , '#e1e1e1' , 166 , 188 , '' ] ,
\ }
let s:IA = [ '#a1a1a1' , '#dddddd' , 145 , 188 , '' ]
let g:airline#themes#silver#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA)
let g:airline#themes#silver#palette.inactive_modified = {
\ 'airline_c': [ '#e25000' , '' , 166 , '' , '' ] ,
\ }
let g:airline#themes#silver#palette.tabline = {
\ 'airline_tab': ['#414141' , '#e1e1e1' , 59 , 188 , '' ],
\ 'airline_tabsel': ['#e1e1e1' , '#007599' , 188 , 30 , '' ],
\ 'airline_tabtype': ['#414141' , '#e1e1e1' , 59 , 188 , '' ],
\ 'airline_tabfill': ['#414141' , '#e1e1e1' , 59 , 188 , '' ],
\ 'airline_tabmod': ['#e1e1e1' , '#007599' , 188 , 30 , '' ],
\ }
let s:WI = [ '#ff0000', '#e1e1e1', 196, 188 ]
let g:airline#themes#silver#palette.normal.airline_warning = [
\ s:WI[0], s:WI[1], s:WI[2], s:WI[3]
\ ]
let g:airline#themes#silver#palette.normal_modified.airline_warning =
\ g:airline#themes#silver#palette.normal.airline_warning
let g:airline#themes#silver#palette.insert.airline_warning =
\ g:airline#themes#silver#palette.normal.airline_warning
let g:airline#themes#silver#palette.insert_modified.airline_warning =
\ g:airline#themes#silver#palette.normal.airline_warning
let g:airline#themes#silver#palette.visual.airline_warning =
\ g:airline#themes#silver#palette.normal.airline_warning
let g:airline#themes#silver#palette.visual_modified.airline_warning =
\ g:airline#themes#silver#palette.normal.airline_warning
let g:airline#themes#silver#palette.replace.airline_warning =
\ g:airline#themes#silver#palette.normal.airline_warning
let g:airline#themes#silver#palette.replace_modified.airline_warning =
\ g:airline#themes#silver#palette.normal.airline_warning
if !get(g:, 'loaded_ctrlp', 0)
finish
endif
let g:airline#themes#silver#palette.ctrlp = airline#extensions#ctrlp#generate_color_map(
\ [ '#414141' , '#e1e1e1' , 59 , 188 , '' ] ,
\ [ '#414141' , '#e1e1e1' , 59 , 188 , '' ] ,
\ [ '#e1e1e1' , '#007599' , 188 , 30 , '' ] )

View file

@ -1,7 +1,7 @@
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2010 to 2012 Mick Koch <kchmck@gmail.com>
Copyright (C) 2010 to 2014 Mick Koch <mick@kochm.co>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long

View file

@ -1,3 +1,7 @@
### Version 003 (October 10, 2014)
Almost 3 years' worth of fixes and (hopefully) improvements.
### Version 002 (December 5, 2011)
Added binary numbers (0b0101) and fixed some bugs (#9, #62, #63, #65).

View file

@ -91,7 +91,7 @@ Updating takes two steps:
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'kchmck/vim-coffee-script'
Plugin 'kchmck/vim-coffee-script'
syntax enable
filetype plugin indent on
@ -100,9 +100,9 @@ Updating takes two steps:
If you're adding Vundle to a built-up vimrc, just make sure all these calls
are in there and that they occur in this order.
3. Open vim and run `:BundleInstall`.
3. Open vim and run `:PluginInstall`.
To update, open vim and run `:BundleInstall!` (notice the bang!)
To update, open vim and run `:PluginInstall!` (notice the bang!)
## Install from a Zip File
@ -313,7 +313,7 @@ the given `RANGE` and any extra `COFFEE-OPTIONS` are passed to `coffee`.
## CoffeeLint: Lint your CoffeeScript
CoffeeLint runs [coffeelint](http://www.coffeelint.org/) (version 0.5.7 or later
CoffeeLint runs [coffeelint](http://www.coffeelint.org/) (version 1.4.0 or later
required) on the current file and adds any issues to the [quickfix] list.
![CoffeeLint](http://i.imgur.com/UN8Nr5N.png)

View file

@ -1,5 +1,5 @@
" Language: CoffeeScript
" Maintainer: Mick Koch <kchmck@gmail.com>
" Maintainer: Mick Koch <mick@kochm.co>
" URL: http://github.com/kchmck/vim-coffee-script
" License: WTFPL

View file

@ -1,5 +1,5 @@
" Language: CoffeeScript
" Maintainer: Mick Koch <kchmck@gmail.com>
" Maintainer: Mick Koch <mick@kochm.co>
" URL: http://github.com/kchmck/vim-coffee-script
" License: WTFPL

View file

@ -1,5 +1,5 @@
" Language: CoffeeScript
" Maintainer: Mick Koch <kchmck@gmail.com>
" Maintainer: Mick Koch <mick@kochm.co>
" URL: http://github.com/kchmck/vim-coffee-script
" License: WTFPL

View file

@ -1,5 +1,5 @@
" Language: CoffeeScript
" Maintainer: Mick Koch <kchmck@gmail.com>
" Maintainer: Mick Koch <mick@kochm.co>
" URL: http://github.com/kchmck/vim-coffee-script
" License: WTFPL

View file

@ -1,5 +1,5 @@
" Language: CoffeeScript
" Maintainer: Mick Koch <kchmck@gmail.com>
" Maintainer: Mick Koch <mick@kochm.co>
" URL: http://github.com/kchmck/vim-coffee-script
" License: WTFPL

View file

@ -1,5 +1,5 @@
" Language: CoffeeScript
" Maintainer: Mick Koch <kchmck@gmail.com>
" Maintainer: Mick Koch <mick@kochm.co>
" URL: http://github.com/kchmck/vim-coffee-script
" License: WTFPL

View file

@ -1,5 +1,5 @@
" Language: CoffeeScript
" Maintainer: Mick Koch <kchmck@gmail.com>
" Maintainer: Mick Koch <mick@kochm.co>
" URL: http://github.com/kchmck/vim-coffee-script
" License: WTFPL
@ -13,6 +13,7 @@ call coffee#CoffeeSetUpVariables()
setlocal formatoptions-=t formatoptions+=croql
setlocal comments=:# commentstring=#\ %s
setlocal omnifunc=javascriptcomplete#CompleteJS
setlocal suffixesadd+=coffee
" Create custom augroups.
augroup CoffeeBufUpdate | augroup END
@ -330,7 +331,7 @@ function! s:CoffeeLint(startline, endline, bang, args)
endif
let output = system(g:coffee_linter .
\ ' -s --csv' .
\ ' -s --reporter csv' .
\ ' ' . b:coffee_litcoffee .
\ ' ' . g:coffee_lint_options .
\ ' ' . a:args .
@ -394,11 +395,11 @@ if !exists('b:coffee_run_buf')
call s:CoffeeRunResetVars()
endif
command! -range=% -bar -nargs=* -complete=customlist,s:CoffeeComplete
command! -buffer -range=% -bar -nargs=* -complete=customlist,s:CoffeeComplete
\ CoffeeCompile call s:CoffeeCompile(<line1>, <line2>, <q-args>)
command! -bar -nargs=* -complete=customlist,s:CoffeeComplete
command! -buffer -bar -nargs=* -complete=customlist,s:CoffeeComplete
\ CoffeeWatch call s:CoffeeWatch(<q-args>)
command! -range=% -bar -nargs=* CoffeeRun
command! -buffer -range=% -bar -nargs=* CoffeeRun
\ call s:CoffeeRun(<line1>, <line2>, <q-args>)
command! -range=% -bang -bar -nargs=* CoffeeLint
command! -buffer -range=% -bang -bar -nargs=* CoffeeLint
\ call s:CoffeeLint(<line1>, <line2>, <q-bang>, <q-args>)

View file

@ -1,5 +1,5 @@
" Language: CoffeeScript
" Maintainer: Mick Koch <kchmck@gmail.com>
" Maintainer: Mick Koch <mick@kochm.co>
" URL: http://github.com/kchmck/vim-coffee-script
" License: WTFPL
@ -426,8 +426,3 @@ function! GetCoffeeIndent(curlnum)
" No special rules applied, so use the default policy.
exec 'return' s:GetDefaultPolicy(a:curlnum)
endfunction
" tab space
setlocal expandtab
setlocal tabstop=2 shiftwidth=2 softtabstop=2
setlocal autoindent

View file

@ -1,5 +1,5 @@
" Language: CoffeeScript
" Maintainer: Mick Koch <kchmck@gmail.com>
" Maintainer: Mick Koch <mick@kochm.co>
" URL: http://github.com/kchmck/vim-coffee-script
" License: WTFPL

View file

@ -7,8 +7,10 @@ if !g:less_html_style_tags
endif
" Unset (but preserve) so that less will run.
let s:pre_less_cur_syn = b:current_syntax
unlet b:current_syntax
if exists("b:current_syntax")
let s:pre_less_cur_syn = b:current_syntax
unlet b:current_syntax
endif
" Inspired by code from github.com/kchmck/vim-coffee-script
" and the html syntax file included with vim 7.4.
@ -19,4 +21,6 @@ syn include @htmlLess syntax/less.vim
syn region lessStyle start=+<style [^>]*type *=[^>]*text/less[^>]*>+ keepend end=+</style>+ contains=@htmlLess,htmlTag,htmlEndTag,htmlCssStyleComment,@htmlPreproc containedin=htmlHead
" Reset since 'less' isn't really the current_syntax.
let b:current_syntax = s:pre_less_cur_syn
if exists("s:pre_less_cur_syn")
let b:current_syntax = s:pre_less_cur_syn
endif

View file

@ -1,3 +0,0 @@
set noexpandtab
set tabstop=2
set shiftwidth=2

View file

@ -26,6 +26,7 @@ additional contributions from:
* [jherdman](https://github.com/jherdman)
* [kozo2](https://github.com/kozo2)
* [lilydjwg](https://github.com/lilydjwg)
* [lpil](https://github.com/lpil)
* [marutanm](https://github.com/marutanm)
* [MicahElliott](https://github.com/MicahElliott)
* [muffinresearch](https://github.com/muffinresearch)

View file

@ -81,6 +81,10 @@ if (!exists('g:snipMate_no_default_aliases') || !g:snipMate_no_default_aliases)
\ get(g:snipMate.scope_aliases, 'mxml', 'actionscript')
let g:snipMate.scope_aliases.eruby =
\ get(g:snipMate.scope_aliases, 'eruby', 'eruby-rails,html')
let g:snipMate.scope_aliases.scss =
\ get(g:snipMate.scope_aliases, 'scss', 'css')
let g:snipMate.scope_aliases.less =
\ get(g:snipMate.scope_aliases, 'less', 'css')
endif
let g:snipMate['get_snippets'] = get(g:snipMate, 'get_snippets', funcref#Function("snipMate#GetSnippets"))

View file

@ -19,7 +19,49 @@ config(function($1) {
endsnippet
snippet acont "angular controller" i
controller('${1:name}', function($2) {
controller('${1:name}', ['${2:param_annotation}', function(${3:param}) {
$0
});
}]);
endsnippet
snippet aconts "angular controller with scope" i
controller('${1:name}', ['$scope', function($scope) {
$0
}]);
endsnippet
snippet adir "angular directive" i
directive('${1:name}', ['${2:param_annotation}', function(${3:param}) {
$0
}]);
endsnippet
snippet adirs "angular directive with scope" i
directive('${1:name}', ['$scope', function($scope) {
$0
}]);
endsnippet
snippet afact "angular factory" i
factory('${1:name}', ['${2:param_annotation}', function(${3:param}) {
$0
}]);
endsnippet
snippet afacts "angular factory with scope" i
factory('${1:name}', ['$scope', function($scope) {
$0
}]);
endsnippet
snippet aserv "angular service" i
service('${1:name}', ['${2:param_annotation}', function(${3:param}) {
$0
}]);
endsnippet
snippet aservs "angular service" i
service('${1:name}', ['$scope', function($scope) {
$0
}]);
endsnippet

View file

@ -9,7 +9,7 @@ snippet /* "A JSDoc comment" b
endsnippet
snippet @au "@author email (First Last)"
@author ${1:`!v g:snips_author_email`} (${2:`!v g:snips_author`})
@author ${1:`!v g:snips_author`} [${2:`!v g:snips_author_email`}]
endsnippet
snippet @li "@license Description"

View file

@ -145,49 +145,79 @@ $0
endsnippet
snippet pub "Public function" b
/**
* ${3:undocumented function}
*
* @return ${4:void}
*/
public function ${1:name}(${2:$param})
{
${VISUAL}${3:return null;}
${VISUAL}${5:return null;}
}
$0
endsnippet
snippet pro "Protected function" b
/**
* ${3:undocumented function}
*
* @return ${4:void}
*/
protected function ${1:name}(${2:$param})
{
${VISUAL}${3:return null;}
${VISUAL}${5:return null;}
}
$0
endsnippet
snippet pri "Private function" b
/**
* ${3:undocumented function}
*
* @return ${4:void}
*/
private function ${1:name}(${2:$param})
{
${VISUAL}${3:return null;}
${VISUAL}${5:return null;}
}
$0
endsnippet
snippet pubs "Public static function" b
/**
* ${3:undocumented function}
*
* @return ${4:void}
*/
public static function ${1:name}(${2:$param})
{
${VISUAL}${3:return null;}
${VISUAL}${5:return null;}
}
$0
endsnippet
snippet pros "Protected static function" b
/**
* ${3:undocumented function}
*
* @return ${4:void}
*/
protected static function ${1:name}(${2:$param})
{
${VISUAL}${3:return null;}
${VISUAL}${5:return null;}
}
$0
endsnippet
snippet pris "Private static function" b
/**
* ${3:undocumented function}
*
* @return ${4:void}
*/
private static function ${1:name}(${2:$param})
{
${VISUAL}${3:return null;}
${VISUAL}${5:return null;}
}
$0
endsnippet
@ -223,10 +253,25 @@ endsnippet
snippet class "Class declaration template" b
/**
* Class ${1:`!p snip.rv=snip.fn.split('.')[0]`}
* Class ${2:`!p snip.rv=snip.fn.split('.')[0]`}
* @author ${3:`!v g:snips_author`}
*/
$1class $2
{
public function ${4:__construct}(${5:$options})
{
${6:// code}
}
}
$0
endsnippet
snippet interface "interface declaration template" b
/**
* Interface ${1:`!p snip.rv=snip.fn.split('.')[0]`}
* @author ${2:`!v g:snips_author`}
*/
class $1
interface $1
{
public function ${3:__construct}(${4:$options})
{
@ -267,4 +312,10 @@ public function $1Action($2)
}
endsnippet
snippet inheritdoc "@inheritdoc docblock"
/**
* {@inheritdoc}
*/
endsnippet
# :vim:ft=snippets:

View file

@ -157,6 +157,26 @@ def write_slots_args(args, snip):
args = ['"_%s"' % arg for arg in args]
snip += '__slots__ = (%s,)' % ', '.join(args)
def write_function_docstring(t, snip):
"""
Writes a function docstring with the current style.
:param t: The values of the placeholders
:param snip: UltiSnips.TextObjects.SnippetUtil object instance
"""
snip.rv = ""
snip >> 1
args = get_args(t[2])
if args:
write_docstring_args(args, snip)
style = get_style(snip)
snip += format_return(style)
snip.rv += '\n' + snip.mkline('', indent='')
snip += triple_quotes(snip)
endglobal
########################################
@ -400,17 +420,27 @@ def ${1:function}(`!p
if snip.indent:
snip.rv = 'self' + (", " if len(t[2]) else "")`${2:arg1}):
`!p snip.rv = triple_quotes(snip)`${4:TODO: Docstring for $1.}`!p
snip.rv = ""
snip >> 1
write_function_docstring(t, snip) `
${0:pass}
endsnippet
args = get_args(t[2])
if args:
write_docstring_args(args, snip)
style = get_style(snip)
snip += format_return(style)
snip.rv += '\n' + snip.mkline('', indent='')
snip += triple_quotes(snip) `
snippet defc "class method with docstrings" b
@classmethod
def ${1:function}(`!p
if snip.indent:
snip.rv = 'cls' + (", " if len(t[2]) else "")`${2:arg1}):
`!p snip.rv = triple_quotes(snip)`${4:TODO: Docstring for $1.}`!p
write_function_docstring(t, snip) `
${0:pass}
endsnippet
snippet defs "static method with docstrings" b
@staticmethod
def ${1:function}(${2:arg1}):
`!p snip.rv = triple_quotes(snip)`${4:TODO: Docstring for $1.}`!p
write_function_docstring(t, snip) `
${0:pass}
endsnippet

View file

@ -7,21 +7,21 @@ snippet imp "@import '...';" b
endsnippet
snippet inc "@include mixin(...);" b
@include ${1:mixin}(${2:arguments});
@include ${1:mixin}(${2});
endsnippet
snippet ext "@extend %placeholder;" b
@extend %${1:placeholder};
@extend %${1:%placeholder};
endsnippet
snippet mixin "@mixin (...) { ... }" b
@mixin ${1:name}(${2:arguments}) {
@mixin ${1:name}(${2}) {
${VISUAL}$0
}
endsnippet
snippet fun "@function (...) { ... }" b
@function ${1:name}(${2:arguments}) {
@function ${1:name}(${2}) {
${VISUAL}$0
}
endsnippet

View file

@ -15,7 +15,7 @@ $0${2/((?<=.)c|l|r)|./(?1: & )/g}
endsnippet
snippet fig "Figure environment" b
\begin{figure}${2:[htpb]}
\begin{figure}[${2:htpb}]
\centering
\includegraphics[width=${3:0.8}\linewidth]{${4:name.ext}}
\caption{${4/(\w+)\.\w+/\u$1/}$0}

View file

@ -127,3 +127,5 @@ snippet ife
<% else %>
${0}
<% end %>
snippet pry
<% require 'pry'; binding.pry %>

View file

@ -3,7 +3,7 @@ snippet ex
module.exports = ${1};
# require
snippet re
var ${1} = require("${2:module_name}");
var ${1} = require('${2:module_name}');
# EventEmitter
snippet on
on('${1:event_name}', function(${2:stream}) {
@ -47,4 +47,3 @@ snippet stdout
process.stdout
snippet stderr
process.stderr

View file

@ -1,3 +1,5 @@
# Functions
# prototype
snippet proto
${1:class_name}.prototype.${2:method_name} = function(${3}) {
@ -23,6 +25,18 @@ snippet (f
(function(${1}) {
${0}
}(${2}));
# self-defining function
snippet sdf
var ${1:function_name} = function (${2:argument}) {
${3}
$1 = function ($2) {
${0}
};
};
# Flow control
# if
snippet if
if (${1:true}) {
@ -37,7 +51,7 @@ snippet ife
}
# tertiary conditional
snippet ter
${1:/* condition */} ? ${2:a} : ${0:b}
${1:/* condition */} ? ${2:/* if true */} : ${0:/* if false */}
# switch
snippet switch
switch (${1:expression}) {
@ -54,21 +68,6 @@ snippet case
${2}
break;
${0}
# for (...) {...}
snippet for
for (var ${2:i} = 0, l = ${1:arr}.length; $2 < l; $2 ++) {
var ${3:v} = $1[$2];${0:}
}
# for (...) {...} (Improved Native For-Loop)
snippet forr
for (var ${2:i} = ${1:arr}.length - 1; $2 >= 0; $2 --) {
var ${3:v} = $1[$2];${0:}
}
# while (...) {...}
snippet wh
while (${1:/* condition */}) {
${0}
}
# try
snippet try
try {
@ -76,67 +75,48 @@ snippet try
} catch (${2:e}) {
${0:/* handle error */}
}
# do...while
# return
snippet ret
return ${0:result};
# Loops
# for loop
snippet for
for (var ${2:i} = 0, l = ${1:arr}.length; $2 < l; $2 ++) {
var ${3:v} = $1[$2];${0:}
}
# Reversed for loop
snippet forr
for (var ${2:i} = ${1:arr}.length - 1; $2 >= 0; $2 --) {
var ${3:v} = $1[$2];${0:}
}
# While loop
snippet wh
while (${1:/* condition */}) {
${0}
}
# Do while loop
snippet do
do {
${0}
} while (${1:/* condition */});
# For in loop
snippet fori
for (var ${1:prop} in ${2:object}) {
${0:$2[$1]}
}
# Objects
# Object Method
snippet :f
${1:method_name}: function (${2:attribute}) {
${0}
}${3:,}
# setTimeout function
snippet timeout
setTimeout(function () {${0}}${2}, ${1:10});
# Get Elements
snippet get
getElementsBy${1:TagName}('${2}')
# Get Element
snippet gett
getElementBy${1:Id}('${2}')
# console.log (Firebug)
snippet cl
console.log(${0});
# console.debug (Firebug)
snippet cd
console.debug(${0});
# return
snippet ret
return ${0:result}
# for (property in object ) { ... }
snippet fori
for (var ${1:prop} in ${2:Things}) {
${0:$2[$1]}
}
# hasOwnProperty
snippet has
hasOwnProperty(${0})
# docstring
snippet /**
/**
* ${0:description}
*
*/
snippet @par
@param {${1:type}} ${2:name} ${0:description}
snippet @ret
@return {${1:type}} ${0:description}
# JSON.parse
snippet jsonp
JSON.parse(${0:jstr});
# JSON.stringify
snippet jsons
JSON.stringify(${0:object});
# self-defining function
snippet sdf
var ${1:function_name} = function (${2:argument}) {
${3}
$1 = function ($2) {
${0}
};
};
# singleton
snippet sing
function ${1:Singleton} (${2:argument}) {
@ -191,7 +171,7 @@ snippet props
snippet prop
Object.defineProperty(
${1:object},
"${2:property}",
'${2:property}',
{
get : function $1_$2_getter() {
// getter code
@ -205,3 +185,73 @@ snippet prop
configurable : ${0:boolean}
}
);
# Documentation
# docstring
snippet /**
/**
* ${0:description}
*
*/
snippet @par
@param {${1:type}} ${2:name} ${0:description}
snippet @ret
@return {${1:type}} ${0:description}
# JSON
# JSON.parse
snippet jsonp
JSON.parse(${0:jstr});
# JSON.stringify
snippet jsons
JSON.stringify(${0:object});
# DOM selectors
# Get elements
snippet get
getElementsBy${1:TagName}('${0}')
# Get element
snippet gett
getElementBy${1:Id}('${0}')
# Elements by class
snippet by.
${1:document}.getElementsByClassName('${0:class}')
# Element by ID
snippet by#
${1:document}.getElementById('${0:element ID}')
# Query selector
snippet qs
${1:document}.querySelector('${0:CSS selector}')
# Query selector all
snippet qsa
${1:document}.querySelectorAll('${0:CSS selector}')
# Debugging
# console.log
snippet cl
console.log(${0});
# console.debug
snippet cd
console.debug(${0});
# console.trace
snippet ct
console.trace(${0:label});
# console.time
snippet ctime
console.time(${0:label});
# console.assert
snippet ca
console.assert(${1:expression}, ${0:obj});
# console.dir
snippet cdir
console.dir(${0:obj});
# Misc
# setTimeout function
snippet timeout
setTimeout(function () {${0}}${2}, ${1:10});

View file

@ -6,32 +6,27 @@
# Scala lang
#if
snippet if
if(${1:obj}) {
if (${1})
${0}
}
#if not
snippet ifn
if(!${1:obj}) {
if (!${1})
${0}
}
#if-else
snippet ife
if(${1:obj}) {
if (${1})
${2}
} else {
else
${0}
}
#if-else-if
snippet ifelif
if(${1:obj}) {
if (${1})
${2}
} else if(${3:obj}) {
else if (${3})
${0}
}
snippet eif
else if(${3:obj}) {
else if (${3})
${0}
}
#while loop
snippet wh
while (${1:obj}) {

View file

@ -0,0 +1,36 @@
snippet $
$${1:variable}: ${0:value};
snippet imp
@import '${0}';
snippet mix
@mixin ${1:name}(${2}) {
${0}
}
snippet inc
@include ${1:mixin}(${2});
snippet ex
@extend ${0};
snippet fun
@function ${1:name}(${2:args}) {
${0}
}
snippet if
@if ${1:condition} {
${0}
}
snippet else
@else ${1:condition} {
${0}
}
snippet for
@for ${1:$i} from ${2:1} through ${3:3} {
${0}
}
snippet each
@each ${1:$item} in ${2:items} {
${0}
}
snippet while
@while ${1:$i} ${2:>} ${3:0} {
${0}
}

View file

@ -7,7 +7,7 @@ zenroom for Vim: Focusing only on the essential](http://amix.dk/blog/post/19744#
Please note that this might not work perfectly with your colorscheme. Patches are welcome to fix this :-)
## Installaion and usage
## Installation and usage
* Install [goyo.vim](https://github.com/junegunn/goyo.vim)
* In command mode type :Goyo
@ -23,7 +23,7 @@ Additionally you may want to have a shortcut. Add this to your vimrc:
* [vim-zenroom](https://github.com/amix/vim-zenroom)
## How it looks like in action
## How it looks in action
![Screenshot 3](http://amix.dk/uploads/zenroom_documentation.jpg)

View file

@ -62,7 +62,7 @@ function! s:markdown_room()
exec( "hi StatusLineNC " . l:highlightfgbgcolor )
endfunction
function! g:Zenroom_goyo_before()
function! s:zenroom_goyo_before()
if !has("gui_running")
return
endif
@ -73,7 +73,7 @@ function! g:Zenroom_goyo_before()
endif
endfunction
function! g:Zenroom_goyo_after()
function! s:zenroom_goyo_after()
if !has("gui_running")
return
endif
@ -87,4 +87,4 @@ function! g:Zenroom_goyo_after()
endif
endfunction
let g:goyo_callbacks = [ function('g:Zenroom_goyo_before'), function('g:Zenroom_goyo_after') ]
let g:goyo_callbacks = [ function('s:zenroom_goyo_before'), function('s:zenroom_goyo_after') ]

View file

@ -181,9 +181,9 @@ set expandtab
" Be smart when using tabs ;)
set smarttab
" 1 tab == 2 spaces
set shiftwidth=2
set tabstop=2
" 1 tab == 4 spaces
set shiftwidth=4
set tabstop=4
" Linebreak on 500 characters
set lbr