diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 02:44:24 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 02:44:24 +0000 |
commit | 8baab3c8d7a6f22888bd581cd5c6098fd2e4b5a8 (patch) | |
tree | 3537e168b860f2742f6029d70501b5ed7d15d345 /runtime/compiler | |
parent | Initial commit. (diff) | |
download | vim-8baab3c8d7a6f22888bd581cd5c6098fd2e4b5a8.tar.xz vim-8baab3c8d7a6f22888bd581cd5c6098fd2e4b5a8.zip |
Adding upstream version 2:8.1.0875.upstream/2%8.1.0875upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'runtime/compiler')
66 files changed, 1976 insertions, 0 deletions
diff --git a/runtime/compiler/README.txt b/runtime/compiler/README.txt new file mode 100644 index 0000000..3f0b97b --- /dev/null +++ b/runtime/compiler/README.txt @@ -0,0 +1,11 @@ +This directory contains Vim scripts to be used with a specific compiler. +They are used with the ":compiler" command. + +These scripts usually set options, for example 'errorformat'. +See ":help write-compiler-plugin". + +If you want to write your own compiler plugin, have a look at the other files +for how to do it, the format is simple. + +If you think a compiler plugin you have written is useful for others, please +send it to Bram@vim.org. diff --git a/runtime/compiler/ant.vim b/runtime/compiler/ant.vim new file mode 100644 index 0000000..0605c69 --- /dev/null +++ b/runtime/compiler/ant.vim @@ -0,0 +1,38 @@ +" Vim Compiler File +" Compiler: ant +" Maintainer: Johannes Zellner <johannes@zellner.org> +" Last Change: Mi, 13 Apr 2005 22:50:07 CEST + +if exists("current_compiler") + finish +endif +let current_compiler = "ant" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +let s:cpo_save = &cpo +set cpo&vim + +CompilerSet makeprg=ant + +" first line: +" ant with jikes +E, which assumes the following +" two property lines in your 'build.xml': +" +" <property name = "build.compiler" value = "jikes"/> +" <property name = "build.compiler.emacs" value = "true"/> +" +" second line: +" ant with javac +" +" note that this will work also for tasks like [wtkbuild] +" +CompilerSet errorformat=\ %#[%.%#]\ %#%f:%l:%v:%*\\d:%*\\d:\ %t%[%^:]%#:%m, + \%A\ %#[%.%#]\ %f:%l:\ %m,%-Z\ %#[%.%#]\ %p^,%C\ %#[%.%#]\ %#%m + +" ,%-C%.%# + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/compiler/bcc.vim b/runtime/compiler/bcc.vim new file mode 100644 index 0000000..5bd284a --- /dev/null +++ b/runtime/compiler/bcc.vim @@ -0,0 +1,19 @@ +" Vim compiler file +" Compiler: bcc - Borland C +" Maintainer: Emile van Raaij (eraaij@xs4all.nl) +" Last Change: 2004 Mar 27 + +if exists("current_compiler") + finish +endif +let current_compiler = "bcc" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +" A workable errorformat for Borland C +CompilerSet errorformat=%*[^0-9]%n\ %f\ %l:\ %m + +" default make +CompilerSet makeprg=make diff --git a/runtime/compiler/bdf.vim b/runtime/compiler/bdf.vim new file mode 100644 index 0000000..b062e84 --- /dev/null +++ b/runtime/compiler/bdf.vim @@ -0,0 +1,22 @@ +" Vim compiler file +" Compiler: BDF to PCF Conversion +" Previous Maintainer: Nikolai Weibull <now@bitwi.se> +" Latest Revision: 2006-04-19 + +if exists("current_compiler") + finish +endif +let current_compiler = "bdf" + +let s:cpo_save = &cpo +set cpo-=C + +setlocal makeprg=bdftopcf\ $* + +setlocal errorformat=%ABDF\ %trror\ on\ line\ %l:\ %m, + \%-Z%p^, + \%Cbdftopcf:\ bdf\ input\\,\ %f\\,\ corrupt, + \%-G%.%# + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/compiler/cargo.vim b/runtime/compiler/cargo.vim new file mode 100644 index 0000000..bd48666 --- /dev/null +++ b/runtime/compiler/cargo.vim @@ -0,0 +1,35 @@ +" Vim compiler file +" Compiler: Cargo Compiler +" Maintainer: Damien Radtke <damienradtke@gmail.com> +" Latest Revision: 2014 Sep 24 +" For bugs, patches and license go to https://github.com/rust-lang/rust.vim + +if exists('current_compiler') + finish +endif +runtime compiler/rustc.vim +let current_compiler = "cargo" + +let s:save_cpo = &cpo +set cpo&vim + +if exists(':CompilerSet') != 2 + command -nargs=* CompilerSet setlocal <args> +endif + +if exists('g:cargo_makeprg_params') + execute 'CompilerSet makeprg=cargo\ '.escape(g:cargo_makeprg_params, ' \|"').'\ $*' +else + CompilerSet makeprg=cargo\ $* +endif + +" Ignore general cargo progress messages +CompilerSet errorformat+= + \%-G%\\s%#Downloading%.%#, + \%-G%\\s%#Compiling%.%#, + \%-G%\\s%#Finished%.%#, + \%-G%\\s%#error:\ Could\ not\ compile\ %.%#, + \%-G%\\s%#To\ learn\ more\\,%.%# + +let &cpo = s:save_cpo +unlet s:save_cpo diff --git a/runtime/compiler/checkstyle.vim b/runtime/compiler/checkstyle.vim new file mode 100644 index 0000000..eac461b --- /dev/null +++ b/runtime/compiler/checkstyle.vim @@ -0,0 +1,19 @@ +" Vim compiler file +" Compiler: Checkstyle +" Maintainer: Doug Kearns <dougkearns@gmail.com> +" Last Change: 2013 Jun 26 + +if exists("current_compiler") + finish +endif +let current_compiler = "checkstyle" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +CompilerSet makeprg=java\ com.puppycrawl.tools.checkstyle.Main\ -f\ plain + +" sample error: WebTable.java:282: '+=' is not preceeded with whitespace. +" WebTable.java:201:1: '{' should be on the previous line. +CompilerSet errorformat=%f:%l:%v:\ %m,%f:%l:\ %m,%-G%.%# diff --git a/runtime/compiler/context.vim b/runtime/compiler/context.vim new file mode 100644 index 0000000..cb78c96 --- /dev/null +++ b/runtime/compiler/context.vim @@ -0,0 +1,54 @@ +" Vim compiler file +" Compiler: ConTeXt typesetting engine +" Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com> +" Last Change: 2016 Oct 21 + +if exists("current_compiler") + finish +endif +let s:keepcpo= &cpo +set cpo&vim + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +" If makefile exists and we are not asked to ignore it, we use standard make +" (do not redefine makeprg) +if get(b:, 'context_ignore_makefile', get(g:, 'context_ignore_makefile', 0)) || + \ (!filereadable('Makefile') && !filereadable('makefile')) + let current_compiler = 'context' + " The following assumes that the current working directory is set to the + " directory of the file to be typeset + let &l:makeprg = get(b:, 'context_mtxrun', get(g:, 'context_mtxrun', 'mtxrun')) + \ . ' --script context --autogenerate --nonstopmode --synctex=' + \ . (get(b:, 'context_synctex', get(g:, 'context_synctex', 0)) ? '1' : '0') + \ . ' ' . get(b:, 'context_extra_options', get(g:, 'context_extra_options', '')) + \ . ' ' . shellescape(expand('%:p:t')) +else + let current_compiler = 'make' +endif + +let b:context_errorformat = '' + \ . '%-Popen source%.%#> %f,' + \ . '%-Qclose source%.%#> %f,' + \ . "%-Popen source%.%#name '%f'," + \ . "%-Qclose source%.%#name '%f'," + \ . '%Etex %trror%.%#mp error on line %l in file %f:%.%#,' + \ . 'tex %trror%.%#error on line %l in file %f: %m,' + \ . '%Elua %trror%.%#error on line %l in file %f:,' + \ . '%+Emetapost %#> error: %#,' + \ . '! error: %#%m,' + \ . '%-C %#,' + \ . '%C! %m,' + \ . '%Z[ctxlua]%m,' + \ . '%+C<*> %.%#,' + \ . '%-C%.%#,' + \ . '%Z...%m,' + \ . '%-Zno-error,' + \ . '%-G%.%#' " Skip remaining lines + +execute 'CompilerSet errorformat=' . escape(b:context_errorformat, ' ') + +let &cpo = s:keepcpo +unlet s:keepcpo diff --git a/runtime/compiler/cs.vim b/runtime/compiler/cs.vim new file mode 100644 index 0000000..4cc1784 --- /dev/null +++ b/runtime/compiler/cs.vim @@ -0,0 +1,26 @@ +" Vim compiler file +" Compiler: Microsoft Visual Studio C# +" Maintainer: Zhou YiChao (broken.zhou@gmail.com) +" Previous Maintainer: Joseph H. Yao (hyao@sina.com) +" Last Change: 2012 Apr 30 + +if exists("current_compiler") + finish +endif +let current_compiler = "cs" +let s:keepcpo= &cpo +set cpo&vim + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +CompilerSet errorformat& +CompilerSet errorformat+=%f(%l\\,%v):\ %t%*[^:]:\ %m, + \%trror%*[^:]:\ %m, + \%tarning%*[^:]:\ %m + +CompilerSet makeprg=csc\ % + +let &cpo = s:keepcpo +unlet s:keepcpo diff --git a/runtime/compiler/csslint.vim b/runtime/compiler/csslint.vim new file mode 100644 index 0000000..14c4289 --- /dev/null +++ b/runtime/compiler/csslint.vim @@ -0,0 +1,16 @@ +" Vim compiler file +" Compiler: csslint for CSS +" Maintainer: Daniel Moch <daniel@danielmoch.com> +" Last Change: 2016 May 21 + +if exists("current_compiler") + finish +endif +let current_compiler = "csslint" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +CompilerSet makeprg=csslint\ --format=compact +CompilerSet errorformat=%-G,%-G%f:\ lint\ free!,%f:\ line\ %l\\,\ col\ %c\\,\ %trror\ -\ %m,%f:\ line\ %l\\,\ col\ %c\\,\ %tarning\ -\ %m,%f:\ line\ %l\\,\ col\ %c\\,\ %m diff --git a/runtime/compiler/cucumber.vim b/runtime/compiler/cucumber.vim new file mode 100644 index 0000000..17ce362 --- /dev/null +++ b/runtime/compiler/cucumber.vim @@ -0,0 +1,29 @@ +" Vim compiler file +" Compiler: Cucumber +" Maintainer: Tim Pope <vimNOSPAM@tpope.org> +" Last Change: 2016 Aug 29 + +if exists("current_compiler") + finish +endif +let current_compiler = "cucumber" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +let s:cpo_save = &cpo +set cpo-=C + +CompilerSet makeprg=cucumber + +CompilerSet errorformat= + \%W%m\ (Cucumber::Undefined), + \%E%m\ (%\\S%#), + \%Z%f:%l, + \%Z%f:%l:%.%# + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim:set sw=2 sts=2: diff --git a/runtime/compiler/decada.vim b/runtime/compiler/decada.vim new file mode 100644 index 0000000..0bf5487 --- /dev/null +++ b/runtime/compiler/decada.vim @@ -0,0 +1,58 @@ +"------------------------------------------------------------------------------ +" Description: Vim Ada/Dec Ada compiler file +" Language: Ada (Dec Ada) +" $Id: decada.vim 887 2008-07-08 14:29:01Z krischik $ +" Copyright: Copyright (C) 2006 Martin Krischik +" Maintainer: Martin Krischik <krischik@users.sourceforge.net> +" $Author: krischik $ +" $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $ +" Version: 4.6 +" $Revision: 887 $ +" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/compiler/decada.vim $ +" History: 21.07.2006 MK New Dec Ada +" 15.10.2006 MK Bram's suggestion for runtime integration +" 08.09.2006 MK Correct double load protection. +" Help Page: compiler-decada +"------------------------------------------------------------------------------ + +if (exists("current_compiler") && current_compiler == "decada") || version < 700 + finish +endif +let s:keepcpo= &cpo +set cpo&vim + +let current_compiler = "decada" + +if !exists("g:decada") + let g:decada = decada#New () + + call ada#Map_Menu ( + \'Dec Ada.Build', + \'<F7>', + \'call decada.Make ()') + + call g:decada.Set_Session () +endif + +if exists(":CompilerSet") != 2 + " + " plugin loaded by other means then the "compiler" command + " + command -nargs=* CompilerSet setlocal <args> +endif + +execute "CompilerSet makeprg=" . escape (g:decada.Make_Command, ' ') +execute "CompilerSet errorformat=" . escape (g:decada.Error_Format, ' ') + +let &cpo = s:keepcpo +unlet s:keepcpo + +finish " 1}}} + +"------------------------------------------------------------------------------ +" Copyright (C) 2006 Martin Krischik +" +" Vim is Charityware - see ":help license" or uganda.txt for licence details. +"------------------------------------------------------------------------------ +" vim: textwidth=78 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab +" vim: foldmethod=marker diff --git a/runtime/compiler/dot.vim b/runtime/compiler/dot.vim new file mode 100644 index 0000000..0327739 --- /dev/null +++ b/runtime/compiler/dot.vim @@ -0,0 +1,15 @@ +" Vim compiler file +" Compiler: ATT dot +" Maintainer: Marcos Macedo <bar4ka@bol.com.br> +" Last Change: 2004 May 16 + +if exists("current_compiler") + finish +endif +let current_compiler = "dot" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +CompilerSet makeprg=dot\ -T$*\ \"%:p\"\ -o\ \"%:p:r.$*\" diff --git a/runtime/compiler/erlang.vim b/runtime/compiler/erlang.vim new file mode 100644 index 0000000..e177a27 --- /dev/null +++ b/runtime/compiler/erlang.vim @@ -0,0 +1,13 @@ +" Vim compiler file +" Compiler: Erlang +" Maintainer: Dmitry Vasiliev <dima at hlabs dot org> +" Last Change: 2012-02-13 + +if exists("current_compiler") + finish +endif +let current_compiler = "erlang" + +CompilerSet makeprg=erlc\ -Wall\ % + +CompilerSet errorformat=%f:%l:\ %m diff --git a/runtime/compiler/eruby.vim b/runtime/compiler/eruby.vim new file mode 100644 index 0000000..a81a3f3 --- /dev/null +++ b/runtime/compiler/eruby.vim @@ -0,0 +1,40 @@ +" Vim compiler file +" Language: eRuby +" Maintainer: Doug Kearns <dougkearns@gmail.com> +" URL: https://github.com/vim-ruby/vim-ruby +" Release Coordinator: Doug Kearns <dougkearns@gmail.com> +" Last Change: 2018 Jan 25 + +if exists("current_compiler") + finish +endif +let current_compiler = "eruby" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +let s:cpo_save = &cpo +set cpo-=C + +if exists("eruby_compiler") && eruby_compiler == "eruby" + CompilerSet makeprg=eruby +else + CompilerSet makeprg=erb +endif + +CompilerSet errorformat= + \eruby:\ %f:%l:%m, + \%+E%f:%l:\ parse\ error, + \%W%f:%l:\ warning:\ %m, + \%E%f:%l:in\ %*[^:]:\ %m, + \%E%f:%l:\ %m, + \%-C%\t%\\d%#:%#\ %#from\ %f:%l:in\ %.%#, + \%-Z%\t%\\d%#:%#\ %#from\ %f:%l, + \%-Z%p^, + \%-G%.%# + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: nowrap sw=2 sts=2 ts=8: diff --git a/runtime/compiler/fortran_F.vim b/runtime/compiler/fortran_F.vim new file mode 100644 index 0000000..d9cb47c --- /dev/null +++ b/runtime/compiler/fortran_F.vim @@ -0,0 +1,27 @@ +" Vim compiler file +" Compiler: Fortran Company/NAGWare F compiler +" URL: http://www.unb.ca/chem/ajit/compiler/fortran_F.vim +" Maintainer: Ajit J. Thakkar (ajit AT unb.ca); <http://www.unb.ca/chem/ajit/> +" Version: 0.2 +" Last Change: 2004 Mar 27 + +if exists("current_compiler") + finish +endif +let current_compiler = "fortran_F" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +let s:cposet=&cpoptions +set cpoptions-=C + +CompilerSet errorformat=%trror:\ %f\\,\ line\ %l:%m, + \%tarning:\ %f\\,\ line\ %l:%m, + \%tatal\ Error:\ %f\\,\ line\ %l:%m, + \%-G%.%# +CompilerSet makeprg=F + +let &cpoptions=s:cposet +unlet s:cposet diff --git a/runtime/compiler/fortran_cv.vim b/runtime/compiler/fortran_cv.vim new file mode 100644 index 0000000..089d3b2 --- /dev/null +++ b/runtime/compiler/fortran_cv.vim @@ -0,0 +1,30 @@ +" Vim compiler file +" Compiler: Compaq Visual Fortran +" Maintainer: Joh.-G. Simon (johann-guenter.simon@linde-le.com) +" Last Change: 11/05/2002 + +if exists("current_compiler") + finish +endif +let current_compiler = "fortran_cv" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +let s:cposet = &cpoptions +set cpoptions-=C + +" A workable errorformat for Compaq Visual Fortran +CompilerSet errorformat= + \%E%f(%l)\ :\ Error:%m, + \%W%f(%l)\ :\ Warning:%m, + \%-Z%p%^%.%#, + \%-G%.%#, +" Compiler call +CompilerSet makeprg=df\ /nologo\ /noobj\ /c\ % +" Visual fortran defaults to printing output on stderr +" Adjust option shellpipe accordingly + +let &cpoptions = s:cposet +unlet s:cposet diff --git a/runtime/compiler/fortran_elf90.vim b/runtime/compiler/fortran_elf90.vim new file mode 100644 index 0000000..34c33cf --- /dev/null +++ b/runtime/compiler/fortran_elf90.vim @@ -0,0 +1,33 @@ +" Vim compiler file +" Compiler: Essential Lahey Fortran 90 +" Probably also works for Lahey Fortran 90 +" URL: http://www.unb.ca/chem/ajit/compiler/fortran_elf90.vim +" Maintainer: Ajit J. Thakkar (ajit AT unb.ca); <http://www.unb.ca/chem/ajit/> +" Version: 0.2 +" Last Change: 2004 Mar 27 + +if exists("current_compiler") + finish +endif +let current_compiler = "fortran_elf90" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +let s:cposet=&cpoptions +set cpoptions-=C + +CompilerSet errorformat=\%ALine\ %l\\,\ file\ %f, + \%C%tARNING\ --%m, + \%C%tATAL\ --%m, + \%C%tBORT\ --%m, + \%+C%\\l%.%#\., + \%C%p\|, + \%C%.%#, + \%Z%$, + \%-G%.%# +CompilerSet makeprg=elf90 + +let &cpoptions=s:cposet +unlet s:cposet diff --git a/runtime/compiler/fortran_g77.vim b/runtime/compiler/fortran_g77.vim new file mode 100644 index 0000000..744ce6a --- /dev/null +++ b/runtime/compiler/fortran_g77.vim @@ -0,0 +1,48 @@ +" Vim compiler file +" Compiler: g77 (GNU Fortran) +" Maintainer: Ralf Wildenhues <Ralf.Wildenhues@gmx.de> +" Last Change: $Date: 2004/06/13 18:17:36 $ +" $Revision: 1.1 $ + +if exists("current_compiler") + finish +endif +let current_compiler = "fortran_g77" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +let s:cpo_save = &cpo +set cpo-=C + +" Note: The errorformat assumes GNU make + +" sample multiline errors (besides gcc backend one-liners): +" gev.f:14: +" parameter UPLO = 'Upper-triangle' +" ^ +" Unsupported VXT statement at (^) +" gev.f:6: +" integer desca( * ), descb( * ) +" 1 +" gev.f:19: (continued): +" end subroutine +" 2 +" Invalid declaration of or reference to symbol `desca' at (2) [initially seen at (1)] + +CompilerSet errorformat= + \%Omake:\ %r, + \%f:%l:\ warning:\ %m, + \%A%f:%l:\ (continued):, + \%W%f:%l:\ warning:, + \%A%f:%l:\ , + \%-C\ \ \ %p%*[0123456789^]%.%#, + \%-C\ \ \ %.%#, + \%D%*\\a[%*\\d]:\ Entering\ directory\ `%f', + \%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f', + \%DMaking\ %*\\a\ in\ %f, + \%Z%m + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/compiler/fortran_lf95.vim b/runtime/compiler/fortran_lf95.vim new file mode 100644 index 0000000..685fee7 --- /dev/null +++ b/runtime/compiler/fortran_lf95.vim @@ -0,0 +1,27 @@ +" Vim compiler file +" Compiler: Lahey/Fujitsu Fortran 95 +" URL: http://www.unb.ca/chem/ajit/compiler/fortran_lf95.vim +" Maintainer: Ajit J. Thakkar (ajit AT unb.ca); <http://www.unb.ca/chem/ajit/> +" Version: 0.2 +" Last Change: 2004 Mar 27 + +if exists("current_compiler") + finish +endif +let current_compiler = "fortran_lf95" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +let s:cposet=&cpoptions +set cpoptions-=C + +CompilerSet errorformat=\ %#%n-%t:\ \"%f\"\\,\ line\ %l:%m, + \Error\ LINK\.%n:%m, + \Warning\ LINK\.%n:%m, + \%-G%.%# +CompilerSet makeprg=lf95 + +let &cpoptions=s:cposet +unlet s:cposet diff --git a/runtime/compiler/fpc.vim b/runtime/compiler/fpc.vim new file mode 100644 index 0000000..fb4f424 --- /dev/null +++ b/runtime/compiler/fpc.vim @@ -0,0 +1,17 @@ +" Vim compiler file +" Compiler: FPC 2.1 +" Maintainer: Jaroslaw Blasiok <jaro3000@o2.pl> +" Last Change: 2005 October 07 + +if exists("current_compiler") + finish +endif +let current_compiler = "fpc" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +" NOTE: compiler must be runned with -vb to write whole source path, not only file +" name. +CompilerSet errorformat=%f(%l\\,%c)\ %m diff --git a/runtime/compiler/g95.vim b/runtime/compiler/g95.vim new file mode 100644 index 0000000..ecb3212 --- /dev/null +++ b/runtime/compiler/g95.vim @@ -0,0 +1,28 @@ +" Compiler: G95 +" Maintainer: H Xu <xuhdev@gmail.com> +" Version: 0.1.3 +" Last Change: 2012 Apr 30 +" Homepage: http://www.vim.org/scripts/script.php?script_id=3492 +" https://bitbucket.org/xuhdev/compiler-g95.vim +" License: Same as Vim + +if exists('current_compiler') + finish +endif +let current_compiler = 'g95' +let s:keepcpo= &cpo +set cpo&vim + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +CompilerSet errorformat= + \%AIn\ file\ %f:%l, + \%-C%p1, + \%-Z%trror:\ %m, + \%-Z%tarning\ (%n):\ %m, + \%-C%.%# + +let &cpo = s:keepcpo +unlet s:keepcpo diff --git a/runtime/compiler/gcc.vim b/runtime/compiler/gcc.vim new file mode 100644 index 0000000..1af568d --- /dev/null +++ b/runtime/compiler/gcc.vim @@ -0,0 +1,41 @@ +" Vim compiler file +" Compiler: GNU C Compiler +" Previous Maintainer: Nikolai Weibull <now@bitwi.se> +" Latest Revision: 2010-10-14 +" added line suggested by Anton Lindqvist 2016 Mar 31 + +if exists("current_compiler") + finish +endif +let current_compiler = "gcc" + +let s:cpo_save = &cpo +set cpo&vim + +CompilerSet errorformat= + \%*[^\"]\"%f\"%*\\D%l:%c:\ %m, + \%*[^\"]\"%f\"%*\\D%l:\ %m, + \\"%f\"%*\\D%l:%c:\ %m, + \\"%f\"%*\\D%l:\ %m, + \%-G%f:%l:\ %trror:\ (Each\ undeclared\ identifier\ is\ reported\ only\ once, + \%-G%f:%l:\ %trror:\ for\ each\ function\ it\ appears\ in.), + \%f:%l:%c:\ %trror:\ %m, + \%f:%l:%c:\ %tarning:\ %m, + \%f:%l:%c:\ %m, + \%f:%l:\ %trror:\ %m, + \%f:%l:\ %tarning:\ %m, + \%f:%l:\ %m, + \%f:\\(%*[^\\)]\\):\ %m, + \\"%f\"\\,\ line\ %l%*\\D%c%*[^\ ]\ %m, + \%D%*\\a[%*\\d]:\ Entering\ directory\ [`']%f', + \%X%*\\a[%*\\d]:\ Leaving\ directory\ [`']%f', + \%D%*\\a:\ Entering\ directory\ [`']%f', + \%X%*\\a:\ Leaving\ directory\ [`']%f', + \%DMaking\ %*\\a\ in\ %f + +if exists('g:compiler_gcc_ignore_unmatched_lines') + CompilerSet errorformat+=%-G%.%# +endif + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/compiler/gfortran.vim b/runtime/compiler/gfortran.vim new file mode 100644 index 0000000..1e4e5cf --- /dev/null +++ b/runtime/compiler/gfortran.vim @@ -0,0 +1,27 @@ +" Compiler: GNU Fortran Compiler +" Maintainer: H Xu <xuhdev@gmail.com> +" Version: 0.1.3 +" Last Change: 2012 Apr 30 +" Homepage: http://www.vim.org/scripts/script.php?script_id=3496 +" https://bitbucket.org/xuhdev/compiler-gfortran.vim +" License: Same as Vim + +if exists('current_compiler') + finish +endif +let current_compiler = 'gfortran' +let s:keepcpo= &cpo +set cpo&vim + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +CompilerSet errorformat= + \%A%f:%l.%c:, + \%-Z%trror:\ %m, + \%-Z%tarning:\ %m, + \%-C%.%# + +let &cpo = s:keepcpo +unlet s:keepcpo diff --git a/runtime/compiler/ghc.vim b/runtime/compiler/ghc.vim new file mode 100644 index 0000000..c98ae30 --- /dev/null +++ b/runtime/compiler/ghc.vim @@ -0,0 +1,26 @@ +" Vim compiler file +" Compiler: GHC Haskell Compiler +" Maintainer: Daniel Campoverde <alx@sillybytes.net> +" Latest Revision: 2016-11-29 + +if exists("current_compiler") + finish +endif +let current_compiler = "ghc" + +let s:cpo_save = &cpo +set cpo&vim + +CompilerSet errorformat= + \%-G%.%#:\ build, + \%-G%.%#preprocessing\ library\ %.%#, + \%-G[%.%#]%.%#, + \%E%f:%l:%c:\ %m, + \%-G--%.%# + +if exists('g:compiler_ghc_ignore_unmatched_lines') + CompilerSet errorformat+=%-G%.%# +endif + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/compiler/gnat.vim b/runtime/compiler/gnat.vim new file mode 100644 index 0000000..3ad1eb4 --- /dev/null +++ b/runtime/compiler/gnat.vim @@ -0,0 +1,76 @@ +"------------------------------------------------------------------------------ +" Description: Vim Ada/GNAT compiler file +" Language: Ada (GNAT) +" $Id: gnat.vim 887 2008-07-08 14:29:01Z krischik $ +" Copyright: Copyright (C) 2006 Martin Krischik +" Maintainer: Martin Krischi <krischik@users.sourceforge.net>k +" Ned Okie <nokie@radford.edu> +" $Author: krischik $ +" $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $ +" Version: 4.6 +" $Revision: 887 $ +" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/compiler/gnat.vim $ +" History: 24.05.2006 MK Unified Headers +" 16.07.2006 MK Ada-Mode as vim-ball +" 15.10.2006 MK Bram's suggestion for runtime integration +" 19.09.2007 NO use project file only when there is a project +" Help Page: compiler-gnat +"------------------------------------------------------------------------------ + +if (exists("current_compiler")&& current_compiler == "gnat") || version < 700 + finish +endif +let s:keepcpo= &cpo +set cpo&vim + +let current_compiler = "gnat" + +if !exists("g:gnat") + let g:gnat = gnat#New () + + call ada#Map_Menu ( + \ 'GNAT.Build', + \ '<F7>', + \ 'call gnat.Make ()') + call ada#Map_Menu ( + \ 'GNAT.Pretty Print', + \ ':GnatPretty', + \ 'call gnat.Pretty ()') + call ada#Map_Menu ( + \ 'GNAT.Tags', + \ ':GnatTags', + \ 'call gnat.Tags ()') + call ada#Map_Menu ( + \ 'GNAT.Find', + \ ':GnatFind', + \ 'call gnat.Find ()') + call ada#Map_Menu ( + \ 'GNAT.Set Projectfile\.\.\.', + \ ':SetProject', + \ 'call gnat.Set_Project_File ()') + + call g:gnat.Set_Session () +endif + +if exists(":CompilerSet") != 2 + " + " plugin loaded by other means then the "compiler" command + " + command -nargs=* CompilerSet setlocal <args> +endif + +execute "CompilerSet makeprg=" . escape (g:gnat.Get_Command('Make'), ' ') +execute "CompilerSet errorformat=" . escape (g:gnat.Error_Format, ' ') + +let &cpo = s:keepcpo +unlet s:keepcpo + +finish " 1}}} + +"------------------------------------------------------------------------------ +" Copyright (C) 2006 Martin Krischik +" +" Vim is Charityware - see ":help license" or uganda.txt for licence details. +"------------------------------------------------------------------------------ +" vim: textwidth=0 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab +" vim: foldmethod=marker diff --git a/runtime/compiler/go.vim b/runtime/compiler/go.vim new file mode 100644 index 0000000..cf638f2 --- /dev/null +++ b/runtime/compiler/go.vim @@ -0,0 +1,29 @@ +" Vim compiler file +" Compiler: Go +" Maintainer: David Barnett (https://github.com/google/vim-ft-go) +" Last Change: 2014 Aug 16 + +if exists('current_compiler') + finish +endif +let current_compiler = 'go' + +if exists(':CompilerSet') != 2 + command -nargs=* CompilerSet setlocal <args> +endif + +let s:save_cpo = &cpo +set cpo-=C + +CompilerSet makeprg=go\ build +CompilerSet errorformat= + \%-G#\ %.%#, + \%A%f:%l:%c:\ %m, + \%A%f:%l:\ %m, + \%C%*\\s%m, + \%-G%.%# + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: sw=2 sts=2 et diff --git a/runtime/compiler/haml.vim b/runtime/compiler/haml.vim new file mode 100644 index 0000000..9464c3d --- /dev/null +++ b/runtime/compiler/haml.vim @@ -0,0 +1,28 @@ +" Vim compiler file +" Compiler: Haml +" Maintainer: Tim Pope <vimNOSPAM@tpope.org> +" Last Change: 2016 Aug 29 + +if exists("current_compiler") + finish +endif +let current_compiler = "haml" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +let s:cpo_save = &cpo +set cpo-=C + +CompilerSet makeprg=haml + +CompilerSet errorformat= + \Haml\ %trror\ on\ line\ %l:\ %m, + \Syntax\ %trror\ on\ line\ %l:\ %m, + \%-G%.%# + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim:set sw=2 sts=2: diff --git a/runtime/compiler/hp_acc.vim b/runtime/compiler/hp_acc.vim new file mode 100644 index 0000000..15d5ce5 --- /dev/null +++ b/runtime/compiler/hp_acc.vim @@ -0,0 +1,38 @@ +" Vim compiler file +" Compiler: HP aCC +" Maintainer: Matthias Ulrich <matthias-ulrich@web.de> +" URL: http://www.subhome.de/vim/hp_acc.vim +" Last Change: 2012 Apr 30 +" +" aCC --version says: "HP ANSI C++ B3910B A.03.13" +" This compiler has been tested on: +" hp-ux 10.20, hp-ux 11.0 and hp-ux 11.11 (64bit) +" +" Tim Brown's aCC is: "HP ANSI C++ B3910B A.03.33" +" and it also works fine... +" +" Now suggestions by aCC are supported (compile flag aCC +w). +" Thanks to Tim Brown again!! +" + +if exists("current_compiler") + finish +endif +let current_compiler = "hp_acc" +let s:keepcpo= &cpo +set cpo&vim + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +CompilerSet errorformat=%A%trror\ %n\:\ \"%f\"\\,\ line\ %l\ \#\ %m, + \%A%tarning\ (suggestion)\ %n\:\ \"%f\"\\,\ line\ %l\ \#\ %m\ %#, + \%A%tarning\ %n\:\ \"%f\"\\,\ line\ %l\ \#\ %m\ %#, + \%Z\ \ \ \ %p^%.%#, + \%-C%.%# + +let &cpo = s:keepcpo +unlet s:keepcpo + +" vim:ts=8:sw=4:cindent diff --git a/runtime/compiler/icc.vim b/runtime/compiler/icc.vim new file mode 100644 index 0000000..751fba6 --- /dev/null +++ b/runtime/compiler/icc.vim @@ -0,0 +1,18 @@ +" Vim compiler file +" Compiler: icc - Intel C++ +" Maintainer: Peter Puck <PtrPck@netscape.net> +" Last Change: 2004 Mar 27 + +if exists("current_compiler") + finish +endif +let current_compiler = "icc" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +" I think that Intel is calling the compiler icl under Windows + +CompilerSet errorformat=%-Z%p^,%f(%l):\ remark\ #%n:%m,%f(%l)\ :\ (col.\ %c)\ remark:\ %m,%E%f(%l):\ error:\ %m,%E%f(%l):\ error:\ #%n:\ %m,%W%f(%l):\ warning\ #%n:\ %m,%W%f(%l):\ warning:\ %m,%-C%.%# + diff --git a/runtime/compiler/ifort.vim b/runtime/compiler/ifort.vim new file mode 100644 index 0000000..3a60d0c --- /dev/null +++ b/runtime/compiler/ifort.vim @@ -0,0 +1,27 @@ +" Compiler: Intel Fortran Compiler +" Maintainer: H Xu <xuhdev@gmail.com> +" Version: 0.1.1 +" Last Change: 2012 Apr 30 +" Homepage: http://www.vim.org/scripts/script.php?script_id=3497 +" https://bitbucket.org/xuhdev/compiler-ifort.vim +" License: Same as Vim + +if exists('current_compiler') + finish +endif +let current_compiler = 'ifort' +let s:keepcpo= &cpo +set cpo&vim + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +CompilerSet errorformat= + \%A%f(%l):\ %trror\ \#%n:\ %m, + \%A%f(%l):\ %tarning\ \#%n:\ %m, + \%-Z%p^, + \%-G%.%# + +let &cpo = s:keepcpo +unlet s:keepcpo diff --git a/runtime/compiler/intel.vim b/runtime/compiler/intel.vim new file mode 100644 index 0000000..254d13b --- /dev/null +++ b/runtime/compiler/intel.vim @@ -0,0 +1,26 @@ +" Vim compiler file +" Compiler: Intel C++ 7.1 +" Maintainer: David Harrison <david_jr@users.sourceforge.net> +" Last Change: 2012 Apr 30 + +if exists("current_compiler") + finish +endif +let current_compiler = "intel" +let s:keepcpo= &cpo +set cpo&vim + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +CompilerSet errorformat=%E%f(%l):\ error:\ %m, + \%W%f(%l):\ warning:\ %m, + \%I%f(%l):\ remark\ #%n:\ %m, + \%+C\ \ %m., + \%-Z\ \ %p^, + \%-G\\s%#, + \%-G%.%# + +let &cpo = s:keepcpo +unlet s:keepcpo diff --git a/runtime/compiler/irix5_c.vim b/runtime/compiler/irix5_c.vim new file mode 100644 index 0000000..f440e74 --- /dev/null +++ b/runtime/compiler/irix5_c.vim @@ -0,0 +1,26 @@ +" Vim compiler file +" Compiler: SGI IRIX 5.3 cc +" Maintainer: David Harrison <david_jr@users.sourceforge.net> +" Last Change: 2012 Apr 30 + +if exists("current_compiler") + finish +endif +let current_compiler = "irix5_c" +let s:keepcpo= &cpo +set cpo&vim + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +CompilerSet errorformat=\%Ecfe:\ Error:\ %f\\,\ line\ %l:\ %m, + \%Wcfe:\ Warning:\ %n:\ %f\\,\ line\ %l:\ %m, + \%Wcfe:\ Warning\ %n:\ %f\\,\ line\ %l:\ %m, + \%W(%l)\ \ Warning\ %n:\ %m, + \%-Z\ %p^, + \-G\\s%#, + \%-G%.%# + +let &cpo = s:keepcpo +unlet s:keepcpo diff --git a/runtime/compiler/irix5_cpp.vim b/runtime/compiler/irix5_cpp.vim new file mode 100644 index 0000000..0112dc1 --- /dev/null +++ b/runtime/compiler/irix5_cpp.vim @@ -0,0 +1,26 @@ +" Vim compiler file +" Compiler: SGI IRIX 5.3 CC or NCC +" Maintainer: David Harrison <david_jr@users.sourceforge.net> +" Last Change: 2012 Apr 30 + +if exists("current_compiler") + finish +endif +let current_compiler = "irix5_cpp" +let s:keepcpo= &cpo +set cpo&vim + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +CompilerSet errorformat=%E\"%f\"\\,\ line\ %l:\ error(%n):\ , + \%E\"%f\"\\,\ line\ %l:\ error(%n):\ %m, + \%W\"%f\"\\,\ line\ %l:\ warning(%n):\ %m, + \%+IC++\ prelinker:\ %m, + \%-Z\ \ %p%^, + \%+C\ %\\{10}%.%#, + \%-G%.%# + +let &cpo = s:keepcpo +unlet s:keepcpo diff --git a/runtime/compiler/javac.vim b/runtime/compiler/javac.vim new file mode 100644 index 0000000..a50bdca --- /dev/null +++ b/runtime/compiler/javac.vim @@ -0,0 +1,17 @@ +" Vim compiler file +" Compiler: javac +" Maintainer: Doug Kearns <dougkearns@gmail.com> +" Last Change: 2004 Nov 27 + +if exists("current_compiler") + finish +endif +let current_compiler = "javac" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +CompilerSet makeprg=javac + +CompilerSet errorformat=%E%f:%l:\ %m,%-Z%p^,%-C%.%#,%-G%.%# diff --git a/runtime/compiler/jikes.vim b/runtime/compiler/jikes.vim new file mode 100644 index 0000000..5125128 --- /dev/null +++ b/runtime/compiler/jikes.vim @@ -0,0 +1,18 @@ +" Vim Compiler File +" Compiler: Jikes +" Maintainer: Dan Sharp <dwsharp at hotmail dot com> +" Last Change: 20 Jan 2009 +" URL: http://dwsharp.users.sourceforge.net/vim/compiler + +if exists("current_compiler") + finish +endif +let current_compiler = "jikes" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +" Jikes defaults to printing output on stderr +CompilerSet makeprg=jikes\ -Xstdout\ +E\ \"%\" +CompilerSet errorformat=%f:%l:%v:%*\\d:%*\\d:%*\\s%m diff --git a/runtime/compiler/mcs.vim b/runtime/compiler/mcs.vim new file mode 100644 index 0000000..c606586 --- /dev/null +++ b/runtime/compiler/mcs.vim @@ -0,0 +1,30 @@ +" Vim compiler file +" Compiler: Mono C# Compiler +" Maintainer: Jarek Sobiecki <harijari@go2.pl> +" Last Updated By: Peter Collingbourne +" Latest Revision: 2012 Jul 19 + +if exists("current_compiler") + finish +endif +let current_compiler = "mcs" + +let s:cpo_save = &cpo +set cpo-=C + +setlocal errorformat= + \%D%.%#Project\ \"%f/%[%^/\"]%#\"%.%#, + \%X%.%#Done\ building\ project\ \"%f/%[%^/\"]%#\"%.%#, + \%-G%\\s%.%#, + \%E%f(%l):\ error\ CS%n:%m, + \%W%f(%l):\ warning\ CS%n:%m, + \%E%f(%l\\,%c):\ error\ CS%n:%m, + \%W%f(%l\\,%c):\ warning\ CS%n:%m, + \%E%>syntax\ error\\,%m,%Z%f(%l\\,%c):\ error\ CS%n:%m, + \%D%*\\a[%*\\d]:\ Entering\ directory\ `%f', + \%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f', + \%DMaking\ %*\\a\ in\ %f, + \%-G%.%# + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/compiler/mips_c.vim b/runtime/compiler/mips_c.vim new file mode 100644 index 0000000..a0ebfe7 --- /dev/null +++ b/runtime/compiler/mips_c.vim @@ -0,0 +1,26 @@ +" Vim compiler file +" Compiler: SGI IRIX 6.5 MIPS C (cc) +" Maintainer: David Harrison <david_jr@users.sourceforge.net> +" Last Change: 2012 Apr 30 + +if exists("current_compiler") + finish +endif +let current_compiler = "mips_c" +let s:keepcpo= &cpo +set cpo&vim + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +CompilerSet errorformat=%Ecc\-%n\ %.%#:\ ERROR\ File\ =\ %f\%\\,\ Line\ =\ %l, + \%Wcc\-%n\ %.%#:\ WARNING\ File\ =\ %f\%\\,\ Line\ =\ %l, + \%Icc\-%n\ %.%#:\ REMARK\ File\ =\ %f\%\\,\ Line\ =\ %l, + \%+C\ \ %m., + \%-Z\ \ %p^, + \%-G\\s%#, + \%-G%.%# + +let &cpo = s:keepcpo +unlet s:keepcpo diff --git a/runtime/compiler/mipspro_c89.vim b/runtime/compiler/mipspro_c89.vim new file mode 100644 index 0000000..20eb70d --- /dev/null +++ b/runtime/compiler/mipspro_c89.vim @@ -0,0 +1,27 @@ +" Vim compiler file +" Compiler: SGI IRIX 6.5 MIPSPro C (c89) +" Maintainer: David Harrison <david_jr@users.sourceforge.net> +" Last Change: 2012 Apr 30 + +if exists("current_compiler") + finish +endif +let current_compiler = "mipspro_c89" +let s:keepcpo= &cpo +set cpo&vim + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +CompilerSet errorformat=%Ecc\-%n\ %.%#:\ ERROR\ File\ =\ %f\%\\,\ Line\ =\ %l, + \%Wcc\-%n\ %.%#:\ WARNING\ File\ =\ %f\%\\,\ Line\ =\ %l, + \%Icc\-%n\ %.%#:\ REMARK\ File\ =\ %f\%\\,\ Line\ =\ %l, + \%-Z%p%^, + \%+C\ %\\{10}%m%., + \%+C\ \ %m, + \%-G\\s%#, + \%-G%.%# + +let &cpo = s:keepcpo +unlet s:keepcpo diff --git a/runtime/compiler/mipspro_cpp.vim b/runtime/compiler/mipspro_cpp.vim new file mode 100644 index 0000000..2f43af8 --- /dev/null +++ b/runtime/compiler/mipspro_cpp.vim @@ -0,0 +1,26 @@ +" Vim compiler file +" Compiler: SGI IRIX 6.5 MIPSPro C++ (CC) +" Maintainer: David Harrison <david_jr@users.sourceforge.net> +" Last Change: 2012 Apr 30 + +if exists("current_compiler") + finish +endif +let current_compiler = "mipspro_cpp" +let s:keepcpo= &cpo +set cpo&vim + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +CompilerSet errorformat=%Ecc\-%n\ %.%#:\ ERROR\ File\ =\ %f\%\\,\ Line\ =\ %l, + \%Wcc\-%n\ %.%#:\ WARNING\ File\ =\ %f\%\\,\ Line\ =\ %l, + \%Icc\-%n\ %.%#:\ REMARK\ File\ =\ %f\%\\,\ Line\ =\ %l, + \%+C\ \ %m., + \%-Z\ \ %p^, + \%-G\\s%#, + \%-G%.%# + +let &cpo = s:keepcpo +unlet s:keepcpo diff --git a/runtime/compiler/modelsim_vcom.vim b/runtime/compiler/modelsim_vcom.vim new file mode 100644 index 0000000..6aa1bde --- /dev/null +++ b/runtime/compiler/modelsim_vcom.vim @@ -0,0 +1,20 @@ +" Vim Compiler File +" Compiler: Modelsim Vcom +" Maintainer: Paul Baleme <pbaleme@mail.com> +" Last Change: September 8, 2003 +" Thanks to: allanherriman@hotmail.com + +if exists("current_compiler") + finish +endif +let current_compiler = "modelsim_vcom" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +"setlocal errorformat=\*\*\ %tRROR:\ %f(%l):\ %m,%tRROR:\ %f(%l):\ %m,%tARNING\[%*[0-9]\]:\ %f(%l):\ %m,\*\*\ %tRROR:\ %m,%tRROR:\ %m,%tARNING\[%*[0-9]\]:\ %m + +"setlocal errorformat=%tRROR:\ %f(%l):\ %m,%tARNING\[%*[0-9]\]:\ %m +CompilerSet errorformat=\*\*\ %tRROR:\ %f(%l):\ %m,\*\*\ %tRROR:\ %m,\*\*\ %tARNING:\ %m,\*\*\ %tOTE:\ %m,%tRROR:\ %f(%l):\ %m,%tARNING\[%*[0-9]\]:\ %f(%l):\ %m,%tRROR:\ %m,%tARNING\[%*[0-9]\]:\ %m + diff --git a/runtime/compiler/msbuild.vim b/runtime/compiler/msbuild.vim new file mode 100644 index 0000000..3652ca0 --- /dev/null +++ b/runtime/compiler/msbuild.vim @@ -0,0 +1,21 @@ +" Vim compiler file +" Compiler: Microsoft Visual Studio C# +" Maintainer: Chiel ten Brinke (ctje92@gmail.com) +" Last Change: 2013 May 13 + +if exists("current_compiler") + finish +endif +let current_compiler = "msbuild" +let s:keepcpo= &cpo +set cpo&vim + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +CompilerSet errorformat=\ %#%f(%l\\\,%c):\ %m +CompilerSet makeprg=msbuild\ /nologo\ /v:q\ /property:GenerateFullPaths=true + +let &cpo = s:keepcpo +unlet s:keepcpo diff --git a/runtime/compiler/msvc.vim b/runtime/compiler/msvc.vim new file mode 100644 index 0000000..efe36c4 --- /dev/null +++ b/runtime/compiler/msvc.vim @@ -0,0 +1,13 @@ +" Vim compiler file +" Compiler: Microsoft Visual C +" Maintainer: Bram Moolenaar <Bram@vim.org> +" Last Change: 2014 Sep 20 + +if exists("current_compiler") + finish +endif +let current_compiler = "msvc" + +" The errorformat for MSVC is the default. +CompilerSet errorformat& +CompilerSet makeprg=nmake diff --git a/runtime/compiler/neato.vim b/runtime/compiler/neato.vim new file mode 100644 index 0000000..bd184b7 --- /dev/null +++ b/runtime/compiler/neato.vim @@ -0,0 +1,15 @@ +" Vim compiler file +" Compiler: ATT neato +" Maintainer: Marcos Macedo <bar4ka@bol.com.br> +" Last Change: 2004 May 16 + +if exists("current_compiler") + finish +endif +let current_compiler = "neato" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +CompilerSet makeprg=neato\ -T$*\ \"%:p\"\ -o\ \"%:p:r.$*\" diff --git a/runtime/compiler/ocaml.vim b/runtime/compiler/ocaml.vim new file mode 100644 index 0000000..da15bce --- /dev/null +++ b/runtime/compiler/ocaml.vim @@ -0,0 +1,44 @@ +" Vim Compiler File +" Compiler: ocaml +" Maintainer: See ftplugin/ocaml.vim (?) +" Last Change: June 2013 by Marc Weber +" +" Marc Weber's comments: +" Setting makeprg doesn't make sense, because there is ocamlc, ocamlopt, +" ocamake and whatnot. So which one to use? +" +" This error format was moved from ftplugin/ocaml.vim to this file, +" because ftplugin is the wrong file to set an error format +" and the error format itself is annoying because it joins many lines in this +" error case: +" +" Error: The implementation foo.ml does not match the interface foo.cmi: +" Modules do not match case. +" +" So having it here makes people opt-in + + +if exists("current_compiler") + finish +endif +let current_compiler = "ocaml" + +let s:cpo_save = &cpo +set cpo&vim + +CompilerSet errorformat = + \%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%*\\d:, + \%EFile\ \"%f\"\\,\ line\ %l\\,\ character\ %c:%m, + \%+EReference\ to\ unbound\ regexp\ name\ %m, + \%Eocamlyacc:\ e\ -\ line\ %l\ of\ \"%f\"\\,\ %m, + \%Wocamlyacc:\ w\ -\ %m, + \%-Zmake%.%#, + \%C%m, + \%D%*\\a[%*\\d]:\ Entering\ directory\ `%f', + \%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f', + \%D%*\\a:\ Entering\ directory\ `%f', + \%X%*\\a:\ Leaving\ directory\ `%f', + \%DMaking\ %*\\a\ in\ %f + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/compiler/onsgmls.vim b/runtime/compiler/onsgmls.vim new file mode 100644 index 0000000..130d3e2 --- /dev/null +++ b/runtime/compiler/onsgmls.vim @@ -0,0 +1,24 @@ +" Vim compiler file +" Compiler: onsgmls +" Maintainer: Robert Rowsome <rowsome@wam.umd.edu> +" Last Change: 2004 Mar 27 + +if exists("current_compiler") + finish +endif +let current_compiler = "onsgmls" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +let s:cpo_save = &cpo +set cpo-=C + +CompilerSet makeprg=onsgmls\ -s\ % + +CompilerSet errorformat=onsgmls:%f:%l:%c:%t:%m, + \onsgmls:%f:%l:%c:%m + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/compiler/pbx.vim b/runtime/compiler/pbx.vim new file mode 100644 index 0000000..9e81ea7 --- /dev/null +++ b/runtime/compiler/pbx.vim @@ -0,0 +1,20 @@ +" Vim compiler file +" Compiler: Apple Project Builder +" Maintainer: Alexander von Below (public@vonBelow.Com) +" Last Change: 2004 Mar 27 + +if exists("current_compiler") + finish +endif +let current_compiler = "pbx" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +" The compiler actually is gcc, so the errorformat is unchanged +CompilerSet errorformat& + +" default make +CompilerSet makeprg=pbxbuild + diff --git a/runtime/compiler/perl.vim b/runtime/compiler/perl.vim new file mode 100644 index 0000000..583c6c3 --- /dev/null +++ b/runtime/compiler/perl.vim @@ -0,0 +1,47 @@ +" Vim Compiler File +" Compiler: Perl syntax checks (perl -Wc) +" Maintainer: Christian J. Robinson <heptite@gmail.com> +" Last Change: 2006 Aug 13 + +if exists("current_compiler") + finish +endif +let current_compiler = "perl" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +let s:savecpo = &cpo +set cpo&vim + +if exists('g:perl_compiler_force_warnings') && g:perl_compiler_force_warnings == 0 + let s:warnopt = 'w' +else + let s:warnopt = 'W' +endif + +if getline(1) =~# '-[^ ]*T' + let s:taintopt = 'T' +else + let s:taintopt = '' +endif + +exe 'CompilerSet makeprg=perl\ -' . s:warnopt . s:taintopt . 'c\ %' + +CompilerSet errorformat= + \%-G%.%#had\ compilation\ errors., + \%-G%.%#syntax\ OK, + \%m\ at\ %f\ line\ %l., + \%+A%.%#\ at\ %f\ line\ %l\\,%.%#, + \%+C%.%# + +" Explanation: +" %-G%.%#had\ compilation\ errors., - Ignore the obvious. +" %-G%.%#syntax\ OK, - Don't include the 'a-okay' message. +" %m\ at\ %f\ line\ %l., - Most errors... +" %+A%.%#\ at\ %f\ line\ %l\\,%.%#, - As above, including ', near ...' +" %+C%.%# - ... Which can be multi-line. + +let &cpo = s:savecpo +unlet s:savecpo diff --git a/runtime/compiler/php.vim b/runtime/compiler/php.vim new file mode 100644 index 0000000..92f93b8 --- /dev/null +++ b/runtime/compiler/php.vim @@ -0,0 +1,26 @@ +" Vim compiler file +" Compiler: PHP CLI +" Maintainer: Doug Kearns <dougkearns@gmail.com> +" Last Change: 2013 Jun 25 + +if exists("current_compiler") + finish +endif +let current_compiler = "php" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +let s:cpo_save = &cpo +set cpo-=C + +CompilerSet makeprg=php\ -lq +CompilerSet errorformat=%E<b>%.%#Parse\ error</b>:\ %m\ in\ <b>%f</b>\ on\ line\ <b>%l</b><br\ />, + \%W<b>%.%#Notice</b>:\ %m\ in\ <b>%f</b>\ on\ line\ <b>%l</b><br\ />, + \%E%.%#Parse\ error:\ %m\ in\ %f\ on\ line\ %l, + \%W%.%#Notice:\ %m\ in\ %f\ on\ line\ %l, + \%-G%.%# + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/compiler/pylint.vim b/runtime/compiler/pylint.vim new file mode 100644 index 0000000..93079ce --- /dev/null +++ b/runtime/compiler/pylint.vim @@ -0,0 +1,16 @@ +" Vim compiler file +" Compiler: Pylint for Python +" Maintainer: Daniel Moch <daniel@danielmoch.com> +" Last Change: 2016 May 20 + +if exists("current_compiler") + finish +endif +let current_compiler = "pylint" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +CompilerSet makeprg=pylint\ --output-format=text\ --msg-template=\"{path}:{line}:{column}:{C}:\ [{symbol}]\ {msg}\"\ --reports=no +CompilerSet errorformat=%A%f:%l:%c:%t:\ %m,%A%f:%l:\ %m,%A%f:(%l):\ %m,%-Z%p^%.%#,%-G%.%# diff --git a/runtime/compiler/pyunit.vim b/runtime/compiler/pyunit.vim new file mode 100644 index 0000000..2a4ea92 --- /dev/null +++ b/runtime/compiler/pyunit.vim @@ -0,0 +1,16 @@ +" Vim compiler file +" Compiler: Unit testing tool for Python +" Maintainer: Max Ischenko <mfi@ukr.net> +" Last Change: 2004 Mar 27 + +if exists("current_compiler") + finish +endif +let current_compiler = "pyunit" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +CompilerSet efm=%C\ %.%#,%A\ \ File\ \"%f\"\\,\ line\ %l%.%#,%Z%[%^\ ]%\\@=%m + diff --git a/runtime/compiler/rake.vim b/runtime/compiler/rake.vim new file mode 100644 index 0000000..3d11a31 --- /dev/null +++ b/runtime/compiler/rake.vim @@ -0,0 +1,40 @@ +" Vim compiler file +" Language: Rake +" Maintainer: Tim Pope <vimNOSPAM@tpope.org> +" URL: https://github.com/vim-ruby/vim-ruby +" Release Coordinator: Doug Kearns <dougkearns@gmail.com> +" Last Change: 2018 Mar 02 + +if exists("current_compiler") + finish +endif +let current_compiler = "rake" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +let s:cpo_save = &cpo +set cpo-=C + +CompilerSet makeprg=rake + +CompilerSet errorformat= + \%D(in\ %f), + \%\\s%#%\\d%#:%#\ %#from\ %f:%l:%m, + \%\\s%#%\\d%#:%#\ %#from\ %f:%l:, + \%\\s%##\ %f:%l:%m%\\&%.%#%\\D:%\\d%\\+:%.%#, + \%\\s%##\ %f:%l%\\&%.%#%\\D:%\\d%\\+, + \%\\s%#[%f:%l:\ %#%m%\\&%.%#%\\D:%\\d%\\+:%.%#, + \%\\s%#%f:%l:\ %#%m%\\&%.%#%\\D:%\\d%\\+:%.%#, + \%\\s%#%f:%l:, + \%m\ [%f:%l]:, + \%+Erake\ aborted!, + \%+EDon't\ know\ how\ to\ build\ task\ %.%#, + \%+Einvalid\ option:%.%#, + \%+Irake\ %\\S%\\+%\\s%\\+#\ %.%# + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: nowrap sw=2 sts=2 ts=8: diff --git a/runtime/compiler/rspec.vim b/runtime/compiler/rspec.vim new file mode 100644 index 0000000..0cfce04 --- /dev/null +++ b/runtime/compiler/rspec.vim @@ -0,0 +1,36 @@ +" Vim compiler file +" Language: RSpec +" Maintainer: Tim Pope <vimNOSPAM@tpope.org> +" URL: https://github.com/vim-ruby/vim-ruby +" Release Coordinator: Doug Kearns <dougkearns@gmail.com> +" Last Change: 2018 Aug 07 + +if exists("current_compiler") + finish +endif +let current_compiler = "rspec" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +let s:cpo_save = &cpo +set cpo-=C + +CompilerSet makeprg=rspec + +CompilerSet errorformat= + \%f:%l:\ %tarning:\ %m, + \%E%.%#:in\ `load':\ %f:%l:%m, + \%E%f:%l:in\ `%*[^']':\ %m, + \%-Z\ \ \ \ \ %\\+\#\ %f:%l:%.%#, + \%E\ \ \ \ \ Failure/Error:\ %m, + \%E\ \ \ \ \ Failure/Error:, + \%C\ \ \ \ \ %m, + \%C%\\s%#, + \%-G%.%# + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: nowrap sw=2 sts=2 ts=8: diff --git a/runtime/compiler/rst.vim b/runtime/compiler/rst.vim new file mode 100644 index 0000000..392bea6 --- /dev/null +++ b/runtime/compiler/rst.vim @@ -0,0 +1,32 @@ +" Vim compiler file +" Compiler: sphinx >= 1.0.8, http://www.sphinx-doc.org +" Description: reStructuredText Documentation Format +" Previous Maintainer: Nikolai Weibull <now@bitwi.se> +" Latest Revision: 2017-03-31 + +if exists("current_compiler") + finish +endif +let current_compiler = "rst" + +let s:cpo_save = &cpo +set cpo&vim + +if exists(":CompilerSet") != 2 + command -nargs=* CompilerSet setlocal <args> +endif + +CompilerSet errorformat= + \%f\\:%l:\ %tEBUG:\ %m, + \%f\\:%l:\ %tNFO:\ %m, + \%f\\:%l:\ %tARNING:\ %m, + \%f\\:%l:\ %tRROR:\ %m, + \%f\\:%l:\ %tEVERE:\ %m, + \%f\\:%s:\ %tARNING:\ %m, + \%f\\:%s:\ %tRROR:\ %m, + \%D%*\\a[%*\\d]:\ Entering\ directory\ `%f', + \%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f', + \%DMaking\ %*\\a\ in\ %f + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/compiler/ruby.vim b/runtime/compiler/ruby.vim new file mode 100644 index 0000000..82d4d1c --- /dev/null +++ b/runtime/compiler/ruby.vim @@ -0,0 +1,45 @@ +" Vim compiler file +" Language: Ruby +" Function: Syntax check and/or error reporting +" Maintainer: Tim Pope <vimNOSPAM@tpope.org> +" URL: https://github.com/vim-ruby/vim-ruby +" Release Coordinator: Doug Kearns <dougkearns@gmail.com> +" Last Change: 2019 Jan 06 + +if exists("current_compiler") + finish +endif +let current_compiler = "ruby" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +let s:cpo_save = &cpo +set cpo-=C + +" default settings runs script normally +" add '-c' switch to run syntax check only: +" +" CompilerSet makeprg=ruby\ -c +" +" or add '-c' at :make command line: +" +" :make -c %<CR> +" +CompilerSet makeprg=ruby + +CompilerSet errorformat= + \%+E%f:%l:\ parse\ error, + \%W%f:%l:\ warning:\ %m, + \%E%f:%l:in\ %*[^:]:\ %m, + \%E%f:%l:\ %m, + \%-C%\t%\\d%#:%#\ %#from\ %f:%l:in\ %.%#, + \%-Z%\t%\\d%#:%#\ %#from\ %f:%l, + \%-Z%p^, + \%-G%.%# + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: nowrap sw=2 sts=2 ts=8: diff --git a/runtime/compiler/rubyunit.vim b/runtime/compiler/rubyunit.vim new file mode 100644 index 0000000..48e8fa4 --- /dev/null +++ b/runtime/compiler/rubyunit.vim @@ -0,0 +1,36 @@ +" Vim compiler file +" Language: Test::Unit - Ruby Unit Testing Framework +" Maintainer: Doug Kearns <dougkearns@gmail.com> +" URL: https://github.com/vim-ruby/vim-ruby +" Release Coordinator: Doug Kearns <dougkearns@gmail.com> +" Last Change: 2014 Mar 23 + +if exists("current_compiler") + finish +endif +let current_compiler = "rubyunit" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +let s:cpo_save = &cpo +set cpo-=C + +CompilerSet makeprg=testrb +" CompilerSet makeprg=ruby\ -Itest +" CompilerSet makeprg=m + +CompilerSet errorformat=\%W\ %\\+%\\d%\\+)\ Failure:, + \%C%m\ [%f:%l]:, + \%E\ %\\+%\\d%\\+)\ Error:, + \%C%m:, + \%C\ \ \ \ %f:%l:%.%#, + \%C%m, + \%Z\ %#, + \%-G%.%# + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: nowrap sw=2 sts=2 ts=8: diff --git a/runtime/compiler/rustc.vim b/runtime/compiler/rustc.vim new file mode 100644 index 0000000..c27bdc9 --- /dev/null +++ b/runtime/compiler/rustc.vim @@ -0,0 +1,46 @@ +" Vim compiler file +" Compiler: Rust Compiler +" Maintainer: Chris Morgan <me@chrismorgan.info> +" Latest Revision: 2013 Jul 12 +" For bugs, patches and license go to https://github.com/rust-lang/rust.vim + +if exists("current_compiler") + finish +endif +let current_compiler = "rustc" + +let s:cpo_save = &cpo +set cpo&vim + +if exists(":CompilerSet") != 2 + command -nargs=* CompilerSet setlocal <args> +endif + +if exists("g:rustc_makeprg_no_percent") && g:rustc_makeprg_no_percent != 0 + CompilerSet makeprg=rustc +else + CompilerSet makeprg=rustc\ \% +endif + +" Old errorformat (before nightly 2016/08/10) +CompilerSet errorformat= + \%f:%l:%c:\ %t%*[^:]:\ %m, + \%f:%l:%c:\ %*\\d:%*\\d\ %t%*[^:]:\ %m, + \%-G%f:%l\ %s, + \%-G%*[\ ]^, + \%-G%*[\ ]^%*[~], + \%-G%*[\ ]... + +" New errorformat (after nightly 2016/08/10) +CompilerSet errorformat+= + \%-G, + \%-Gerror:\ aborting\ %.%#, + \%-Gerror:\ Could\ not\ compile\ %.%#, + \%Eerror:\ %m, + \%Eerror[E%n]:\ %m, + \%Wwarning:\ %m, + \%Inote:\ %m, + \%C\ %#-->\ %f:%l:%c + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/compiler/sass.vim b/runtime/compiler/sass.vim new file mode 100644 index 0000000..9c540ac --- /dev/null +++ b/runtime/compiler/sass.vim @@ -0,0 +1,30 @@ +" Vim compiler file +" Compiler: Sass +" Maintainer: Tim Pope <vimNOSPAM@tpope.org> +" Last Change: 2016 Aug 29 + +if exists("current_compiler") + finish +endif +let current_compiler = "sass" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +let s:cpo_save = &cpo +set cpo-=C + +CompilerSet makeprg=sass + +CompilerSet errorformat= + \%f:%l:%m\ (Sass::Syntax%trror), + \%ESyntax\ %trror:%m, + \%C%\\s%\\+on\ line\ %l\ of\ %f, + \%Z%.%#, + \%-G%.%# + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim:set sw=2 sts=2: diff --git a/runtime/compiler/se.vim b/runtime/compiler/se.vim new file mode 100644 index 0000000..38fd10c --- /dev/null +++ b/runtime/compiler/se.vim @@ -0,0 +1,30 @@ +" Vim compiler file +" Compiler: se (Liberty Eiffel Compiler) +" Maintainer: Doug Kearns <dougkearns@gmail.com> +" Last Change: 2013 Jun 29 + +if exists("current_compiler") + finish +endif +let current_compiler = "se" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +let s:cpo_save = &cpo +set cpo-=C + +CompilerSet makeprg=se\ c + +CompilerSet errorformat=%W******\ Warning:\ %m, + \%E******\ Fatal\ Error:\ %m, + \%E******\ Error:\ %m, + \%ZLine\ %l\ column\ %c\ in\ %.%#\ (%f)\ %\\=:, + \%ZLine\ %l\ columns\ %c\\,\ %\\d%\\+\ %.%#\ (%f)\ %\\=:, + \%+C%*[^\ ]%.%#, + \%-GThe\ source\ lines\ involved, + \%-G%.%# + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/compiler/splint.vim b/runtime/compiler/splint.vim new file mode 100644 index 0000000..6239ca7 --- /dev/null +++ b/runtime/compiler/splint.vim @@ -0,0 +1,71 @@ +" Vim compiler file +" Compiler: splint/lclint (C source code checker) +" Maintainer: Ralf Wildenhues <Ralf.Wildenhues@gmx.de> +" Splint Home: http://www.splint.org/ +" Last Change: 2005 Apr 21 +" $Revision: 1.3 $ + +if exists("current_compiler") + finish +endif +let current_compiler = "splint" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +let s:cpo_save = &cpo +set cpo-=C + +" adapt this if you want to check more than one file at a time. +" put command line options in .splintrc or ~/.splintrc +CompilerSet makeprg=splint\ % + +" Note: when using the new array bounds checking flags: Each warning +" usually has several lines and several references to source code mostly +" within one or two lines (see sample warning below). The easiest way +" not to mess up file name detection and not to jump to all positions is +" to add something like +" -linelen 500 +boundscompacterrormessages +" to your .splintrc and 'set cmdheight=4' or more. +" TODO: reliable way to distinguish file names and constraints. +" +" sample warning (generic): +" +"foo.c:1006:12: Clauses exit with var referencing local storage in one +" case, fresh storage in other case +" foo.c:1003:2: Fresh storage var allocated +" +" sample warning (bounds checking): +" +"bounds.c: (in function updateEnv) +"bounds.c:10:5: Possible out-of-bounds store: +" strcpy(str, tmp) +" Unable to resolve constraint: +" requires maxSet(str @ bounds.c:10:13) >= maxRead(getenv("MYENV") @ +" bounds.c:6:9) +" needed to satisfy precondition: +" requires maxSet(str @ bounds.c:10:13) >= maxRead(tmp @ bounds.c:10:18) +" derived from strcpy precondition: requires maxSet(<parameter 1>) >= +" maxRead(<parameter 2>) +" A memory write may write to an address beyond the allocated buffer. (Use +" -boundswrite to inhibit warning) + +CompilerSet errorformat=%OLCLint*m, + \%OSplint*m, + \%f(%l\\,%c):\ %m, + \%*[\ ]%f:%l:%c:\ %m, + \%*[\ ]%f:%l:\ %m, + \%*[^\"]\"%f\"%*\\D%l:\ %m, + \\"%f\"%*\\D%l:\ %m, + \%A%f:%l:%c:\ %m, + \%A%f:%l:%m, + \\"%f\"\\, + \\ line\ %l%*\\D%c%*[^\ ]\ %m, + \%D%*\\a[%*\\d]:\ Entering\ directory\ `%f', + \%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f', + \%DMaking\ %*\\a\ in\ %f, + \%C\ %#%m + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/compiler/stack.vim b/runtime/compiler/stack.vim new file mode 100644 index 0000000..4236b4c --- /dev/null +++ b/runtime/compiler/stack.vim @@ -0,0 +1,37 @@ +" Vim compiler file +" Compiler: Haskell Stack +" Maintainer: Daniel Campoverde <alx@sillybytes.net> +" Latest Revision: 2018-08-27 + +if exists("current_compiler") + finish +endif +let current_compiler = "stack" + +let s:cpo_save = &cpo +set cpo&vim + + +CompilerSet errorformat= + \%-G%.%#:\ build\ %.%#, + \%-G%.%#:\ configure\ %.%#, + \%-G[%.%#]%.%#, + \%-G%.%#preprocessing\ %.%#, + \%-G%.%#configuring\ %.%#, + \%-G%.%#building\ %.%#, + \%-G%.%#linking\ %.%#, + \%-G%.%#installing\ %.%#, + \%-G%.%#registering\ %.%#, + \%-G%.%#:\ copy/register%.%#, + \%-G%.%#process\ exited\ %.%#, + \%-G%.%#--builddir=%.%#, + \%-G--%.%#, + \%-G%.%#\|%.%#, + \%E%f:%l:%c:\ error:,%+Z\ \ \ \ %m, + \%E%f:%l:%c:\ error:\ %m,%-Z, + \%W%f:%l:%c:\ warning:,%+Z\ \ \ \ %m, + \%W%f:%l:%c:\ warning:\ %m,%-Z, + + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/compiler/tcl.vim b/runtime/compiler/tcl.vim new file mode 100644 index 0000000..81af185 --- /dev/null +++ b/runtime/compiler/tcl.vim @@ -0,0 +1,17 @@ +" Vim compiler file +" Compiler: tcl +" Maintainer: Doug Kearns <dougkearns@gmail.com> +" Last Change: 2004 Nov 27 + +if exists("current_compiler") + finish +endif +let current_compiler = "tcl" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +CompilerSet makeprg=tcl + +CompilerSet errorformat=%EError:\ %m,%+Z\ %\\{4}(file\ \"%f\"\ line\ %l),%-G%.%# diff --git a/runtime/compiler/tex.vim b/runtime/compiler/tex.vim new file mode 100644 index 0000000..e43be8d --- /dev/null +++ b/runtime/compiler/tex.vim @@ -0,0 +1,67 @@ +" Vim compiler file +" Compiler: TeX +" Maintainer: Artem Chuprina <ran@ran.pp.ru> +" Last Change: 2012 Apr 30 + +if exists("current_compiler") + finish +endif +let s:keepcpo= &cpo +set cpo&vim + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +" If makefile exists and we are not asked to ignore it, we use standard make +" (do not redefine makeprg) +if exists('b:tex_ignore_makefile') || exists('g:tex_ignore_makefile') || + \(!filereadable('Makefile') && !filereadable('makefile')) + " If buffer-local variable 'tex_flavor' exists, it defines TeX flavor, + " otherwize the same for global variable with same name, else it will be + " LaTeX + if exists("b:tex_flavor") + let current_compiler = b:tex_flavor + elseif exists("g:tex_flavor") + let current_compiler = g:tex_flavor + else + let current_compiler = "latex" + endif + let &l:makeprg=current_compiler.' -interaction=nonstopmode' +else + let current_compiler = 'make' +endif + +" Value errorformat are taken from vim help, see :help errorformat-LaTeX, with +" addition from Srinath Avadhanula <srinath@fastmail.fm> +CompilerSet errorformat=%E!\ LaTeX\ %trror:\ %m, + \%E!\ %m, + \%+WLaTeX\ %.%#Warning:\ %.%#line\ %l%.%#, + \%+W%.%#\ at\ lines\ %l--%*\\d, + \%WLaTeX\ %.%#Warning:\ %m, + \%Cl.%l\ %m, + \%+C\ \ %m., + \%+C%.%#-%.%#, + \%+C%.%#[]%.%#, + \%+C[]%.%#, + \%+C%.%#%[{}\\]%.%#, + \%+C<%.%#>%.%#, + \%C\ \ %m, + \%-GSee\ the\ LaTeX%m, + \%-GType\ \ H\ <return>%m, + \%-G\ ...%.%#, + \%-G%.%#\ (C)\ %.%#, + \%-G(see\ the\ transcript%.%#), + \%-G\\s%#, + \%+O(%*[^()])%r, + \%+O%*[^()](%*[^()])%r, + \%+P(%f%r, + \%+P\ %\\=(%f%r, + \%+P%*[^()](%f%r, + \%+P[%\\d%[^()]%#(%f%r, + \%+Q)%r, + \%+Q%*[^()])%r, + \%+Q[%\\d%*[^()])%r + +let &cpo = s:keepcpo +unlet s:keepcpo diff --git a/runtime/compiler/tidy.vim b/runtime/compiler/tidy.vim new file mode 100644 index 0000000..75be8b8 --- /dev/null +++ b/runtime/compiler/tidy.vim @@ -0,0 +1,19 @@ +" Vim compiler file +" Compiler: HTML Tidy +" Maintainer: Doug Kearns <dougkearns@gmail.com> +" Last Change: 2016 Apr 21 + +if exists("current_compiler") + finish +endif +let current_compiler = "tidy" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +CompilerSet makeprg=tidy\ -quiet\ -errors\ --gnu-emacs\ yes\ %:S + +" foo.html:8:1: Warning: inserting missing 'foobar' element +" foo.html:9:2: Error: <foobar> is not recognized! +CompilerSet errorformat=%f:%l:%c:\ %trror:%m,%f:%l:%c:\ %tarning:%m,%-G%.%# diff --git a/runtime/compiler/xbuild.vim b/runtime/compiler/xbuild.vim new file mode 100644 index 0000000..b508a46 --- /dev/null +++ b/runtime/compiler/xbuild.vim @@ -0,0 +1,22 @@ +" Vim compiler file +" Compiler: Mono C# +" Maintainer: Chiel ten Brinke (ctje92@gmail.com) +" Last Change: 2013 May 13 + +if exists("current_compiler") + finish +endif + +let current_compiler = "xbuild" +let s:keepcpo= &cpo +set cpo&vim + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +CompilerSet errorformat=\ %#%f(%l\\\,%c):\ %m +CompilerSet makeprg=xbuild\ /nologo\ /v:q\ /property:GenerateFullPaths=true + +let &cpo = s:keepcpo +unlet s:keepcpo diff --git a/runtime/compiler/xmllint.vim b/runtime/compiler/xmllint.vim new file mode 100644 index 0000000..96cfa55 --- /dev/null +++ b/runtime/compiler/xmllint.vim @@ -0,0 +1,26 @@ +" Vim compiler file +" Compiler: xmllint +" Maintainer: Doug Kearns <dougkearns@gmail.com> +" Last Change: 2013 Jul 8 + +if exists("current_compiler") + finish +endif +let current_compiler = "xmllint" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +let s:cpo_save = &cpo +set cpo-=C + +CompilerSet makeprg=xmllint\ --valid\ --noout + +CompilerSet errorformat=%+E%f:%l:\ %.%#\ error\ :\ %m, + \%+W%f:%l:\ %.%#\ warning\ :\ %m, + \%-Z%p^, + \%-G%.%# + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/compiler/xmlwf.vim b/runtime/compiler/xmlwf.vim new file mode 100644 index 0000000..cd2e2bb --- /dev/null +++ b/runtime/compiler/xmlwf.vim @@ -0,0 +1,23 @@ +" Vim Compiler File +" Compiler: xmlwf +" Maintainer: Robert Rowsome <rowsome@wam.umd.edu> +" Last Change: 2004 Mar 27 + +if exists("current_compiler") + finish +endif +let current_compiler = "xmlwf" + +let s:cpo_save = &cpo +set cpo&vim + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +CompilerSet makeprg=xmlwf\ % + +CompilerSet errorformat=%f:%l%c:%m + +let &cpo = s:cpo_save +unlet s:cpo_save |