1
0
mirror of https://github.com/gryf/.vim.git synced 2025-12-18 03:50:30 +01:00

Update of plugins (vimwiki, ctrlp, syntastic, tagbar, gundo and mark),

added draft syntax file for kickassembler
This commit is contained in:
2012-06-18 20:51:13 +02:00
parent f378edfbcb
commit ddaac1c4e6
75 changed files with 9032 additions and 5102 deletions

View File

@@ -128,7 +128,7 @@ function! syntastic#c#SearchHeaders()
" search included headers
for hfile in files
if hfile != ''
let filename = expand('%:p:h') . ((has('win32') || has('win64')) ?
let filename = expand('%:p:h') . (has('win32') ?
\ '\' : '/') . hfile
try
let lines = readfile(filename, '', 100)

View File

@@ -17,7 +17,7 @@ if exists("g:loaded_syntastic_plugin")
endif
let g:loaded_syntastic_plugin = 1
let s:running_windows = has("win16") || has("win32") || has("win64")
let s:running_windows = has("win16") || has("win32")
if !s:running_windows
let s:uname = system('uname')
@@ -185,6 +185,8 @@ function! s:CacheErrors()
for ft in split(fts, '\.')
if s:Checkable(ft)
let errors = SyntaxCheckers_{ft}_GetLocList()
"keep only lines that effectively match an error/warning
let errors = s:FilterLocList({'valid': 1}, errors)
"make errors have type "E" by default
call SyntasticAddToErrors(errors, {'type': 'E'})
call extend(s:LocList(), errors)
@@ -529,10 +531,10 @@ endfunction
" 'subtype' - all errors will be assigned the given subtype
function! SyntasticMake(options)
let old_loclist = getloclist(0)
let old_makeprg = &makeprg
let old_makeprg = &l:makeprg
let old_shellpipe = &shellpipe
let old_shell = &shell
let old_errorformat = &errorformat
let old_errorformat = &l:errorformat
if !s:running_windows && (s:uname !~ "FreeBSD")
"this is a hack to stop the screen needing to be ':redraw'n when
@@ -542,19 +544,19 @@ function! SyntasticMake(options)
endif
if has_key(a:options, 'makeprg')
let &makeprg = a:options['makeprg']
let &l:makeprg = a:options['makeprg']
endif
if has_key(a:options, 'errorformat')
let &errorformat = a:options['errorformat']
let &l:errorformat = a:options['errorformat']
endif
silent lmake!
let errors = getloclist(0)
call setloclist(0, old_loclist)
let &makeprg = old_makeprg
let &errorformat = old_errorformat
let &l:makeprg = old_makeprg
let &l:errorformat = old_errorformat
let &shellpipe=old_shellpipe
let &shell=old_shell

View File

@@ -125,7 +125,7 @@ function! SyntaxCheckers_c_GetLocList()
endif
" add optional config file parameters
let makeprg .= syntastic#c#ReadConfig(g:syntastic_c_config_file)
let makeprg .= ' '.syntastic#c#ReadConfig(g:syntastic_c_config_file)
" process makeprg
let errors = SyntasticMake({ 'makeprg': makeprg,

View File

@@ -113,7 +113,7 @@ function! SyntaxCheckers_cpp_GetLocList()
endif
" add optional config file parameters
let makeprg .= syntastic#c#ReadConfig(g:syntastic_cpp_config_file)
let makeprg .= ' ' . syntastic#c#ReadConfig(g:syntastic_cpp_config_file)
" process makeprg
let errors = SyntasticMake({ 'makeprg': makeprg,

View File

@@ -0,0 +1,140 @@
"============================================================================
"File: d.vim
"Description: Syntax checking plugin for syntastic.vim
"Maintainer: Alfredo Di Napoli <alfredo dot dinapoli at gmail dot com>
"License: Based on the original work of Gregor Uhlenheuer and his
" cpp.vim checker so credits are dued.
" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
" OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
" NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
" HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
" WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
" OTHER DEALINGS IN THE SOFTWARE.
"
"============================================================================
" in order to also check header files add this to your .vimrc:
" (this usually creates a .gch file in your source directory)
"
" let g:syntastic_d_check_header = 1
"
" To disable the search of included header files after special
" libraries like gtk and glib add this line to your .vimrc:
"
" let g:syntastic_d_no_include_search = 1
"
" In order to add some custom include directories that should be added to the
" gcc command line you can add those to the global variable
" g:syntastic_d_include_dirs. This list can be used like this:
"
" let g:syntastic_d_include_dirs = [ 'includes', 'headers' ]
"
" To enable header files being re-checked on every file write add the
" following line to your .vimrc. Otherwise the header files are checked only
" one time on initially loading the file.
" In order to force syntastic to refresh the header includes simply
" unlet b:syntastic_d_includes. Then the header files are being re-checked
" on the next file write.
"
" let g:syntastic_d_auto_refresh_includes = 1
"
" Alternatively you can set the buffer local variable b:syntastic_d_cflags.
" If this variable is set for the current buffer no search for additional
" libraries is done. I.e. set the variable like this:
"
" let b:syntastic_d_cflags = ' -I/usr/include/libsoup-2.4'
"
" Moreover it is possible to add additional compiler options to the syntax
" checking execution via the variable 'g:syntastic_d_compiler_options':
"
" let g:syntastic_d_compiler_options = ' -std=c++0x'
"
" Additionally the setting 'g:syntastic_d_config_file' allows you to define
" a file that contains additional compiler arguments like include directories
" or CFLAGS. The file is expected to contain one option per line. If none is
" given the filename defaults to '.syntastic_d_config':
"
" let g:syntastic_d_config_file = '.config'
"
" Using the global variable 'g:syntastic_d_remove_include_errors' you can
" specify whether errors of files included via the
" g:syntastic_d_include_dirs' setting are removed from the result set:
"
" let g:syntastic_d_remove_include_errors = 1
if exists('loaded_d_syntax_checker')
finish
endif
let loaded_d_syntax_checker = 1
if !executable('dmd')
finish
endif
let s:save_cpo = &cpo
set cpo&vim
if !exists('g:syntastic_d_config_file')
let g:syntastic_d_config_file = '.syntastic_d_config'
endif
function! SyntaxCheckers_d_GetLocList()
let makeprg = 'dmd -of/dev/null -c '
let errorformat = '%-G%f:%s:,%f(%l): %m,%f:%l: %m'
if exists('g:syntastic_d_compiler_options')
let makeprg .= g:syntastic_d_compiler_options
endif
let makeprg .= ' ' . shellescape(expand('%')) .
\ ' ' . syntastic#c#GetIncludeDirs('d')
if expand('%') =~? '\%(.di\)$'
if exists('g:syntastic_d_check_header')
let makeprg = 'dmd -c '.shellescape(expand('%')).
\ ' ' . syntastic#c#GetIncludeDirs('d')
else
return []
endif
endif
if !exists('b:syntastic_d_cflags')
if !exists('g:syntastic_d_no_include_search') ||
\ g:syntastic_d_no_include_search != 1
if exists('g:syntastic_d_auto_refresh_includes') &&
\ g:syntastic_d_auto_refresh_includes != 0
let makeprg .= syntastic#c#SearchHeaders()
else
if !exists('b:syntastic_d_includes')
let b:syntastic_d_includes = syntastic#c#SearchHeaders()
endif
let makeprg .= b:syntastic_d_includes
endif
endif
else
let makeprg .= b:syntastic_d_cflags
endif
" add optional config file parameters
let makeprg .= ' ' . syntastic#c#ReadConfig(g:syntastic_d_config_file)
" process makeprg
let errors = SyntasticMake({ 'makeprg': makeprg,
\ 'errorformat': errorformat })
" filter the processed errors if desired
if exists('g:syntastic_d_remove_include_errors') &&
\ g:syntastic_d_remove_include_errors != 0
return filter(errors,
\ 'has_key(v:val, "bufnr") && v:val["bufnr"]=='.bufnr(''))
else
return errors
endif
endfunction
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set et sts=4 sw=4:

View File

@@ -4,6 +4,7 @@
# with the quickfix mode of Vim
#
# Copyright (<28>) 2001 by J<>rg Ziefle <joerg.ziefle@gmx.de>
# Copyright (c) 2012 Eric Harmon <http://eharmon.net>
# You may use and distribute this software under the same terms as Perl itself.
#
# Usage: put one of the two configurations below in your ~/.vimrc (without the
@@ -13,25 +14,27 @@
# Program is run interactively with 'perl -w':
#
# set makeprg=$HOME/bin/vimparse.pl\ %\ $*
# set errorformat=%f:%l:%m
# set errorformat=%t:%f:%l:%m
#
# Program is only compiled with 'perl -wc':
#
# set makeprg=$HOME/bin/vimparse.pl\ -c\ %\ $*
# set errorformat=%f:%l:%m
# set errorformat=%t:%f:%l:%m
#
# Usage:
# vimparse.pl [-c] [-f <errorfile>] <programfile> [programargs]
# vimparse.pl [-c] [-w] [-f <errorfile>] <programfile> [programargs]
#
# -c compile only, don't run (perl -wc)
# -w output warnings as warnings instead of errors (slightly slower)
# -f write errors to <errorfile>
#
# Example usages:
# * From the command line:
# vimparse.pl program.pl
#
# vimparse.pl -c -f errorfile program.pl
# vimparse.pl -c -w -f errorfile program.pl
# Then run vim -q errorfile to edit the errors with Vim.
# This uses the custom errorformat: %t:%f:%l:%m.
#
# * From Vim:
# Edit in Vim (and save, if you don't have autowrite on), then
@@ -39,6 +42,9 @@
# to error check.
#
# Version history:
# 0.3 (05/31/2012):
# * Added support for the seperate display of warnings
# * Switched output format to %t:%f:%l:%m to support error levels
# 0.2 (04/12/2001):
# * First public version (sent to Bram)
# * -c command line option for compiling only
@@ -64,11 +70,11 @@
use strict;
use Getopt::Std;
use vars qw/$opt_c $opt_f $opt_h/; # needed for Getopt in combination with use strict 'vars'
use vars qw/$opt_c $opt_w $opt_f $opt_h/; # needed for Getopt in combination with use strict 'vars'
use constant VERSION => 0.2;
getopts('cf:h');
getopts('cwf:h');
&usage if $opt_h; # not necessarily needed, but good for further extension
@@ -86,20 +92,33 @@ my $handle = (defined $opt_f ? \*FILE : \*STDOUT);
(my $file = shift) or &usage; # display usage if no filename is supplied
my $args = (@ARGV ? ' ' . join ' ', @ARGV : '');
my @lines = `perl @{[defined $opt_c ? '-c ' : '' ]} -w "$file$args" 2>&1`;
my @error_lines = `perl @{[defined $opt_c ? '-c ' : '' ]} @{[defined $opt_w ? '-X ' : '-w ']} "$file$args" 2>&1`;
my @lines = map { "E:$_" } @error_lines;
my @warn_lines;
if(defined($opt_w)) {
@warn_lines = `perl @{[defined $opt_c ? '-c ' : '' ]} -w "$file$args" 2>&1`;
}
# Any new errors must be warnings
foreach my $line (@warn_lines) {
if(!grep { $_ eq $line } @error_lines) {
push(@lines, "W:$line");
}
}
my $errors = 0;
foreach my $line (@lines) {
chomp($line);
my ($file, $lineno, $message, $rest);
my ($file, $lineno, $message, $rest, $severity);
if ($line =~ /^(.*)\sat\s(.*)\sline\s(\d+)(\.|,\snear\s\".*\")$/) {
($message, $file, $lineno, $rest) = ($1, $2, $3, $4);
if ($line =~ /^(.*)\sat\s(.*)\sline\s(\d+)(.*)$/) {
($severity, $message, $file, $lineno, $rest) = ($1, $2, $3, $4, $5);
$errors++;
$message .= $rest if ($rest =~ s/^,//);
print $handle "$file:$lineno:$message\n";
print $handle "$severity:$file:$lineno:$message\n";
} else { next };
@@ -129,9 +148,10 @@ sub usage {
(local $0 = $0) =~ s/^.*\/([^\/]+)$/$1/; # remove path from name of program
print<<EOT;
Usage:
$0 [-c] [-f <errorfile>] <programfile> [programargs]
$0 [-c] [-w] [-f <errorfile>] <programfile> [programargs]
-c compile only, don't run (executes 'perl -wc')
-c compile only, don't run (executes 'perl -c')
-w output warnings as warnings instead of errors (slightly slower)
-f write errors to <errorfile>
Examples:
@@ -139,8 +159,9 @@ Examples:
$0 program.pl
Displays output on STDOUT.
$0 -c -f errorfile program.pl
$0 -c -w -f errorfile program.pl
Then run 'vim -q errorfile' to edit the errors with Vim.
This uses the custom errorformat: %t:%f:%l:%m.
* In Vim:
Edit in Vim (and save, if you don't have autowrite on), then

View File

@@ -20,7 +20,7 @@ if !executable("ruby") || !executable("cat")
endif
function! SyntaxCheckers_eruby_GetLocList()
if has('win32') || has('win64')
if has('win32')
let makeprg='sed "s/<\%=/<\%/g" '. shellescape(expand("%")) . ' \| ruby -e "require \"erb\"; puts ERB.new(ARGF.read, nil, \"-\").src" \| ruby -c'
else
let makeprg='sed "s/<\%=/<\%/g" '. shellescape(expand("%")) . ' \| RUBYOPT= ruby -e "require \"erb\"; puts ERB.new(ARGF.read, nil, \"-\").src" \| RUBYOPT= ruby -c'

View File

@@ -18,5 +18,5 @@ if exists("loaded_go_syntax_checker")
endif
let loaded_go_syntax_checker = 1
let s:supported_checkers = ["6g", "gofmt"]
let s:supported_checkers = ["go", "6g", "gofmt"]
call SyntasticLoadChecker(s:supported_checkers, 'go')

View File

@@ -0,0 +1,17 @@
"============================================================================
"File: go.vim
"Description: Check go syntax using 'go build'
"Maintainer: Kamil Kisiel <kamil@kamilkisiel.net>
"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.
"
"============================================================================
function! SyntaxCheckers_go_GetLocList()
let makeprg = 'go build -o /dev/null'
let errorformat = '%f:%l:%c:%m,%f:%l%m,%-G#%.%#'
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
endfunction

View File

@@ -14,73 +14,16 @@ if exists("loaded_html_syntax_checker")
endif
let loaded_html_syntax_checker = 1
"bail if the user doesnt have tidy or grep installed
if !executable("tidy") || !executable("grep")
finish
if !exists('g:syntastic_html_checker')
let g:syntastic_html_checker = "tidy"
endif
" TODO: join this with xhtml.vim for DRY's sake?
function! s:TidyEncOptByFenc()
let tidy_opts = {
\'utf-8' : '-utf8',
\'ascii' : '-ascii',
\'latin1' : '-latin1',
\'iso-2022-jp' : '-iso-2022',
\'cp1252' : '-win1252',
\'macroman' : '-mac',
\'utf-16le' : '-utf16le',
\'utf-16' : '-utf16',
\'big5' : '-big5',
\'sjis' : '-shiftjis',
\'cp850' : '-ibm858',
\}
return get(tidy_opts, &fileencoding, '-utf8')
endfunction
let s:ignore_html_errors = [
\ "<table> lacks \"summary\" attribute",
\ "not approved by W3C",
\ "attribute \"placeholder\"",
\ "<meta> proprietary attribute \"charset\"",
\ "<meta> lacks \"content\" attribute",
\ "inserting \"type\" attribute",
\ "proprietary attribute \"data-"
\]
function! s:ValidateError(text)
let valid = 0
for i in s:ignore_html_errors
if stridx(a:text, i) != -1
let valid = 1
break
endif
endfor
return valid
endfunction
function! SyntaxCheckers_html_GetLocList()
let encopt = s:TidyEncOptByFenc()
let makeprg="tidy ".encopt." --new-blocklevel-tags ".shellescape('section, article, aside, hgroup, header, footer, nav, figure, figcaption')." --new-inline-tags ".shellescape('video, audio, embed, mark, progress, meter, time, ruby, rt, rp, canvas, command, details, datalist')." --new-empty-tags ".shellescape('wbr, keygen')." -e ".shellescape(expand('%'))." 2>&1"
let errorformat='%Wline %l column %c - Warning: %m,%Eline %l column %c - Error: %m,%-G%.%#,%-G%.%#'
let loclist = SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
" process loclist since we need to add some info and filter out valid HTML5
" from the errors
let n = len(loclist) - 1
let bufnum = bufnr("")
while n >= 0
let i = loclist[n]
" filter out valid HTML5
if s:ValidateError(i['text']) == 1
unlet loclist[n]
else
"the file name isnt in the output so stick in the buf num manually
let i['bufnr'] = bufnum
endif
let n -= 1
endwhile
return loclist
endfunction
if g:syntastic_html_checker == "tidy"
if executable("tidy") && executable("grep")
runtime! syntax_checkers/html/tidy.vim
endif
elseif g:syntastic_html_checker == "w3"
if executable("curl") && executable("sed")
runtime! syntax_checkers/html/w3.vim
endif
endif

View File

@@ -0,0 +1,74 @@
"============================================================================
"File: tidy.vim
"Description: Syntax checking plugin for syntastic.vim
"Maintainer: Martin Grenfell <martin.grenfell 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.
"
"============================================================================
" TODO: join this with xhtml.vim for DRY's sake?
function! s:TidyEncOptByFenc()
let tidy_opts = {
\'utf-8' : '-utf8',
\'ascii' : '-ascii',
\'latin1' : '-latin1',
\'iso-2022-jp' : '-iso-2022',
\'cp1252' : '-win1252',
\'macroman' : '-mac',
\'utf-16le' : '-utf16le',
\'utf-16' : '-utf16',
\'big5' : '-big5',
\'sjis' : '-shiftjis',
\'cp850' : '-ibm858',
\}
return get(tidy_opts, &fileencoding, '-utf8')
endfunction
let s:ignore_html_errors = [
\ "<table> lacks \"summary\" attribute",
\ "not approved by W3C",
\ "attribute \"placeholder\"",
\ "<meta> proprietary attribute \"charset\"",
\ "<meta> lacks \"content\" attribute",
\ "inserting \"type\" attribute",
\ "proprietary attribute \"data-"
\]
function! s:ValidateError(text)
let valid = 0
for i in s:ignore_html_errors
if stridx(a:text, i) != -1
let valid = 1
break
endif
endfor
return valid
endfunction
function! SyntaxCheckers_html_GetLocList()
let encopt = s:TidyEncOptByFenc()
let makeprg="tidy ".encopt." --new-blocklevel-tags ".shellescape('section, article, aside, hgroup, header, footer, nav, figure, figcaption')." --new-inline-tags ".shellescape('video, audio, embed, mark, progress, meter, time, ruby, rt, rp, canvas, command, details, datalist')." --new-empty-tags ".shellescape('wbr, keygen')." -e ".shellescape(expand('%'))." 2>&1"
let errorformat='%Wline %l column %c - Warning: %m,%Eline %l column %c - Error: %m,%-G%.%#,%-G%.%#'
let loclist = SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
" process loclist since we need to add some info and filter out valid HTML5
" from the errors
let n = len(loclist) - 1
let bufnum = bufnr("")
while n >= 0
let i = loclist[n]
" filter out valid HTML5
if s:ValidateError(i['text']) == 1
unlet loclist[n]
else
"the file name isnt in the output so stick in the buf num manually
let i['bufnr'] = bufnum
endif
let n -= 1
endwhile
return loclist
endfunction

View File

@@ -0,0 +1,32 @@
"============================================================================
"File: w3.vim
"Description: Syntax checking plugin for syntastic.vim
"Maintainer: Martin Grenfell <martin.grenfell 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.
"
"============================================================================
function! SyntaxCheckers_html_GetLocList()
let makeprg2="curl -s -F output=text -F \"uploaded_file=@".expand('%:p').";type=text/html\" http://validator.w3.org/check \\| sed -n -e '/\<em\>Line\.\*/ \{ N; s/\\n//; N; s/\\n//; /msg/p; \}' -e ''/msg_warn/p'' -e ''/msg_info/p'' \\| sed -e 's/[ ]\\+/ /g' -e 's/\<[\^\>]\*\>//g' -e 's/\^[ ]//g'"
let errorformat2='Line %l\, Column %c: %m'
let loclist = SyntasticMake({ 'makeprg': makeprg2, 'errorformat': errorformat2 })
let n = len(loclist) - 1
let bufnum = bufnr("")
while n >= 0
let i = loclist[n]
let i['bufnr'] = bufnum
if i['lnum'] == 0
let i['type'] = 'w'
else
let i['type'] = 'e'
endif
let n -= 1
endwhile
return loclist
endfunction

View File

@@ -0,0 +1,28 @@
"============================================================================
"File: java.vim
"Description: Syntax checking plugin for syntastic.vim
"Maintainer: Jochen Keil <jochen.keil 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.
"
"============================================================================
function! SyntaxCheckers_java_GetLocList()
let makeprg = 'javac -Xlint '
\. expand ( '%:p:h' ) . '/' . expand ( '%:t' )
\. ' 2>&1 \| '
\. 'sed -e "s\|'
\. expand ( '%:t' )
\. '\|'
\. expand ( '%:p:h' ) . '/' . expand ( '%:t' )
\. '\|"'
" unashamedly stolen from *errorformat-javac* (quickfix.txt)
let errorformat = '%A%f:%l:\ %m,%+Z%p^,%+C%.%#,%-G%.%#'
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
endfunction

View File

@@ -1,7 +1,8 @@
"============================================================================
"File: perl.vim
"Description: Syntax checking plugin for syntastic.vim
"Maintainer: Anthony Carapetis <anthony.carapetis at gmail dot com>
"Maintainer: Anthony Carapetis <anthony.carapetis at gmail dot com>,
" Eric Harmon <http://eharmon.net>
"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
@@ -19,11 +20,12 @@ if !executable("perl")
finish
endif
let s:checker = 'perl ' . shellescape(expand('<sfile>:p:h') . '/efm_perl.pl') . ' -c'
"remove '-w' switch to change all warnings to errors
let s:checker = 'perl ' . shellescape(expand('<sfile>:p:h') . '/efm_perl.pl') . ' -c -w'
function! SyntaxCheckers_perl_GetLocList()
let makeprg = s:checker . ' ' . shellescape(expand('%'))
let errorformat = '%f:%l:%m'
let errorformat = '%t:%f:%l:%m'
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
endfunction

View File

@@ -41,7 +41,7 @@ function! SyntaxCheckers_php_GetLocList()
let errors = []
let makeprg = "php -l -d error_reporting=E_ALL -d display_errors=0 -d error_log='' ".shellescape(expand('%'))
let errorformat='%-GNo syntax errors detected in%.%#,PHP Parse error: %#syntax %trror\, %m in %f on line %l,PHP Fatal %trror: %m in %f on line %l,%-GErrors parsing %.%#,%-G\s%#,Parse error: %#syntax %trror\, %m in %f on line %l,Fatal %trror: %m in %f on line %l'
let errorformat='%-GNo syntax errors detected in%.%#,PHP Parse error: %#syntax %trror\, %m in %f on line %l,PHP Fatal %trror: %m in %f on line %l,%-GErrors parsing %.%#,%-G\s%#,Parse error: %#syntax %trror\, %m in %f on line %l,Fatal %trror: %m in %f on line %l,PHP Parse %trror: %m in %f on line %l'
let errors = SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
if empty(errors) && !g:syntastic_phpcs_disable && executable("phpcs")

View File

@@ -24,7 +24,7 @@ if !exists("g:syntastic_puppet_lint_disable")
endif
if !executable("puppet-lint")
let g:syntastic_puppet_lint_disable = 0
let g:syntastic_puppet_lint_disable = 1
endif
function! s:PuppetExtractVersion()
@@ -44,11 +44,15 @@ let s:puppetVersion = s:PuppetExtractVersion()
let s:lintVersion = s:PuppetLintExtractVersion()
if !(s:lintVersion[0] >= '0' && s:lintVersion[1] >= '1' && s:lintVersion[2] >= '10')
let g:syntastic_puppet_lint_disable = 0
let g:syntastic_puppet_lint_disable = 1
endif
function! s:getPuppetLintErrors()
let makeprg = 'puppet-lint --log-format "\%{KIND} [\%{check}] \%{message} at \%{fullpath}:\%{linenumber}" '.shellescape(expand('%'))
if !exists("g:syntastic_puppet_lint_arguments")
let g:syntastic_puppet_lint_arguments = ''
endif
let makeprg = 'puppet-lint --log-format "\%{KIND} [\%{check}] \%{message} at \%{fullpath}:\%{linenumber}" '.g:syntastic_puppet_lint_arguments.shellescape(expand('%'))
let errorformat = '%t%*[a-zA-Z] %m at %f:%l'
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat, 'subtype': 'Style' })
endfunction

View File

@@ -6,9 +6,6 @@
"
"============================================================================
function! SyntaxCheckers_python_GetHighlightRegex(i)
if a:i['type'] ==# 'E'
let a:i['text'] = "Syntax error"
endif
if match(a:i['text'], 'is assigned to but never used') > -1
\ || match(a:i['text'], 'imported but unused') > -1
\ || match(a:i['text'], 'undefined name') > -1

View File

@@ -0,0 +1,15 @@
"============================================================================
"File: macruby.vim
"Description: Syntax checking plugin for syntastic.vim
"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.
"
"============================================================================
function! SyntaxCheckers_ruby_GetLocList()
let makeprg = 'RUBYOPT= macruby -W1 -c '.shellescape(expand('%'))
let errorformat = '%-GSyntax OK,%E%f:%l: syntax error\, %m,%Z%p^,%W%f:%l: warning: %m,%Z%p^,%W%f:%l: %m,%-C%.%#'
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
endfunction

View File

@@ -11,7 +11,7 @@
"============================================================================
function! SyntaxCheckers_ruby_GetLocList()
" we cannot set RUBYOPT on windows like that
if has('win32') || has('win64')
if has('win32')
let makeprg = 'ruby -W1 -T1 -c '.shellescape(expand('%'))
else
let makeprg = 'RUBYOPT= ruby -W1 -c '.shellescape(expand('%'))

View File

@@ -26,7 +26,7 @@ if executable("compass")
endif
function! SyntaxCheckers_sass_GetLocList()
let makeprg='sass '.s:imports.' --check '.shellescape(expand('%'))
let makeprg='sass --no-cache '.s:imports.' --check '.shellescape(expand('%'))
let errorformat = '%ESyntax %trror:%m,%C on line %l of %f,%Z%.%#'
let errorformat .= ',%Wwarning on line %l:,%Z%m,Syntax %trror on line %l: %m'
let loclist = SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })