From 1f0dc50da689da784f2db2ac87061fb172437771 Mon Sep 17 00:00:00 2001 From: Maksim Pecherskiy Date: Tue, 2 Jul 2013 21:17:21 -0500 Subject: [PATCH 01/23] updating. --- .../vim-indent-object/doc/indent-object.txt | 240 +++++++++--------- 1 file changed, 120 insertions(+), 120 deletions(-) diff --git a/sources_non_forked/vim-indent-object/doc/indent-object.txt b/sources_non_forked/vim-indent-object/doc/indent-object.txt index 5b581020..bcb02299 100644 --- a/sources_non_forked/vim-indent-object/doc/indent-object.txt +++ b/sources_non_forked/vim-indent-object/doc/indent-object.txt @@ -1,120 +1,120 @@ -*indent-object.txt* Text objects based on indent levels. - - Copyright (c) 2010 Michael Smith - -Indent Text Objects - -INTRODUCTION |idntobj-introduction| -TEXT OBJECTS |idntobj-objects| -BLANK LINES |idntobj-blanklines| -ABOUT |idntobj-about| - - -============================================================================== -INTRODUCTION *idntobj-introduction* - -Vim text objects provide a convenient way to select and operate on various -types of objects. These objects include regions surrounded by various types of -brackets and various parts of language (ie sentences, paragraphs, etc). - -This plugin defines a new text object, based on indentation levels. This is -very useful in languages such as Python, in which the syntax defines scope in -terms of indentation. Using the objects defined in this plugin, an entire if -structure can be quickly selected, for example. - - -============================================================================== -TEXT OBJECTS *ai* *ii* *aI* *iI* *idntobj-objects* - -This plugin defines two new text objects. These are very similar - they differ -only in whether they include the line below the block or not. - - Key Mapping Description ~ -> - ai (A)n (I)ndentation level and line above. - ii (I)nner (I)ndentation level (no line above). - aI (A)n (I)ndentation level and lines above/below. - iI (I)nner (I)ndentation level (no lines above/below). -< - -Note that the iI mapping is mostly included simply for completeness, it is -effectively a synonym for ii. - -Just like regular text objects, these mappings can be used either with -operators expecting a motion, such as 'd' or 'c', as well as in visual mode. -In visual mode the mapping can be repeated, which has the effect of -iteratively increasing the scope of indentation block selected. Specifying a -count can be used to achieve the same effect. - -The difference between |ai| and |aI| is that |ai| includes the line -immediately above the indentation block, whereas aI includes not only that, -but also the line below. Which of these is most useful largely depends on the -structure of the language being edited. - -For example, when editing the Python code, |ai| is generally more useful, as -the line above the indentation block is usually related to it. For example, in -the following code (* is used to indicate the cursor position): -> - if foo > 3: - log("foo is big") * - foo = 3 - do_something_else() -< -the if clause is logically related to the code block, whereas the function -call below is not. It is unlikely we would want to select the line below when -we are interested in the if block. - -However, in other languages, such as Vim scripts, control structures are -usually terminated with something like 'endif'. Therefore, in this example: -> - if foo > 3 - echo "foo is big" * - let foo = 3 - endif - call do_something_else() -< -we would more likely want to include the endif when we select the if -structure. - - -============================================================================== -BLANK LINES *idntobj-blanklines* - -When scanning code blocks, the plugin usually ignores blank lines. There is an -exception to this, however, when the block being selected is not indented. In -this case if blank lines are ignored, then the entire file would be selected. -Instead when code at the top level is being indented blank lines are -considered to delimit the block. - - -============================================================================== -ABOUT *idntobj-about* - -vim-indent-object was written by Michael Smith . The -project repository is kept at: - -http://github.com/michaeljsmith/vim-indent-object - -Any feedback or criticism is welcome, and can be mailed to the author at the -above email address. Alternatively issues can be raised on the project -website. - -Licence: - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -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. +*indent-object.txt* Text objects based on indent levels. + + Copyright (c) 2010 Michael Smith + +Indent Text Objects + +INTRODUCTION |idntobj-introduction| +TEXT OBJECTS |idntobj-objects| +BLANK LINES |idntobj-blanklines| +ABOUT |idntobj-about| + + +============================================================================== +INTRODUCTION *idntobj-introduction* + +Vim text objects provide a convenient way to select and operate on various +types of objects. These objects include regions surrounded by various types of +brackets and various parts of language (ie sentences, paragraphs, etc). + +This plugin defines a new text object, based on indentation levels. This is +very useful in languages such as Python, in which the syntax defines scope in +terms of indentation. Using the objects defined in this plugin, an entire if +structure can be quickly selected, for example. + + +============================================================================== +TEXT OBJECTS *ai* *ii* *aI* *iI* *idntobj-objects* + +This plugin defines two new text objects. These are very similar - they differ +only in whether they include the line below the block or not. + + Key Mapping Description ~ +> + ai (A)n (I)ndentation level and line above. + ii (I)nner (I)ndentation level (no line above). + aI (A)n (I)ndentation level and lines above/below. + iI (I)nner (I)ndentation level (no lines above/below). +< + +Note that the iI mapping is mostly included simply for completeness, it is +effectively a synonym for ii. + +Just like regular text objects, these mappings can be used either with +operators expecting a motion, such as 'd' or 'c', as well as in visual mode. +In visual mode the mapping can be repeated, which has the effect of +iteratively increasing the scope of indentation block selected. Specifying a +count can be used to achieve the same effect. + +The difference between |ai| and |aI| is that |ai| includes the line +immediately above the indentation block, whereas aI includes not only that, +but also the line below. Which of these is most useful largely depends on the +structure of the language being edited. + +For example, when editing the Python code, |ai| is generally more useful, as +the line above the indentation block is usually related to it. For example, in +the following code (* is used to indicate the cursor position): +> + if foo > 3: + log("foo is big") * + foo = 3 + do_something_else() +< +the if clause is logically related to the code block, whereas the function +call below is not. It is unlikely we would want to select the line below when +we are interested in the if block. + +However, in other languages, such as Vim scripts, control structures are +usually terminated with something like 'endif'. Therefore, in this example: +> + if foo > 3 + echo "foo is big" * + let foo = 3 + endif + call do_something_else() +< +we would more likely want to include the endif when we select the if +structure. + + +============================================================================== +BLANK LINES *idntobj-blanklines* + +When scanning code blocks, the plugin usually ignores blank lines. There is an +exception to this, however, when the block being selected is not indented. In +this case if blank lines are ignored, then the entire file would be selected. +Instead when code at the top level is being indented blank lines are +considered to delimit the block. + + +============================================================================== +ABOUT *idntobj-about* + +vim-indent-object was written by Michael Smith . The +project repository is kept at: + +http://github.com/michaeljsmith/vim-indent-object + +Any feedback or criticism is welcome, and can be mailed to the author at the +above email address. Alternatively issues can be raised on the project +website. + +Licence: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +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. From 426bce4fdd6ebe285165d3886a180242f2009983 Mon Sep 17 00:00:00 2001 From: Maksim Pecherskiy Date: Thu, 26 Dec 2013 15:55:29 -0600 Subject: [PATCH 02/23] Updating extended.vim/ --- vimrcs/extended.vim | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/vimrcs/extended.vim b/vimrcs/extended.vim index 6373d424..3b452d68 100644 --- a/vimrcs/extended.vim +++ b/vimrcs/extended.vim @@ -1,5 +1,5 @@ """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" Important: +" Important: " This requries that you install https://github.com/amix/vimrc ! " """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" @@ -42,7 +42,7 @@ autocmd! bufwritepost vimrc source ~/.vim_runtime/my_configs.vim """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" => Turn persistent undo on +" => Turn persistent undo on " means that you can undo even when you close a buffer/VIM """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" try @@ -62,7 +62,7 @@ cno $j e ./ cno $c e eCurrentFileDir("e") " $q is super useful when browsing on the command line -" it deletes everything until the last slash +" it deletes everything until the last slash cno $q eDeleteTillSlash() " Bash like keys for the command line @@ -90,13 +90,13 @@ vnoremap $q `>a'` vnoremap $e `>a"` " Map auto complete of (, ", ', [ -inoremap $1 ()i -inoremap $2 []i -inoremap $3 {}i -inoremap $4 {o}O -inoremap $q ''i -inoremap $e ""i -inoremap $t <>i +"inoremap $1 ()i +"inoremap $2 []i +"inoremap $3 {}i +"inoremap $4 {o}O +"inoremap $q ''i +"inoremap $e ""i +"inoremap $t <>i """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" @@ -130,7 +130,7 @@ func! DeleteTillSlash() else let g:cmd_edited = substitute(g:cmd, "\\(.*\[/\]\\).*/", "\\1", "") endif - endif + endif return g:cmd_edited endfunc From 17b77b08b152a9707f7bd698cd5b5d52486fff5c Mon Sep 17 00:00:00 2001 From: Maksim Pecherskiy Date: Mon, 24 Feb 2014 22:22:30 -0400 Subject: [PATCH 03/23] Adding submodules and stuff. --- maximum_awesome_vimrc | 114 ++++ sources_forked/molokai | 1 + sources_non_forked/syntastic/.gitignore | 4 + sources_non_forked/syntastic/CONTRIBUTING.md | 49 ++ sources_non_forked/syntastic/LICENCE | 13 + sources_non_forked/syntastic/README.markdown | 175 ++++++ .../syntastic/_assets/screenshot_1.png | Bin 0 -> 92425 bytes .../syntastic/autoload/syntastic/c.vim | 239 ++++++++ .../syntastic/autoload/syntastic/makeprg.vim | 50 ++ .../autoload/syntastic/postprocess.vim | 58 ++ .../syntastic/autoload/syntastic/util.vim | 201 ++++++ .../syntastic/doc/syntastic.txt | 455 ++++++++++++++ .../syntastic/plugin/syntastic.vim | 423 +++++++++++++ .../plugin/syntastic/autoloclist.vim | 38 ++ .../syntastic/plugin/syntastic/balloons.vim | 64 ++ .../syntastic/plugin/syntastic/checker.vim | 79 +++ .../syntastic/plugin/syntastic/cursor.vim | 63 ++ .../plugin/syntastic/highlighting.vim | 66 ++ .../syntastic/plugin/syntastic/loclist.vim | 173 ++++++ .../plugin/syntastic/makeprg_builder.vim | 72 +++ .../syntastic/plugin/syntastic/modemap.vim | 67 ++ .../syntastic/plugin/syntastic/notifiers.vim | 55 ++ .../syntastic/plugin/syntastic/registry.vim | 213 +++++++ .../syntastic/plugin/syntastic/signs.vim | 149 +++++ .../syntastic/syntax_checkers/ada/gcc.vim | 168 +++++ .../applescript/osacompile.vim | 50 ++ .../syntax_checkers/c/checkpatch.vim | 48 ++ .../syntastic/syntax_checkers/c/gcc.vim | 183 ++++++ .../syntastic/syntax_checkers/c/make.vim | 65 ++ .../syntastic/syntax_checkers/c/oclint.vim | 58 ++ .../syntastic/syntax_checkers/c/sparse.vim | 51 ++ .../syntastic/syntax_checkers/c/splint.vim | 57 ++ .../syntastic/syntax_checkers/c/ycm.vim | 32 + .../syntastic/syntax_checkers/co/coco.vim | 44 ++ .../syntax_checkers/coffee/coffee.vim | 48 ++ .../syntax_checkers/coffee/coffeelint.vim | 38 ++ .../syntastic/syntax_checkers/coq/coqtop.vim | 40 ++ .../syntastic/syntax_checkers/cpp/cpplint.vim | 65 ++ .../syntastic/syntax_checkers/cpp/gcc.vim | 179 ++++++ .../syntastic/syntax_checkers/cpp/oclint.vim | 36 ++ .../syntastic/syntax_checkers/cpp/ycm.vim | 34 ++ .../syntastic/syntax_checkers/cs/mcs.vim | 39 ++ .../syntastic/syntax_checkers/css/csslint.vim | 54 ++ .../syntastic/syntax_checkers/css/phpcs.vim | 33 + .../syntax_checkers/css/prettycss.vim | 62 ++ .../syntax_checkers/cucumber/cucumber.vim | 42 ++ .../syntastic/syntax_checkers/cuda/nvcc.vim | 72 +++ .../syntastic/syntax_checkers/d/dmd.vim | 177 ++++++ .../syntax_checkers/dart/dart_analyzer.vim | 66 ++ .../syntax_checkers/docbk/xmllint.vim | 30 + .../syntax_checkers/elixir/elixir.vim | 45 ++ .../syntax_checkers/erlang/erlang.vim | 51 ++ .../erlang/erlang_check_file.erl | 34 ++ .../syntastic/syntax_checkers/eruby/ruby.vim | 65 ++ .../syntax_checkers/fortran/gfortran.vim | 63 ++ .../syntastic/syntax_checkers/go/go.vim | 75 +++ .../syntastic/syntax_checkers/go/gofmt.vim | 42 ++ .../syntastic/syntax_checkers/go/golint.vim | 37 ++ .../syntastic/syntax_checkers/go/govet.vim | 40 ++ .../syntastic/syntax_checkers/haml/haml.vim | 45 ++ .../syntax_checkers/haskell/ghc-mod.vim | 47 ++ .../syntax_checkers/haskell/hdevtools.vim | 46 ++ .../syntax_checkers/haskell/hlint.vim | 38 ++ .../syntastic/syntax_checkers/haxe/haxe.vim | 52 ++ .../syntastic/syntax_checkers/hss/hss.vim | 38 ++ .../syntastic/syntax_checkers/html/tidy.vim | 174 ++++++ .../syntax_checkers/html/validator.vim | 78 +++ .../syntax_checkers/html/validator_decode.awk | 61 ++ .../syntastic/syntax_checkers/html/w3.vim | 65 ++ .../syntax_checkers/java/checkstyle.vim | 60 ++ .../syntastic/syntax_checkers/java/javac.vim | 366 +++++++++++ .../javascript/closurecompiler.vim | 66 ++ .../syntax_checkers/javascript/gjslint.vim | 46 ++ .../syntax_checkers/javascript/jshint.vim | 55 ++ .../syntax_checkers/javascript/jsl.vim | 56 ++ .../syntax_checkers/javascript/jslint.vim | 53 ++ .../syntax_checkers/json/jsonlint.vim | 43 ++ .../syntax_checkers/json/jsonval.vim | 40 ++ .../syntax_checkers/less/less-lint.coffee | 41 ++ .../syntax_checkers/less/less-lint.js | 57 ++ .../syntastic/syntax_checkers/less/lessc.vim | 61 ++ .../syntastic/syntax_checkers/lisp/clisp.vim | 47 ++ .../syntastic/syntax_checkers/llvm/llvm.vim | 38 ++ .../syntastic/syntax_checkers/lua/luac.vim | 64 ++ .../syntax_checkers/matlab/mlint.vim | 41 ++ .../syntastic/syntax_checkers/nasm/nasm.vim | 38 ++ .../syntax_checkers/nroff/mandoc.vim | 41 ++ .../syntastic/syntax_checkers/objc/gcc.vim | 184 ++++++ .../syntastic/syntax_checkers/objc/oclint.vim | 36 ++ .../syntastic/syntax_checkers/objc/ycm.vim | 34 ++ .../syntastic/syntax_checkers/objcpp/gcc.vim | 184 ++++++ .../syntax_checkers/objcpp/oclint.vim | 36 ++ .../syntastic/syntax_checkers/objcpp/ycm.vim | 34 ++ .../syntax_checkers/ocaml/camlp4o.vim | 149 +++++ .../syntax_checkers/perl/efm_perl.pl | 186 ++++++ .../syntastic/syntax_checkers/perl/perl.vim | 71 +++ .../syntax_checkers/perl/perlcritic.vim | 65 ++ .../syntax_checkers/perl/podchecker.vim | 30 + .../syntastic/syntax_checkers/php/php.vim | 52 ++ .../syntastic/syntax_checkers/php/phpcs.vim | 44 ++ .../syntastic/syntax_checkers/php/phpmd.vim | 78 +++ .../syntax_checkers/pod/podchecker.vim | 51 ++ .../syntax_checkers/puppet/puppet.vim | 52 ++ .../syntax_checkers/puppet/puppetlint.vim | 47 ++ .../syntax_checkers/python/flake8.vim | 44 ++ .../syntastic/syntax_checkers/python/pep8.vim | 46 ++ .../syntax_checkers/python/py3kwarn.vim | 31 + .../syntax_checkers/python/pyflakes.vim | 63 ++ .../syntax_checkers/python/pylama.vim | 53 ++ .../syntax_checkers/python/pylint.vim | 43 ++ .../syntax_checkers/python/python.vim | 43 ++ .../syntax_checkers/rst/rst2pseudoxml.vim | 62 ++ .../syntastic/syntax_checkers/ruby/jruby.vim | 52 ++ .../syntax_checkers/ruby/macruby.vim | 43 ++ .../syntastic/syntax_checkers/ruby/mri.vim | 77 +++ .../syntax_checkers/ruby/rubocop.vim | 55 ++ .../syntastic/syntax_checkers/rust/rustc.vim | 42 ++ .../syntastic/syntax_checkers/sass/sass.vim | 78 +++ .../syntastic/syntax_checkers/scala/fsc.vim | 46 ++ .../syntax_checkers/scala/scalac.vim | 43 ++ .../syntastic/syntax_checkers/scss/sass.vim | 31 + .../syntax_checkers/sh/checkbashisms.vim | 45 ++ .../syntastic/syntax_checkers/sh/sh.vim | 83 +++ .../syntastic/syntax_checkers/slim/slimrb.vim | 57 ++ .../syntax_checkers/tcl/nagelfar.vim | 42 ++ .../syntastic/syntax_checkers/tex/chktex.vim | 62 ++ .../syntastic/syntax_checkers/tex/lacheck.vim | 37 ++ .../syntax_checkers/text/atdtool.vim | 57 ++ .../syntax_checkers/twig/twiglint.vim | 43 ++ .../syntax_checkers/typescript/tsc.vim | 33 + .../syntastic/syntax_checkers/vala/valac.vim | 74 +++ .../syntastic/syntax_checkers/vhdl/ghdl.vim | 37 ++ .../syntastic/syntax_checkers/xhtml/tidy.vim | 89 +++ .../syntastic/syntax_checkers/xml/xmllint.vim | 52 ++ .../syntax_checkers/xslt/xmllint.vim | 30 + .../syntastic/syntax_checkers/yaml/jsyaml.vim | 42 ++ .../syntax_checkers/z80/z80syntaxchecker.vim | 41 ++ .../syntastic/syntax_checkers/zpt/zptlint.vim | 50 ++ .../syntastic/syntax_checkers/zsh/zsh.vim | 38 ++ sources_non_forked/vim-easymotion/.gitignore | 1 + sources_non_forked/vim-easymotion/README.md | 52 ++ .../vim-easymotion/autoload/EasyMotion.vim | 573 ++++++++++++++++++ .../vim-easymotion/doc/easymotion.txt | 319 ++++++++++ .../vim-easymotion/plugin/EasyMotion.vim | 73 +++ .../vim-indent-object/doc/indent-object.txt | 240 ++++---- sources_non_forked/vim-marked | 1 + sources_non_forked/vim-misc | 1 + sources_non_forked/vim-notes | 1 + sources_non_forked/vim-ruby | 1 + sources_non_forked/vim-trailing-whitespace | 1 + 150 files changed, 11141 insertions(+), 120 deletions(-) create mode 100644 maximum_awesome_vimrc create mode 160000 sources_forked/molokai create mode 100644 sources_non_forked/syntastic/.gitignore create mode 100644 sources_non_forked/syntastic/CONTRIBUTING.md create mode 100644 sources_non_forked/syntastic/LICENCE create mode 100644 sources_non_forked/syntastic/README.markdown create mode 100644 sources_non_forked/syntastic/_assets/screenshot_1.png create mode 100644 sources_non_forked/syntastic/autoload/syntastic/c.vim create mode 100644 sources_non_forked/syntastic/autoload/syntastic/makeprg.vim create mode 100644 sources_non_forked/syntastic/autoload/syntastic/postprocess.vim create mode 100644 sources_non_forked/syntastic/autoload/syntastic/util.vim create mode 100644 sources_non_forked/syntastic/doc/syntastic.txt create mode 100644 sources_non_forked/syntastic/plugin/syntastic.vim create mode 100644 sources_non_forked/syntastic/plugin/syntastic/autoloclist.vim create mode 100644 sources_non_forked/syntastic/plugin/syntastic/balloons.vim create mode 100644 sources_non_forked/syntastic/plugin/syntastic/checker.vim create mode 100644 sources_non_forked/syntastic/plugin/syntastic/cursor.vim create mode 100644 sources_non_forked/syntastic/plugin/syntastic/highlighting.vim create mode 100644 sources_non_forked/syntastic/plugin/syntastic/loclist.vim create mode 100644 sources_non_forked/syntastic/plugin/syntastic/makeprg_builder.vim create mode 100644 sources_non_forked/syntastic/plugin/syntastic/modemap.vim create mode 100644 sources_non_forked/syntastic/plugin/syntastic/notifiers.vim create mode 100644 sources_non_forked/syntastic/plugin/syntastic/registry.vim create mode 100644 sources_non_forked/syntastic/plugin/syntastic/signs.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/ada/gcc.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/applescript/osacompile.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/c/checkpatch.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/c/gcc.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/c/make.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/c/oclint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/c/sparse.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/c/splint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/c/ycm.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/co/coco.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/coffee/coffee.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/coffee/coffeelint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/coq/coqtop.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/cpp/cpplint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/cpp/gcc.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/cpp/oclint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/cpp/ycm.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/cs/mcs.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/css/csslint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/css/phpcs.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/css/prettycss.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/cucumber/cucumber.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/cuda/nvcc.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/d/dmd.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/dart/dart_analyzer.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/docbk/xmllint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/elixir/elixir.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/erlang/erlang.vim create mode 100755 sources_non_forked/syntastic/syntax_checkers/erlang/erlang_check_file.erl create mode 100644 sources_non_forked/syntastic/syntax_checkers/eruby/ruby.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/fortran/gfortran.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/go/go.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/go/gofmt.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/go/golint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/go/govet.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/haml/haml.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/haskell/ghc-mod.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/haskell/hdevtools.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/haskell/hlint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/haxe/haxe.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/hss/hss.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/html/tidy.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/html/validator.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/html/validator_decode.awk create mode 100644 sources_non_forked/syntastic/syntax_checkers/html/w3.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/java/checkstyle.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/java/javac.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/javascript/closurecompiler.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/javascript/gjslint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/javascript/jshint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/javascript/jsl.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/javascript/jslint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/json/jsonlint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/json/jsonval.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/less/less-lint.coffee create mode 100644 sources_non_forked/syntastic/syntax_checkers/less/less-lint.js create mode 100644 sources_non_forked/syntastic/syntax_checkers/less/lessc.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/lisp/clisp.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/llvm/llvm.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/lua/luac.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/matlab/mlint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/nasm/nasm.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/nroff/mandoc.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/objc/gcc.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/objc/oclint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/objc/ycm.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/objcpp/gcc.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/objcpp/oclint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/objcpp/ycm.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/ocaml/camlp4o.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/perl/efm_perl.pl create mode 100644 sources_non_forked/syntastic/syntax_checkers/perl/perl.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/perl/perlcritic.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/perl/podchecker.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/php/php.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/php/phpcs.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/php/phpmd.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/pod/podchecker.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/puppet/puppet.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/puppet/puppetlint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/python/flake8.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/python/pep8.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/python/py3kwarn.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/python/pyflakes.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/python/pylama.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/python/pylint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/python/python.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/rst/rst2pseudoxml.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/ruby/jruby.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/ruby/macruby.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/ruby/mri.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/ruby/rubocop.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/rust/rustc.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/sass/sass.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/scala/fsc.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/scala/scalac.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/scss/sass.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/sh/checkbashisms.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/sh/sh.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/slim/slimrb.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/tcl/nagelfar.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/tex/chktex.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/tex/lacheck.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/text/atdtool.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/twig/twiglint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/typescript/tsc.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/vala/valac.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/vhdl/ghdl.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/xhtml/tidy.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/xml/xmllint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/xslt/xmllint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/yaml/jsyaml.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/z80/z80syntaxchecker.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/zpt/zptlint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/zsh/zsh.vim create mode 100644 sources_non_forked/vim-easymotion/.gitignore create mode 100644 sources_non_forked/vim-easymotion/README.md create mode 100644 sources_non_forked/vim-easymotion/autoload/EasyMotion.vim create mode 100644 sources_non_forked/vim-easymotion/doc/easymotion.txt create mode 100644 sources_non_forked/vim-easymotion/plugin/EasyMotion.vim create mode 160000 sources_non_forked/vim-marked create mode 160000 sources_non_forked/vim-misc create mode 160000 sources_non_forked/vim-notes create mode 160000 sources_non_forked/vim-ruby create mode 160000 sources_non_forked/vim-trailing-whitespace diff --git a/maximum_awesome_vimrc b/maximum_awesome_vimrc new file mode 100644 index 00000000..f040e9bd --- /dev/null +++ b/maximum_awesome_vimrc @@ -0,0 +1,114 @@ +" set up pathogen, https://github.com/tpope/vim-pathogen +filetype on " without this vim emits a zero exit status, later, because of :ft off +filetype off +call pathogen#infect() +filetype plugin indent on + +" don't bother with vi compatibility +set nocompatible + +" enable syntax highlighting +syntax enable + +set autoindent +set autoread " reload files when changed on disk, i.e. via `git checkout` +set backspace=2 " Fix broken backspace in some setups +set backupcopy=yes " see :help crontab +set clipboard=unnamed " yank and paste with the system clipboard +set directory-=. " don't store swapfiles in the current directory +set encoding=utf-8 +set expandtab " expand tabs to spaces +set ignorecase " case-insensitive search +set incsearch " search as you type +set laststatus=2 " always show statusline +set list " show trailing whitespace +set listchars=tab:▸\ ,trail:▫ +set number " show line numbers +set ruler " show where you are +set scrolloff=3 " show context above/below cursorline +set shiftwidth=2 " normal mode indentation commands use 2 spaces +set showcmd +set smartcase " case-sensitive search if any caps +set softtabstop=2 " insert mode tab and backspace use 2 spaces +set tabstop=8 " actual tabs occupy 8 characters +set wildignore=log/**,node_modules/**,target/**,tmp/**,*.rbc +set wildmenu " show a navigable menu for tab completion +set wildmode=longest,list,full + +" Enable basic mouse behavior such as resizing buffers. +set mouse=a +if exists('$TMUX') " Support resizing in tmux + set ttymouse=xterm2 +endif + +" keyboard shortcuts +let mapleader = ',' +map h +map j +map k +map l +map l :Align +nmap a :Ack +nmap b :CtrlPBuffer +nmap d :NERDTreeToggle +nmap f :NERDTreeFind +nmap t :CtrlP +nmap T :CtrlPClearCache:CtrlP +nmap ] :TagbarToggle +nmap :call whitespace#strip_trailing() +nmap g :GitGutterToggle +nmap c Kwbd +map V :source ~/.vimrc:filetype detect:exe ":echo 'vimrc reloaded'" + +" plugin settings +let g:ctrlp_match_window = 'order:ttb,max:20' +let g:NERDSpaceDelims=1 +let g:gitgutter_enabled = 0 + +" Use The Silver Searcher https://github.com/ggreer/the_silver_searcher +if executable('ag') + let g:ackprg = 'ag --nogroup --column' + + " Use Ag over Grep + set grepprg=ag\ --nogroup\ --nocolor + + " Use ag in CtrlP for listing files. Lightning fast and respects .gitignore + let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""' +endif + +" fdoc is yaml +autocmd BufRead,BufNewFile *.fdoc set filetype=yaml +" md is markdown +autocmd BufRead,BufNewFile *.md set filetype=markdown +" extra rails.vim help +autocmd User Rails silent! Rnavcommand decorator app/decorators -glob=**/* -suffix=_decorator.rb +autocmd User Rails silent! Rnavcommand observer app/observers -glob=**/* -suffix=_observer.rb +autocmd User Rails silent! Rnavcommand feature features -glob=**/* -suffix=.feature +autocmd User Rails silent! Rnavcommand job app/jobs -glob=**/* -suffix=_job.rb +autocmd User Rails silent! Rnavcommand mediator app/mediators -glob=**/* -suffix=_mediator.rb +autocmd User Rails silent! Rnavcommand stepdefinition features/step_definitions -glob=**/* -suffix=_steps.rb +" automatically rebalance windows on vim resize +autocmd VimResized * :wincmd = + +" Fix Cursor in TMUX +if exists('$TMUX') + let &t_SI = "\Ptmux;\\]50;CursorShape=1\x7\\\" + let &t_EI = "\Ptmux;\\]50;CursorShape=0\x7\\\" +else + let &t_SI = "\]50;CursorShape=1\x7" + let &t_EI = "\]50;CursorShape=0\x7" +endif + +" Go crazy! +if filereadable(expand("~/.vimrc.local")) + " In your .vimrc.local, you might like: + " + " set autowrite + " set nocursorline + " set nowritebackup + " set whichwrap+=<,>,h,l,[,] " Wrap arrow keys between lines + " + " autocmd! bufwritepost .vimrc source ~/.vimrc + " noremap! jj + source ~/.vimrc.local +endif diff --git a/sources_forked/molokai b/sources_forked/molokai new file mode 160000 index 00000000..fd2e0b6a --- /dev/null +++ b/sources_forked/molokai @@ -0,0 +1 @@ +Subproject commit fd2e0b6a0ee4561c457bbd9db7f72e1ecc6a5a19 diff --git a/sources_non_forked/syntastic/.gitignore b/sources_non_forked/syntastic/.gitignore new file mode 100644 index 00000000..cc07c931 --- /dev/null +++ b/sources_non_forked/syntastic/.gitignore @@ -0,0 +1,4 @@ +*~ +*.swp +tags +.DS_Store diff --git a/sources_non_forked/syntastic/CONTRIBUTING.md b/sources_non_forked/syntastic/CONTRIBUTING.md new file mode 100644 index 00000000..764ffffc --- /dev/null +++ b/sources_non_forked/syntastic/CONTRIBUTING.md @@ -0,0 +1,49 @@ +# Bug reports / Github issues + +When reporting a bug make sure you search the existing github issues for the +same/similar issues. If you find one, feel free to add a `+1` comment with any +additional information that may help us solve the issue. + +When creating a new issue be sure to state the following: + +* Steps to reproduce the bug. +* The version of vim you are using. +* The version of syntastic you are using. + +For syntax checker bugs also state the version of the checker executable that you are using. + +# Submitting a patch + +* Fork the repo on github +* Make a [topic branch](https://github.com/dchelimsky/rspec/wiki/Topic-Branches#using-topic-branches-when-contributing-patches) and start hacking +* Submit a pull request based off your topic branch + +Small focused patches are preferred. + +Large changes to the code should be discussed with the core team first. Create an issue and explain your plan and see what we say. + +# General style notes + +Following the coding conventions/styles used in the syntastic core: + +* Use 4 space indents. +* Don't use abbreviated keywords - e.g. use `endfunction`, not `endfun` (there's always room for more fun!). +* Don't use `l:` prefixes for variables unless actually required (i.e. almost never). +* Code for maintainability. We would rather a function be a couple of lines longer and have (for example) some [explaining variables](http://www.refactoring.com/catalog/introduceExplainingVariable.html) to aid readability. + +# Syntax checker style notes + +The preferred style for error format strings is one "clause" per line. E.g. +(from the coffeelint checker): + +```viml +let errorformat = '%E%f:%l:%c: %trror: %m,' . + \ 'Syntax%trror: In %f\, %m on line %l,' . + \ '%EError: In %f\, Parse error on line %l: %m,' . + \ '%EError: In %f\, %m on line %l,' . + \ '%W%f(%l): lint warning: %m,' . + \ '%W%f(%l): warning: %m,' . + \ '%E%f(%l): SyntaxError: %m,' . + \ '%-Z%p^,' . + \ '%-G%.%#' +``` diff --git a/sources_non_forked/syntastic/LICENCE b/sources_non_forked/syntastic/LICENCE new file mode 100644 index 00000000..8b1a9d81 --- /dev/null +++ b/sources_non_forked/syntastic/LICENCE @@ -0,0 +1,13 @@ + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + +Copyright (C) 2004 Sam Hocevar + +Everyone is permitted to copy and distribute verbatim or modified +copies of this license document, and changing it is allowed as long +as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/sources_non_forked/syntastic/README.markdown b/sources_non_forked/syntastic/README.markdown new file mode 100644 index 00000000..d7492750 --- /dev/null +++ b/sources_non_forked/syntastic/README.markdown @@ -0,0 +1,175 @@ + , + / \,,_ .'| + ,{{| /}}}}/_.' _____________________________________________ + }}}}` '{{' '. / \ + {{{{{ _ ;, \ / Ladies and Gentlemen, \ + ,}}}}}} /o`\ ` ;) | | + {{{{{{ / ( | this is ... | + }}}}}} | \ | | + {{{{{{{{ \ \ | | + }}}}}}}}} '.__ _ | | _____ __ __ _ | + {{{{{{{{ /`._ (_\ / | / ___/__ ______ / /_____ ______/ /_(_)____ | + }}}}}}' | //___/ --=: \__ \/ / / / __ \/ __/ __ `/ ___/ __/ / ___/ | + jgs `{{{{` | '--' | ___/ / /_/ / / / / /_/ /_/ (__ ) /_/ / /__ | + }}}` | /____/\__, /_/ /_/\__/\__,_/____/\__/_/\___/ | + | /____/ | + | / + \_____________________________________________/ + + + + +Syntastic is a syntax checking plugin that runs files through external syntax +checkers and displays any resulting errors to the user. This can be done on +demand, or automatically as files are saved. If syntax errors are detected, the +user is notified and is happy because they didn't have to compile their code or +execute their script to find them. + +At the time of this writing, syntax checking plugins exist for Ada, +AppleScript, Bourne shell, C, C++, C#, CoffeeScript, Coco, Coq, CSS, +Cucumber, CUDA, D, Dart, DocBook, Elixir, Erlang, eRuby, Fortran, +Gentoo metadata, Go, Haml, Haskell, Haxe, HSS, HTML, Java, JavaScript, +JSON, LESS, LISP, LLVM intermediate language, Lua, MATLAB, NASM, +Objective-C, Objective-C++, OCaml, Perl, Perl POD, PHP, Puppet, Python, +reStructuredText, Ruby, Rust, SASS/SCSS, Scala, Slim, Tcl, TeX, +Twig, TypeScript, Vala, VHDL, xHtml, XML, XSLT, YAML, z80, Zope page +templates, zsh. + +## Screenshot + +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 +enabled. + +![Screenshot 1](https://github.com/scrooloose/syntastic/raw/master/_assets/screenshot_1.png) + +1. Errors are loaded into the location list for the corresponding window. +2. When the cursor is on a line containing an error, the error message is echoed in the command window. +3. Signs are placed beside lines with errors - note that warnings are displayed in a different color. +4. There is a configurable statusline flag you can include in your statusline config. +5. Hover the mouse over a line containing an error and the error message is displayed as a balloon. +6. (not shown) Highlighting errors with syntax highlighting. Erroneous parts of lines can be highlighted. + +## Installation + +Installing syntastic is easy but first you need to have the pathogen plugin installed. If you already +have pathogen working then skip Step 1 and go to Step 2. + +### Step 1: Install pathogen.vim + +First I'll show you how to install tpope's [pathogen.vim](https://github.com/tpope/vim-pathogen) so that +it's easy to install syntastic. Do this in your Terminal so that you get the pathogen.vim file +and the directories it needs: + + mkdir -p ~/.vim/autoload ~/.vim/bundle; \ + curl -so ~/.vim/autoload/pathogen.vim \ + https://raw.github.com/tpope/vim-pathogen/master/autoload/pathogen.vim + +Next you *need to add this* to your ~/.vimrc: + + execute pathogen#infect() + +### Step 2: Install syntastic as a pathogen bundle + +You now have pathogen installed and can put syntastic into ~/.vim/bundle like this: + + + cd ~/.vim/bundle + git clone https://github.com/scrooloose/syntastic.git + +Quit vim and start it back up to reload it, then type: + + :Helptags + +If you get an error when you do this, then you probably didn't install pathogen right. Go back to +step 1 and make sure you did the following: + +1. Created both the ~/.vim/autoload and ~/.vim/bundle directories. +2. Added the "call pathogen#infect()" line to your ~/.vimrc file +3. Did the git clone of syntastic inside ~/.vim/bundle +4. Have permissions to access all of these directories. + + +## Google group + +To get information or make suggestions check out the [google group](https://groups.google.com/group/vim-syntastic). + + +## FAQ + +__Q. I installed syntastic but it isn't reporting any errors...__ + +A. The most likely reason is that none of the syntax checkers that it requires is installed. For example: python requires either `flake8`, `pyflakes` or `pylint` to be installed and in `$PATH`. To see which executables are supported, just look in `syntax_checkers//*.vim`. Note that aliases do not work; the actual executable must be available in your `$PATH`. Symbolic links are okay. You can see syntastic's idea of available checkers by running `:SyntasticInfo`. + +Another reason it could fail is that either the command line options or the error output for a syntax checker may have changed. In this case, make sure you have the latest version of the syntax checker installed. If it still fails then create an issue - or better yet, create a pull request. + +__Q. Recently some of my syntax checker options have stopped working...__ + +A. The options are still there, they have just been renamed. Recently, almost all syntax checkers were refactored to use the new `syntastic#makeprg#build()` function. This made a lot of the old explicit options redundant - as they are now implied. The new implied options usually have slightly different names to the old options. + +e.g. Previously there was `g:syntastic_phpcs_conf`, now you must use `g:syntastic_php_phpcs_args`. + +See `:help syntastic-checker-options` for more information. + +__Q. I run a checker and the location list is not updated...__ + +A. By default, the location list is changed only when you run the `:Errors` command, in order to minimise conflicts with other plugins. If you want the location list to always be updated when you run the checkers, add this line to your vimrc: +```vim +let g:syntastic_always_populate_loc_list=1 +``` + +__Q. How can I pass additional arguments to a checker?__ + +A. Almost all syntax checkers use the `syntastic#makeprg#build()` function. Those checkers that do can be configured using global variables. The general form of the global args variables are: +```vim +syntastic___args +``` + +So, If you wanted to pass "--my --args --here" to the ruby mri checker you would add this line to your vimrc: +```vim +let g:syntastic_ruby_mri_args="--my --args --here" +``` + +See `:help syntastic-checker-options` for more information. + +__Q. Syntastic supports several checkers for my filetype - how do I tell it which one(s) to use?__ + +A. Stick a line like this in your vimrc: +```vim +let g:syntastic__checkers=[''] +``` + +To see the list of checkers for your filetype, look in `syntax_checkers//`. + +e.g. Python has the following checkers: `flake8`, `pyflakes`, `pylint` and a native `python` checker. + +To tell syntastic to use `pylint`, you would use this setting: +```vim +let g:syntastic_python_checkers=['pylint'] +``` + +Some filetypes, like PHP, have style checkers as well as syntax checkers. These can be chained together like this: +```vim +let g:syntastic_php_checkers=['php', 'phpcs', 'phpmd'] +``` + +This is telling syntastic to run the `php` checker first, and if no errors are found, run `phpcs`, and then `phpmd`. + +__Q. How can I jump between the different errors without using the location list at the bottom of the window?__ + +A. Vim provides several built in commands for this. See `:help :lnext` and `:help :lprev`. + +If you use these commands a lot then you may want to add shortcut mappings to your vimrc, or install something like [unimpaired](https://github.com/tpope/vim-unimpaired), which provides such mappings (among other things). + +__Q. A syntax checker is giving me unwanted/strange style tips?__ + +A. Some filetypes (e.g. php) have style checkers as well as syntax checkers. You can usually configure the options that are passed to the style checkers, or just disable them. Take a look at the [wiki](https://github.com/scrooloose/syntastic/wiki/Syntaxcheckers) to see what options are available. + +__Q. The error window is closed automatically when I :quit the current buffer but not when I :bdelete it?__ + +A. There is no safe way to handle that situation automatically, but you can work around it: + +```vim +nnoremap :lclose:bdelete +cabbrev bd lclose\|bdelete +``` diff --git a/sources_non_forked/syntastic/_assets/screenshot_1.png b/sources_non_forked/syntastic/_assets/screenshot_1.png new file mode 100644 index 0000000000000000000000000000000000000000..c1b69f4ba26a2092aa4e9d42d2fa3ee08c6ab28a GIT binary patch literal 92425 zcmcF~byQSc6fcT^l&GYnN_T@ah?Gb>fOL1m5E6r+(jcI8cXxLq9Rmz7bPe4M4e#pr zeeb=s-dpSa^%iSjxHIRTbN1cw`|Y!Lkg}o-E*2>k3JMCYoa{SQ6ckij6qE;3kI{iE zYX*iO;LihRRhhRaCBx)fz(43l@-pvG?*IIxHRnbHS1=u9KRKhIVB`OJJwQoFA^|R9 zxX39;VZd?7@G;q=YL>Q9P+p?Qy_5LpKD#^b=7oQD-*yDk9dFit&)8Vxhcn~J7--Wy zG*bNdbzmL8--@)#JG2)}C8fc>54lWA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=%Qj&)S}c4lzW z-g9RVA(dIhHIg3D!|-B~Vn5~Lp4ri1Ths`u1@Au>M|~3hHG^h_+oixpCO4okV+W&Q zbkvK{Q6#dnZ-#aGJ7-|E03I{wQwHPnXV%qJNkQ /tmp/output +" +"To generate this you would call: +" +" let makeprg = syntastic#makeprg#build({ +" \ 'exe': 'ruby', +" \ 'args': '-a -b -c', +" \ 'post_args': '--more --args', +" \ 'tail': '> /tmp/output', +" \ 'filetype': 'ruby', +" \ 'subchecker': 'mri' }) +" +"Note that the current filename is added by default - but can be overridden by +"passing in an 'fname' arg. +" +"Arguments 'filetype' and 'subchecker' are mandatory, handling of composite +"types and user-defined variables breaks if you omit them. +" +"All other options can be overriden by the user with global variables - even +"when not specified by the checker in syntastic#makeprg#build(). +" +"E.g. They could override the checker exe with +" +" let g:syntastic_ruby_mri_exe="another_ruby_checker_exe.rb" +" +"The general form of the override option is: +" syntastic_[filetype]_[subchecker]_[option-name] +" +function! syntastic#makeprg#build(opts) + let builder = g:SyntasticMakeprgBuilder.New( + \ get(a:opts, 'exe', ''), + \ get(a:opts, 'args', ''), + \ get(a:opts, 'fname', ''), + \ get(a:opts, 'post_args', ''), + \ get(a:opts, 'tail', ''), + \ get(a:opts, 'filetype', ''), + \ get(a:opts, 'subchecker', '') ) + + return builder.makeprg() +endfunction diff --git a/sources_non_forked/syntastic/autoload/syntastic/postprocess.vim b/sources_non_forked/syntastic/autoload/syntastic/postprocess.vim new file mode 100644 index 00000000..188a28a4 --- /dev/null +++ b/sources_non_forked/syntastic/autoload/syntastic/postprocess.vim @@ -0,0 +1,58 @@ +if exists("g:loaded_syntastic_postprocess_autoload") + finish +endif +let g:loaded_syntastic_postprocess_autoload = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! s:compareErrorItems(a, b) + if a:a['bufnr'] != a:b['bufnr'] + " group by files + return a:a['bufnr'] - a:b['bufnr'] + elseif a:a['lnum'] != a:b['lnum'] + return a:a['lnum'] - a:b['lnum'] + elseif a:a['type'] !=? a:b['type'] + " errors take precedence over warnings + return a:a['type'] ==? 'e' ? -1 : 1 + else + return get(a:a, 'col') - get(a:b, 'col') + endif +endfunction + +" natural sort +function! syntastic#postprocess#sort(errors) + return sort(a:errors, 's:compareErrorItems') +endfunction + +function syntastic#postprocess#compressWhitespace(errors) + let llist = [] + + for e in a:errors + let e['text'] = substitute(e['text'], '\n', ' ', 'g') + let e['text'] = substitute(e['text'], '\s\{2,}', ' ', 'g') + call add(llist, e) + endfor + + return llist +endfunction + +" remove spurious CR under Cygwin +function! syntastic#postprocess#cygwinRemoveCR(errors) + if has('win32unix') + let llist = [] + + for e in a:errors + let e['text'] = substitute(e['text'], '\r', '', 'g') + call add(llist, e) + endfor + else + let llist = a:errors + endif + + return llist +endfunction + +let &cpo = s:save_cpo +unlet s:save_cpo +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/autoload/syntastic/util.vim b/sources_non_forked/syntastic/autoload/syntastic/util.vim new file mode 100644 index 00000000..b569bc18 --- /dev/null +++ b/sources_non_forked/syntastic/autoload/syntastic/util.vim @@ -0,0 +1,201 @@ +if exists("g:loaded_syntastic_util_autoload") + finish +endif +let g:loaded_syntastic_util_autoload = 1 + +let s:save_cpo = &cpo +set cpo&vim + +if !exists("g:syntastic_debug") + let g:syntastic_debug = 0 +endif + +let s:deprecationNoticesIssued = [] + +function! syntastic#util#DevNull() + if has('win32') + return 'NUL' + endif + return '/dev/null' +endfunction + +"search the first 5 lines of the file for a magic number and return a map +"containing the args and the executable +" +"e.g. +" +"#!/usr/bin/perl -f -bar +" +"returns +" +"{'exe': '/usr/bin/perl', 'args': ['-f', '-bar']} +function! syntastic#util#parseShebang() + for lnum in range(1,5) + let line = getline(lnum) + + if line =~ '^#!' + let exe = matchstr(line, '^#!\s*\zs[^ \t]*') + let args = split(matchstr(line, '^#!\s*[^ \t]*\zs.*')) + return {'exe': exe, 'args': args} + endif + endfor + + return {'exe': '', 'args': []} +endfunction + +" Run 'command' in a shell and parse output as a version string. +" Returns an array of version components. +function! syntastic#util#parseVersion(command) + return split(matchstr( system(a:command), '\v^\D*\zs\d+(\.\d+)+\ze' ), '\.') +endfunction + +" Verify that the 'installed' version is at least the 'required' version. +" +" 'installed' and 'required' must be arrays. If they have different lengths, +" the "missing" elements will be assumed to be 0 for the purposes of checking. +" +" See http://semver.org for info about version numbers. +function! syntastic#util#versionIsAtLeast(installed, required) + for index in range(max([len(a:installed), len(a:required)])) + if len(a:installed) <= index + let installed_element = 0 + else + let installed_element = a:installed[index] + endif + if len(a:required) <= index + let required_element = 0 + else + let required_element = a:required[index] + endif + if installed_element != required_element + return installed_element > required_element + endif + endfor + " Everything matched, so it is at least the required version. + return 1 +endfunction + +"print as much of a:msg as possible without "Press Enter" prompt appearing +function! syntastic#util#wideMsg(msg) + let old_ruler = &ruler + let old_showcmd = &showcmd + + "convert tabs to spaces so that the tabs count towards the window width + "as the proper amount of characters + let msg = substitute(a:msg, "\t", repeat(" ", &tabstop), "g") + let msg = strpart(msg, 0, winwidth(0)-1) + + "This is here because it is possible for some error messages to begin with + "\n which will cause a "press enter" prompt. I have noticed this in the + "javascript:jshint checker and have been unable to figure out why it + "happens + let msg = substitute(msg, "\n", "", "g") + + set noruler noshowcmd + redraw + + echo msg + + let &ruler=old_ruler + let &showcmd=old_showcmd +endfunction + +" Check whether a buffer is loaded, listed, and not hidden +function! syntastic#util#bufIsActive(buffer) + " convert to number, or hell breaks loose + let buf = str2nr(a:buffer) + + if !bufloaded(buf) || !buflisted(buf) + return 0 + endif + + " get rid of hidden buffers + for tab in range(1, tabpagenr('$')) + if index(tabpagebuflist(tab), buf) >= 0 + return 1 + endif + endfor + + return 0 +endfunction + +" start in directory a:where and walk up the parent folders until it +" finds a file matching a:what; return path to that file +function! syntastic#util#findInParent(what, where) + let here = fnamemodify(a:where, ':p') + + while !empty(here) + let p = split(globpath(here, a:what), '\n') + + if !empty(p) + return fnamemodify(p[0], ':p') + elseif here == '/' + break + endif + + " we use ':h:h' rather than ':h' since ':p' adds a trailing '/' + " if 'here' is a directory + let here = fnamemodify(here, ':p:h:h') + endwhile + + return '' +endfunction + +" Returns unique elements in a list +function! syntastic#util#unique(list) + let seen = {} + let uniques = [] + for e in a:list + if !has_key(seen, e) + let seen[e] = 1 + call add(uniques, e) + endif + endfor + return uniques +endfunction + +" A less noisy shellescape() +function! syntastic#util#shescape(string) + return a:string =~ '\m^[A-Za-z0-9_/.-]\+$' ? a:string : shellescape(a:string, 1) +endfunction + +" A less noisy shellescape(expand()) +function! syntastic#util#shexpand(string) + return syntastic#util#shescape(escape(expand(a:string), '|')) +endfunction + +function! syntastic#util#debug(msg) + if g:syntastic_debug + echomsg "syntastic: debug: " . a:msg + endif +endfunction + +function! syntastic#util#info(msg) + echomsg "syntastic: info: " . a:msg +endfunction + +function! syntastic#util#warn(msg) + echohl WarningMsg + echomsg "syntastic: warning: " . a:msg + echohl None +endfunction + +function! syntastic#util#error(msg) + execute "normal \" + echohl ErrorMsg + echomsg "syntastic: error: " . a:msg + echohl None +endfunction + +function! syntastic#util#deprecationWarn(msg) + if index(s:deprecationNoticesIssued, a:msg) >= 0 + return + endif + + call add(s:deprecationNoticesIssued, a:msg) + call syntastic#util#warn(a:msg) +endfunction + +let &cpo = s:save_cpo +unlet s:save_cpo +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/doc/syntastic.txt b/sources_non_forked/syntastic/doc/syntastic.txt new file mode 100644 index 00000000..0c95ab7c --- /dev/null +++ b/sources_non_forked/syntastic/doc/syntastic.txt @@ -0,0 +1,455 @@ +*syntastic.txt* Syntax checking on the fly has never been so pimp. +*syntastic* + + + It's a bird! It's a plane! ZOMG It's ... ~ + + _____ __ __ _ ~ + / ___/__ ______ / /_____ ______/ /_(_)____ ~ + \__ \/ / / / __ \/ __/ __ `/ ___/ __/ / ___/ ~ + ___/ / /_/ / / / / /_/ /_/ (__ ) /_/ / /__ ~ + /____/\__, /_/ /_/\__/\__,_/____/\__/_/\___/ ~ + /____/ ~ + + + + Reference Manual~ + + +============================================================================== +CONTENTS *syntastic-contents* + + 1.Intro...................................|syntastic-intro| + 2.Functionality provided..................|syntastic-functionality| + 2.1.The statusline flag...............|syntastic-statusline-flag| + 2.2.Error signs.......................|syntastic-error-signs| + 2.3.Error window......................|syntastic-error-window| + 3.Commands................................|syntastic-commands| + 4.Global Options..........................|syntastic-global-options| + 5.Checker Options.........................|syntastic-checker-options| + 6.About...................................|syntastic-about| + 7.License.................................|syntastic-license| + + +============================================================================== +1. Intro *syntastic-intro* + +Note: This doc only deals with using syntastic. To learn how to write syntax +checker integrations, see the guide on the github wiki: + + https://github.com/scrooloose/syntastic/wiki/Syntax-Checker-Guide + +Syntastic is a syntax checking plugin that runs files through external syntax +checkers. This can be done on demand, or automatically as files are saved and +opened. If syntax errors are detected, the user is notified and is happy +because they didn't have to compile their code or execute their script to find +them. + +Syntastic comes in two parts: the syntax checker plugins, and the core. The +syntax checker plugins are defined on a per-filetype basis where each one wraps +up an external syntax checking program. The core script delegates off to these +plugins and uses their output to provide the syntastic functionality. + +Take a look in the syntax_checkers directory for a list of supported filetypes +and checkers. + + +============================================================================== +2. Functionality provided *syntastic-functionality* + +Syntax checking can be done automatically or on demand (see +|'syntastic_mode_map'| for configuring this). + +When syntax checking is done, the features below can be used to notify the +user of errors. See |syntastic-options| for how to configure and +activate/deactivate these features. + + * A statusline flag + * Signs beside lines with errors + * The |location-list| can be populated with the errors for the associated + buffer. + * Erroneous parts of lines can be highlighted (this functionality is only + provided by some syntax checkers). + * Balloons (if compiled in) can be used to display error messages for + erroneous lines when hovering the mouse over them. + + +------------------------------------------------------------------------------ +2.1. The statusline flag *syntastic-statusline-flag* + +To use the statusline flag, this must appear in your |'statusline'| setting > + %{SyntasticStatuslineFlag()} +< +Something like this could be more useful: > + set statusline+=%#warningmsg# + set statusline+=%{SyntasticStatuslineFlag()} + set statusline+=%* +< +When syntax errors are detected a flag will be shown. The content of the flag +is derived from the |syntastic_stl_format| option +------------------------------------------------------------------------------ +2.2. Error signs *syntastic-error-signs* + +Syntastic uses the |:sign| commands to mark lines with errors and warnings in +the sign column. To enable this feature, use the |'syntastic_enable_signs'| +option. + +Signs are colored using the Error and Todo syntax highlight groups by default. +If you wish to customize the colors for the signs, you can use the following +groups: + SyntasticErrorSign - For syntax errors, links to 'error' by default + SyntasticWarningSign - For syntax warnings, links to 'todo' by default + SyntasticStyleErrorSign - For style errors, links to 'SyntasticErrorSign' + by default + SyntasticStyleWarningSign - For style warnings, links to + 'SyntasticWarningSign' by default + +Example: > + highlight SyntasticErrorSign guifg=white guibg=red +< +To set up highlighting for the line where a sign resides, you can use the +following highlight groups: + SyntasticErrorLine + SyntasticWarningLine + SyntasticStyleErrorLine - Links to 'SyntasticErrorLine' by default + SyntasticStyleWarningLine - Links to 'SyntasticWarningLine' by default + +Example: > + highlight SyntasticErrorLine guibg=#2f0000 +< + +------------------------------------------------------------------------------ +2.3. The error window *:Errors* *syntastic-error-window* + +You can use the :Errors command to display the errors for the current buffer +in the |location-list|. + +Note that when you use :Errors, the current location list is overwritten with +Syntastic's own location list. + + +============================================================================== +3. Commands *syntastic-commands* + +:Errors *:SyntasticErrors* + +When errors have been detected, use this command to pop up the |location-list| +and display the error messages. + + +:SyntasticToggleMode *:SyntasticToggleMode* + +Toggles syntastic between active and passive mode. See |'syntastic_mode_map'| +for more info. + + +:SyntasticCheck *:SyntasticCheck* + +Manually cause a syntax check to be done. Useful in passive mode, or if the +current filetype is set to passive. See |'syntastic_mode_map'| for more info. + +:SyntasticInfo *:SyntasticInfo* + +Output info about what checkers are available and in use for the current +filetype. + + +============================================================================== +4. Global Options *syntastic-global-options* + + + *'syntastic_check_on_open'* +Default: 0 +If enabled, syntastic will do syntax checks when buffers are first loaded as +well as on saving > + let g:syntastic_check_on_open=1 +< + + *'syntastic_check_on_wq'* +Default: 1 +Normally syntastic runs syntax checks whenever buffers are written to disk. +If you want to skip these checks when you issue |:wq|, |:x|, and |:ZZ|, set this +variable to 0. > + let g:syntastic_check_on_wq=0 +< + + *'syntastic_echo_current_error'* +Default: 1 +If enabled, syntastic will echo the error associated with the current line to +the command window. If multiple errors are found, the first will be used. > + let g:syntastic_echo_current_error=1 +< + + *'syntastic_enable_signs'* +Default: 1 +Use this option to tell syntastic whether to use the |:sign| interface to mark +syntax errors: > + let g:syntastic_enable_signs=1 +< + + *'syntastic_error_symbol'* *'syntastic_style_error_symbol'* + *'syntastic_warning_symbol'* *'syntastic_style_warning_symbol'* +Use this option to control what the syntastic |:sign| text contains. Several +error symobls can be customized: + syntastic_error_symbol - For syntax errors, defaults to '>>' + syntastic_style_error_symbol - For style errors, defaults to 'S>' + syntastic_warning_symbol - For syntax warnings, defaults to '>>' + syntastic_style_warning_symbol - For style warnings, defaults to 'S>' + +Example: > + let g:syntastic_error_symbol='✗' + let g:syntastic_warning_symbol='⚠' +< + + *'syntastic_enable_balloons'* +Default: 1 +Use this option to tell syntastic whether to display error messages in balloons +when the mouse is hovered over erroneous lines: > + let g:syntastic_enable_balloons = 1 +< +Note that vim must be compiled with |+balloon_eval|. + + *'syntastic_enable_highlighting'* +Default: 1 +Use this option to tell syntastic whether to use syntax highlighting to mark +errors (where possible). Highlighting can be turned off with the following > + let g:syntastic_enable_highlighting = 0 +< + + *'syntastic_always_populate_loc_list'* +Default: 0 +Enable this option to tell syntastic to always stick any detected errors into +the loclist: > + let g:syntastic_always_populate_loc_list=1 +< + *'syntastic_auto_jump'* +Default: 0 +Enable this option if you want the cursor to jump to the first detected error +when saving or opening a file: > + let g:syntastic_auto_jump=1 +< + + *'syntastic_auto_loc_list'* +Default: 2 +Use this option to tell syntastic to automatically open and/or close the +|location-list| (see |syntastic-error-window|). + +When set to 0 the error window will not be opened or closed automatically. > + let g:syntastic_auto_loc_list=0 +< + +When set to 1 the error window will be automatically opened when errors are +detected, and closed when none are detected. > + let g:syntastic_auto_loc_list=1 +< +When set to 2 the error window will be automatically closed when no errors are +detected, but not opened automatically. > + let g:syntastic_auto_loc_list=2 +< + + *'syntastic_loc_list_height'* +Default: 10 +Use this option to specify the height of the location lists that syntastic +opens. > + let g:syntastic_loc_list_height=5 +< + + *'syntastic_ignore_files'* +Default: [] +Use this option to specify files that syntastic should neither check, nor +include in error lists. It has to be a list of |regular-expression| patterns. +The full paths of files (see |::p|) are matched against these patterns, and +the matches are case sensitive. Use |\c| if you need case insensitive +patterns. > + let g:syntastic_ignore_files=['^/usr/include/', '\c\.h$'] +< + + *'syntastic_filetype_map'* +Default: {} +Use this option to map non-standard filetypes to standard ones. Corresponding +checkers are mapped accordingly, which allows syntastic to check files with +non-standard filetypes: > + let g:syntastic_filetype_map = { 'latex': 'tex', + \ 'gentoo-metadata': 'xml' } +< + + *'syntastic_mode_map'* +Default: { "mode": "active", + "active_filetypes": [], + "passive_filetypes": [] } + +Use this option to fine tune when automatic syntax checking is done (or not +done). + +The option should be set to something like: > + + let g:syntastic_mode_map = { 'mode': 'active', + \ 'active_filetypes': ['ruby', 'php'], + \ 'passive_filetypes': ['puppet'] } +< + +"mode" can be mapped to one of two values - "active" or "passive". When set to +active, syntastic does automatic checking whenever a buffer is saved or +initially opened. When set to "passive" syntastic only checks when the user +calls :SyntasticCheck. + +The exceptions to these rules are defined with "active_filetypes" and +"passive_filetypes". In passive mode, automatic checks are still done +for all filetypes in the "active_filetypes" array. In active mode, +automatic checks are not done for any filetypes in the +"passive_filetypes" array. + +At runtime, the |:SyntasticToggleMode| command can be used to switch between +active and passive mode. + +If any of "mode", "active_filetypes", or "passive_filetypes" are not specified +then they will default to their default value as above. + + *'syntastic_quiet_warnings'* + +Use this option if you only care about syntax errors, not warnings. When set, +this option has the following effects: + * no |signs| appear unless there is at least one error, whereupon both + errors and warnings are displayed + * the |'syntastic_auto_loc_list'| option only pops up the error window if + there's at least one error, whereupon both errors and warnings are + displayed +> + let g:syntastic_quiet_warnings=1 +< + + *'syntastic_stl_format'* + +Default: [Syntax: line:%F (%t)] +Use this option to control what the syntastic statusline text contains. Several +magic flags are available to insert information: + %e - number of errors + %w - number of warnings + %t - total number of warnings and errors + %fe - line number of first error + %fw - line number of first warning + %F - line number of first warning or error + +Several additional flags are available to hide text under certain conditions: + %E{...} - hide the text in the brackets unless there are errors + %W{...} - hide the text in the brackets unless there are warnings + %B{...} - hide the text in the brackets unless there are both warnings AND + errors +These flags cant be nested. + +Example: > + let g:syntastic_stl_format = '[%E{Err: %fe #%e}%B{, }%W{Warn: %fw #%w}]' +< +If this format is used and the current buffer has 5 errors and 1 warning +starting on lines 20 and 10 respectively then this would appear on the +statusline: > + [Err: 20 #5, Warn: 10 #1] +< +If the buffer had 2 warnings, starting on line 5 then this would appear: > + [Warn: 5 #2] +< + *'syntastic_full_redraws'* +Default: 0 in GUI Vim and MacVim, 1 otherwise +Controls whether syntastic calls |:redraw| or |:redraw!| for screen redraws. +Changing it can in principle make screen redraws smoother, but it can also +cause screen flicker, or ghost characters. Leaving it to the default should +be safe. + + *'syntastic_debug'* +Default: 0 +Set this to 1 to enable debugging: > + let g:syntastic_debug = 1 +< +Checkers will then add debugging messages to Vim's |message-history|. You can +examine these messages with |:mes|. + + +============================================================================== +5. Checker Options *syntastic-checker-options* + +------------------------------------------------------------------------------ +5.1 Telling syntastic which checker to use. + +Stick a line like this in your vimrc: > + let g:syntastic__checkers = [''] +< +e.g. > + let g:syntastic_python_checkers = ['flake8'] +< + +There's also a per-buffer version of this setting, b:syntastic_checkers. Use +this in an autocmd to configure specific checkers for particular paths: > + autocmd FileType python if stridx(expand('%:p'), '/some/path/') == 0 | + \ let b:syntastic_checkers = ['pylint'] | endif +< + +To see the list of available checkers for your filetype, look in +`syntax_checkers//`. The names of the files here correspond to +'' above. + +e.g. Python has the following checkers: flake8, pyflakes, pylint and a +native python checker. + +Some filetypes, like PHP, have style checkers as well as syntax checkers. These +can be chained together like this: > + let g:syntastic_php_checkers=['php', 'phpcs', 'phpmd']` +< +This is telling syntastic to run the 'php' checker first, and if no errors are +found, run 'phpcs', and then 'phpmd'. + +------------------------------------------------------------------------------ +5.2 Configuring specific checkers *syntastic-config-makeprg* + +Most checkers use the 'syntastic#makeprg#build()' function and provide many +options by default - in fact you can customise every part of the command +that gets called. + +Checkers that use 'syntastic#makeprg#build()' look like this: > + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'ruby', + \ 'args': '-a -b -c', + \ 'post_args': '--more --args', + \ 'tail': '> /tmp/output', + \ 'filetype': 'ruby', + \ 'subchecker': 'mri' }) +< + +The 'filetype' and 'subchecker' parameters are mandatory. All of the other +parameters above are optional (well, you probably need at least 'exe'), and +can be overriden by setting global variables - even parameters not specified +in the call to syntastic#makeprg#build(). + +E.g. To override the checker exe above, you could do this: > + let g:syntastic_ruby_mri_exe="another_ruby_checker_exe.rb" +< +To override the args and the tail: > + let g:syntastic_ruby_mri_args="--my --args --here" + let g:syntastic_ruby_mri_tail="> /tmp/my-output-file-biatch" +< + +The general form of the override options is: > + syntastic_[filetype]_[subchecker]_[option-name] +< + +For checkers that do not use the 'syntastic#makeprg#build()' function you +will have to look at the source code of the checker in question. If there are +specific options that can be set, these are usually documented at the top of +the script. + +============================================================================== +6. About *syntastic-about* + +The core maintainers of syntastic are: + Martin Grenfell (github: scrooloose) + Gregor Uhlenheuer (github: kongo2002) + +Find the latest version of syntastic here: + http://github.com/scrooloose/syntastic + +============================================================================== +7. License *syntastic-license* + +Syntastic is released under the wtfpl. +See http://sam.zoy.org/wtfpl/COPYING. + + vim:tw=78:sw=4:ft=help:norl: diff --git a/sources_non_forked/syntastic/plugin/syntastic.vim b/sources_non_forked/syntastic/plugin/syntastic.vim new file mode 100644 index 00000000..b603149a --- /dev/null +++ b/sources_non_forked/syntastic/plugin/syntastic.vim @@ -0,0 +1,423 @@ +"============================================================================ +"File: syntastic.vim +"Description: Vim plugin for on the fly syntax checking. +"Version: 3.0.0 +"Released On: 13 April, 2013 +"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_plugin") + finish +endif +let g:loaded_syntastic_plugin = 1 + +runtime! plugin/syntastic/*.vim + +let s:running_windows = has("win16") || has("win32") + +if !exists("g:syntastic_always_populate_loc_list") + let g:syntastic_always_populate_loc_list = 0 +endif + +if !exists("g:syntastic_auto_jump") + let g:syntastic_auto_jump = 0 +endif + +if !exists("g:syntastic_quiet_warnings") + let g:syntastic_quiet_warnings = 0 +endif + +if !exists("g:syntastic_stl_format") + let g:syntastic_stl_format = '[Syntax: line:%F (%t)]' +endif + +if !exists("g:syntastic_check_on_open") + let g:syntastic_check_on_open = 0 +endif + +if !exists("g:syntastic_check_on_wq") + let g:syntastic_check_on_wq = 1 +endif + +if !exists("g:syntastic_loc_list_height") + let g:syntastic_loc_list_height = 10 +endif + +if !exists("g:syntastic_ignore_files") + let g:syntastic_ignore_files = [] +endif + +if !exists("g:syntastic_filetype_map") + let g:syntastic_filetype_map = {} +endif + +if !exists("g:syntastic_full_redraws") + let g:syntastic_full_redraws = !( has('gui_running') || has('gui_macvim')) +endif + +let s:registry = g:SyntasticRegistry.Instance() +let s:notifiers = g:SyntasticNotifiers.Instance() +let s:modemap = g:SyntasticModeMap.Instance() + +function! s:CompleteCheckerName(argLead, cmdLine, cursorPos) + let checker_names = [] + for ft in s:CurrentFiletypes() + for checker in s:registry.availableCheckersFor(ft) + call add(checker_names, checker.getName()) + endfor + endfor + return join(checker_names, "\n") +endfunction + +command! SyntasticToggleMode call s:ToggleMode() +command! -nargs=? -complete=custom,s:CompleteCheckerName SyntasticCheck call s:UpdateErrors(0, ) call s:Redraw() +command! Errors call s:ShowLocList() +command! SyntasticInfo call s:registry.echoInfoFor(s:CurrentFiletypes()) + +highlight link SyntasticError SpellBad +highlight link SyntasticWarning SpellCap + +augroup syntastic + autocmd BufReadPost * if g:syntastic_check_on_open | call s:UpdateErrors(1) | endif + autocmd BufWritePost * call s:UpdateErrors(1) + + autocmd BufWinEnter * call s:BufWinEnterHook() + + " TODO: the next autocmd should be "autocmd BufWinLeave * if empty(&bt) | lclose | endif" + " but in recent versions of Vim lclose can no longer be called from BufWinLeave + autocmd BufEnter * call s:BufEnterHook() +augroup END + +if v:version > 703 || (v:version == 703 && has('patch544')) + " QuitPre was added in Vim 7.3.544 + augroup syntastic + autocmd QuitPre * call s:QuitPreHook() + augroup END +endif + + +function! s:BufWinEnterHook() + if empty(&bt) + let loclist = g:SyntasticLoclist.current() + call s:notifiers.refresh(loclist) + endif +endfunction + +function! s:BufEnterHook() + " TODO: at this point there is no b:syntastic_loclist + let loclist = filter(getloclist(0), 'v:val["valid"] == 1') + let buffers = syntastic#util#unique(map( loclist, 'v:val["bufnr"]' )) + if &bt=='quickfix' && !empty(loclist) && empty(filter( buffers, 'syntastic#util#bufIsActive(v:val)' )) + call g:SyntasticLoclistHide() + endif +endfunction + + +function! s:QuitPreHook() + let b:syntastic_skip_checks = !g:syntastic_check_on_wq + call g:SyntasticLoclistHide() +endfunction + +"refresh and redraw all the error info for this buf when saving or reading +function! s:UpdateErrors(auto_invoked, ...) + if s:SkipFile() + return + endif + + let run_checks = !a:auto_invoked || s:modemap.allowsAutoChecking(&filetype) + if run_checks + if a:0 >= 1 + call s:CacheErrors(a:1) + else + call s:CacheErrors() + endif + end + + let loclist = g:SyntasticLoclist.current() + + if g:syntastic_always_populate_loc_list || g:syntastic_auto_jump + call setloclist(0, loclist.filteredRaw()) + if run_checks && g:syntastic_auto_jump && loclist.hasErrorsOrWarningsToDisplay() + silent! lrewind + endif + endif + + call s:notifiers.refresh(loclist) +endfunction + +"clear the loc list for the buffer +function! s:ClearCache() + call s:notifiers.reset(g:SyntasticLoclist.current()) + unlet! b:syntastic_loclist +endfunction + +function! s:CurrentFiletypes() + return split(&filetype, '\.') +endfunction + +"detect and cache all syntax errors in this buffer +function! s:CacheErrors(...) + call s:ClearCache() + let newLoclist = g:SyntasticLoclist.New([]) + + if !s:SkipFile() + let active_checkers = 0 + for ft in s:CurrentFiletypes() + if a:0 + let checker = s:registry.getChecker(ft, a:1) + let checkers = !empty(checker) ? [checker] : [] + else + let checkers = s:registry.getActiveCheckers(ft) + endif + + for checker in checkers + let active_checkers += 1 + call syntastic#util#debug("CacheErrors: Invoking checker: " . checker.getName()) + + let loclist = checker.getLocList() + + if !loclist.isEmpty() + let newLoclist = newLoclist.extend(loclist) + call newLoclist.setName( checker.getName() . ' ('. checker.getFiletype() . ')' ) + + "only get errors from one checker at a time + break + endif + endfor + endfor + + if !active_checkers + if a:0 + call syntastic#util#warn('checker ' . a:1 . ' is not active for filetype ' . &filetype) + else + call syntastic#util#debug('no active checkers for filetype ' . &filetype) + endif + endif + endif + + let b:syntastic_loclist = newLoclist +endfunction + +function! s:ToggleMode() + call s:modemap.toggleMode() + call s:ClearCache() + call s:UpdateErrors(1) + call s:modemap.echoMode() +endfunction + +"display the cached errors for this buf in the location list +function! s:ShowLocList() + let loclist = g:SyntasticLoclist.current() + call loclist.show() +endfunction + +"the script changes &shellpipe and &shell to stop the screen flicking when +"shelling out to syntax checkers. Not all OSs support the hacks though +function! s:OSSupportsShellpipeHack() + return !s:running_windows && executable('/bin/bash') && (s:uname() !~ "FreeBSD") && (s:uname() !~ "OpenBSD") +endfunction + +function! s:IsRedrawRequiredAfterMake() + return !s:running_windows && (s:uname() =~ "FreeBSD" || s:uname() =~ "OpenBSD") +endfunction + +"Redraw in a way that doesnt make the screen flicker or leave anomalies behind. +" +"Some terminal versions of vim require `redraw!` - otherwise there can be +"random anomalies left behind. +" +"However, on some versions of gvim using `redraw!` causes the screen to +"flicker - so use redraw. +function! s:Redraw() + if g:syntastic_full_redraws + redraw! + else + redraw + endif +endfunction + +function! s:IgnoreFile(filename) + let fname = fnamemodify(a:filename, ':p') + for p in g:syntastic_ignore_files + if fname =~# p + return 1 + endif + endfor + return 0 +endfunction + +" Skip running in special buffers +function! s:SkipFile() + let force_skip = exists('b:syntastic_skip_checks') ? b:syntastic_skip_checks : 0 + let fname = expand('%') + return force_skip || !empty(&buftype) || !filereadable(fname) || getwinvar(0, '&diff') || s:IgnoreFile(fname) +endfunction + +function! s:uname() + if !exists('s:uname') + let s:uname = system('uname') + endif + return s:uname +endfunction + +"return a string representing the state of buffer according to +"g:syntastic_stl_format +" +"return '' if no errors are cached for the buffer +function! SyntasticStatuslineFlag() + let loclist = g:SyntasticLoclist.current() + let issues = loclist.filteredRaw() + let num_issues = loclist.getLength() + if loclist.hasErrorsOrWarningsToDisplay() + let errors = loclist.errors() + let warnings = loclist.warnings() + + let num_errors = len(errors) + let num_warnings = len(warnings) + + let output = g:syntastic_stl_format + + "hide stuff wrapped in %E(...) unless there are errors + let output = substitute(output, '\C%E{\([^}]*\)}', num_errors ? '\1' : '' , 'g') + + "hide stuff wrapped in %W(...) unless there are warnings + let output = substitute(output, '\C%W{\([^}]*\)}', num_warnings ? '\1' : '' , 'g') + + "hide stuff wrapped in %B(...) unless there are both errors and warnings + let output = substitute(output, '\C%B{\([^}]*\)}', (num_warnings && num_errors) ? '\1' : '' , 'g') + + + "sub in the total errors/warnings/both + let output = substitute(output, '\C%w', num_warnings, 'g') + let output = substitute(output, '\C%e', num_errors, 'g') + let output = substitute(output, '\C%t', num_issues, 'g') + + "first error/warning line num + let output = substitute(output, '\C%F', num_issues ? issues[0]['lnum'] : '', 'g') + + "first error line num + let output = substitute(output, '\C%fe', num_errors ? errors[0]['lnum'] : '', 'g') + + "first warning line num + let output = substitute(output, '\C%fw', num_warnings ? warnings[0]['lnum'] : '', 'g') + + return output + else + return '' + endif +endfunction + +"A wrapper for the :lmake command. Sets up the make environment according to +"the options given, runs make, resets the environment, returns the location +"list +" +"a:options can contain the following keys: +" 'makeprg' +" 'errorformat' +" +"The corresponding options are set for the duration of the function call. They +"are set with :let, so dont escape spaces. +" +"a:options may also contain: +" 'defaults' - a dict containing default values for the returned errors +" 'subtype' - all errors will be assigned the given subtype +" 'postprocess' - a list of functions to be applied to the error list +" 'cwd' - change directory to the given path before running the checker +" 'returns' - a list of valid exit codes for the checker +function! SyntasticMake(options) + call syntastic#util#debug('SyntasticMake: called with options: '. string(a:options)) + + let old_loclist = getloclist(0) + let old_makeprg = &l:makeprg + let old_shellpipe = &shellpipe + let old_shell = &shell + let old_errorformat = &l:errorformat + let old_cwd = getcwd() + let old_lc_all = $LC_ALL + + if s:OSSupportsShellpipeHack() + "this is a hack to stop the screen needing to be ':redraw'n when + "when :lmake is run. Otherwise the screen flickers annoyingly + let &shellpipe='&>' + let &shell = '/bin/bash' + endif + + if has_key(a:options, 'makeprg') + let &l:makeprg = a:options['makeprg'] + endif + + if has_key(a:options, 'errorformat') + let &l:errorformat = a:options['errorformat'] + endif + + if has_key(a:options, 'cwd') + exec 'lcd ' . fnameescape(a:options['cwd']) + endif + + let $LC_ALL = 'C' + silent lmake! + let $LC_ALL = old_lc_all + + let errors = getloclist(0) + + if has_key(a:options, 'cwd') + exec 'lcd ' . fnameescape(old_cwd) + endif + + call setloclist(0, old_loclist) + let &l:makeprg = old_makeprg + let &l:errorformat = old_errorformat + let &shellpipe=old_shellpipe + let &shell=old_shell + + if s:IsRedrawRequiredAfterMake() + call s:Redraw() + endif + + if has_key(a:options, 'returns') && index(a:options['returns'], v:shell_error) == -1 + throw 'Syntastic: checker error' + endif + + if has_key(a:options, 'defaults') + call SyntasticAddToErrors(errors, a:options['defaults']) + endif + + " Apply ignore patterns + let ignore = {} + for buf in syntastic#util#unique(map(copy(errors), 'v:val["bufnr"]')) + let ignore[buf] = s:IgnoreFile(bufname(str2nr(buf))) + endfor + call filter(errors, '!ignore[v:val["bufnr"]]') + + " Add subtype info if present. + if has_key(a:options, 'subtype') + call SyntasticAddToErrors(errors, {'subtype': a:options['subtype']}) + endif + + if has_key(a:options, 'postprocess') && !empty(a:options['postprocess']) + for rule in a:options['postprocess'] + let errors = call('syntastic#postprocess#' . rule, [errors]) + endfor + endif + + return errors +endfunction + +"take a list of errors and add default values to them from a:options +function! SyntasticAddToErrors(errors, options) + for i in range(0, len(a:errors)-1) + for key in keys(a:options) + if !has_key(a:errors[i], key) || empty(a:errors[i][key]) + let a:errors[i][key] = a:options[key] + endif + endfor + endfor + return a:errors +endfunction + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/plugin/syntastic/autoloclist.vim b/sources_non_forked/syntastic/plugin/syntastic/autoloclist.vim new file mode 100644 index 00000000..9a1a018f --- /dev/null +++ b/sources_non_forked/syntastic/plugin/syntastic/autoloclist.vim @@ -0,0 +1,38 @@ +if exists("g:loaded_syntastic_notifier_autoloclist") + finish +endif +let g:loaded_syntastic_notifier_autoloclist = 1 + +if !exists("g:syntastic_auto_loc_list") + let g:syntastic_auto_loc_list = 2 +endif + +let g:SyntasticAutoloclistNotifier = {} + +" Public methods {{{1 +" +function! g:SyntasticAutoloclistNotifier.New() + let newObj = copy(self) + return newObj +endfunction + +function! g:SyntasticAutoloclistNotifier.refresh(loclist) + call g:SyntasticAutoloclistNotifier.AutoToggle(a:loclist) +endfunction + +function! g:SyntasticAutoloclistNotifier.AutoToggle(loclist) + if a:loclist.hasErrorsOrWarningsToDisplay() + if g:syntastic_auto_loc_list == 1 + call a:loclist.show() + endif + else + if g:syntastic_auto_loc_list > 0 + + "TODO: this will close the loc list window if one was opened by + "something other than syntastic + lclose + endif + endif +endfunction + +" vim: set sw=4 sts=4 et fdm=marker: diff --git a/sources_non_forked/syntastic/plugin/syntastic/balloons.vim b/sources_non_forked/syntastic/plugin/syntastic/balloons.vim new file mode 100644 index 00000000..f6e60418 --- /dev/null +++ b/sources_non_forked/syntastic/plugin/syntastic/balloons.vim @@ -0,0 +1,64 @@ +if exists("g:loaded_syntastic_notifier_balloons") + finish +endif +let g:loaded_syntastic_notifier_balloons = 1 + +if !exists("g:syntastic_enable_balloons") + let g:syntastic_enable_balloons = 1 +endif + +if !has('balloon_eval') + let g:syntastic_enable_balloons = 0 +endif + +let g:SyntasticBalloonsNotifier = {} + +" Public methods {{{1 + +function! g:SyntasticBalloonsNotifier.New() + let newObj = copy(self) + return newObj +endfunction + +function! g:SyntasticBalloonsNotifier.enabled() + return + \ has('balloon_eval') && + \ (exists('b:syntastic_enable_balloons') ? b:syntastic_enable_balloons : g:syntastic_enable_balloons) +endfunction + +" Update the error balloons +function! g:SyntasticBalloonsNotifier.refresh(loclist) + let b:syntastic_balloons = {} + if self.enabled() && a:loclist.hasErrorsOrWarningsToDisplay() + let buf = bufnr('') + let issues = filter(a:loclist.filteredRaw(), 'v:val["bufnr"] == buf') + if !empty(issues) + for i in issues + if has_key(b:syntastic_balloons, i['lnum']) + let b:syntastic_balloons[i['lnum']] .= "\n" . i['text'] + else + let b:syntastic_balloons[i['lnum']] = i['text'] + endif + endfor + set beval bexpr=SyntasticBalloonsExprNotifier() + endif + endif +endfunction + +" Reset the error balloons +function! g:SyntasticBalloonsNotifier.reset(loclist) + if has('balloon_eval') + set nobeval + endif +endfunction + +" Private functions {{{1 + +function! SyntasticBalloonsExprNotifier() + if !exists('b:syntastic_balloons') + return '' + endif + return get(b:syntastic_balloons, v:beval_lnum, '') +endfunction + +" vim: set sw=4 sts=4 et fdm=marker: diff --git a/sources_non_forked/syntastic/plugin/syntastic/checker.vim b/sources_non_forked/syntastic/plugin/syntastic/checker.vim new file mode 100644 index 00000000..3ab1d212 --- /dev/null +++ b/sources_non_forked/syntastic/plugin/syntastic/checker.vim @@ -0,0 +1,79 @@ +if exists("g:loaded_syntastic_checker") + finish +endif +let g:loaded_syntastic_checker = 1 + +let g:SyntasticChecker = {} + +" Public methods {{{1 + +function! g:SyntasticChecker.New(args) + let newObj = copy(self) + + let newObj._filetype = a:args['filetype'] + let newObj._name = a:args['name'] + + + let prefix = 'SyntaxCheckers_' . newObj._filetype . '_' . newObj._name . '_' + let newObj._locListFunc = function(prefix . 'GetLocList') + let newObj._isAvailableFunc = function(prefix . 'IsAvailable') + + if exists('*' . prefix . 'GetHighlightRegex') + let newObj._highlightRegexFunc = function(prefix. 'GetHighlightRegex') + else + let newObj._highlightRegexFunc = '' + endif + + return newObj +endfunction + +function! g:SyntasticChecker.getFiletype() + return self._filetype +endfunction + +function! g:SyntasticChecker.getName() + return self._name +endfunction + +function! g:SyntasticChecker.getLocList() + try + let list = self._locListFunc() + call syntastic#util#debug('getLocList: checker ' . self._filetype . '/' . self._name . ' returned ' . v:shell_error) + catch /\m\C^Syntastic: checker error$/ + let list = [] + call syntastic#util#error('checker ' . self._filetype . '/' . self._name . ' returned abnormal status ' . v:shell_error) + endtry + call self._populateHighlightRegexes(list) + return g:SyntasticLoclist.New(list) +endfunction + +function! g:SyntasticChecker.getHighlightRegexFor(error) + if empty(self._highlightRegexFunc) + return [] + endif + + return self._highlightRegexFunc(error) +endfunction + +function! g:SyntasticChecker.isAvailable() + return self._isAvailableFunc() +endfunction + +" Private methods {{{1 + +function! g:SyntasticChecker._populateHighlightRegexes(list) + let list = a:list + if !empty(self._highlightRegexFunc) + for i in range(0, len(list)-1) + if list[i]['valid'] + let term = self._highlightRegexFunc(list[i]) + if len(term) > 0 + let list[i]['hl'] = term + endif + endif + endfor + endif + return list +endfunction + +" vim: set sw=4 sts=4 et fdm=marker: diff --git a/sources_non_forked/syntastic/plugin/syntastic/cursor.vim b/sources_non_forked/syntastic/plugin/syntastic/cursor.vim new file mode 100644 index 00000000..77f97dc5 --- /dev/null +++ b/sources_non_forked/syntastic/plugin/syntastic/cursor.vim @@ -0,0 +1,63 @@ +if exists("g:loaded_syntastic_notifier_cursor") + finish +endif +let g:loaded_syntastic_notifier_cursor = 1 + +if !exists('g:syntastic_echo_current_error') + let g:syntastic_echo_current_error = 1 +endif + +let g:SyntasticCursorNotifier = {} + +" Public methods {{{1 + +function! g:SyntasticCursorNotifier.New() + let newObj = copy(self) + return newObj +endfunction + +function! g:SyntasticCursorNotifier.enabled() + return exists('b:syntastic_echo_current_error') ? b:syntastic_echo_current_error : g:syntastic_echo_current_error +endfunction + +function! g:SyntasticCursorNotifier.refresh(loclist) + if self.enabled() && a:loclist.hasErrorsOrWarningsToDisplay() + let b:syntastic_messages = copy(a:loclist.messages(bufnr(''))) + let b:oldLine = -1 + autocmd! syntastic CursorMoved + autocmd syntastic CursorMoved * call g:SyntasticRefreshCursor() + endif +endfunction + +function! g:SyntasticCursorNotifier.reset(loclist) + autocmd! syntastic CursorMoved + unlet! b:syntastic_messages + let b:oldLine = -1 +endfunction + +" Private methods {{{1 + +" The following defensive nonsense is needed because of the nature of autocmd +function! g:SyntasticRefreshCursor() + if !exists('b:syntastic_messages') || empty(b:syntastic_messages) + " file not checked + return + endif + + if !exists('b:oldLine') + let b:oldLine = -1 + endif + let l = line('.') + if l == b:oldLine + return + endif + let b:oldLine = l + + if has_key(b:syntastic_messages, l) + call syntastic#util#wideMsg(b:syntastic_messages[l]) + else + echo + endif +endfunction + +" vim: set sw=4 sts=4 et fdm=marker: diff --git a/sources_non_forked/syntastic/plugin/syntastic/highlighting.vim b/sources_non_forked/syntastic/plugin/syntastic/highlighting.vim new file mode 100644 index 00000000..e04e6cc5 --- /dev/null +++ b/sources_non_forked/syntastic/plugin/syntastic/highlighting.vim @@ -0,0 +1,66 @@ +if exists("g:loaded_syntastic_notifier_highlighting") + finish +endif +let g:loaded_syntastic_notifier_highlighting = 1 + +" Highlighting requires getmatches introduced in 7.1.040 +let s:has_highlighting = v:version > 701 || (v:version == 701 && has('patch040')) + +if !exists("g:syntastic_enable_highlighting") + let g:syntastic_enable_highlighting = 1 +endif + +let g:SyntasticHighlightingNotifier = {} + +" Public methods {{{1 + +function! g:SyntasticHighlightingNotifier.New() + let newObj = copy(self) + return newObj +endfunction + +function! g:SyntasticHighlightingNotifier.enabled() + return + \ s:has_highlighting && + \ (exists('b:syntastic_enable_highlighting') ? b:syntastic_enable_highlighting : g:syntastic_enable_highlighting) +endfunction + +" Sets error highlights in the cuirrent window +function! g:SyntasticHighlightingNotifier.refresh(loclist) + if self.enabled() + call self.reset(a:loclist) + let buf = bufnr('') + let issues = filter(a:loclist.filteredRaw(), 'v:val["bufnr"] == buf') + for item in issues + let group = item['type'] == 'E' ? 'SyntasticError' : 'SyntasticWarning' + + " The function `Syntastic_{filetype}_{checker}_GetHighlightRegex` is + " used to override default highlighting. + if has_key(item, 'hl') + call matchadd(group, '\%' . item['lnum'] . 'l' . item['hl']) + elseif get(item, 'col') + let lastcol = col([item['lnum'], '$']) + let lcol = min([lastcol, item['col']]) + + " a bug in vim can sometimes cause there to be no 'vcol' key, + " so check for its existence + let coltype = has_key(item, 'vcol') && item['vcol'] ? 'v' : 'c' + + call matchadd(group, '\%' . item['lnum'] . 'l\%' . lcol . coltype) + endif + endfor + endif +endfunction + +" Remove all error highlights from the window +function! g:SyntasticHighlightingNotifier.reset(loclist) + if s:has_highlighting + for match in getmatches() + if stridx(match['group'], 'Syntastic') == 0 + call matchdelete(match['id']) + endif + endfor + endif +endfunction + +" vim: set sw=4 sts=4 et fdm=marker: diff --git a/sources_non_forked/syntastic/plugin/syntastic/loclist.vim b/sources_non_forked/syntastic/plugin/syntastic/loclist.vim new file mode 100644 index 00000000..d5cd6e39 --- /dev/null +++ b/sources_non_forked/syntastic/plugin/syntastic/loclist.vim @@ -0,0 +1,173 @@ +if exists("g:loaded_syntastic_loclist") + finish +endif +let g:loaded_syntastic_loclist = 1 + +let g:SyntasticLoclist = {} + +" Public methods {{{1 + +function! g:SyntasticLoclist.New(rawLoclist) + let newObj = copy(self) + let newObj._quietWarnings = g:syntastic_quiet_warnings + + let llist = copy(a:rawLoclist) + let llist = filter(llist, 'v:val["valid"] == 1') + + for e in llist + if empty(e['type']) + let e['type'] = 'E' + endif + endfor + + let newObj._rawLoclist = llist + let newObj._hasErrorsOrWarningsToDisplay = -1 + + let newObj._name = '' + + return newObj +endfunction + +function! g:SyntasticLoclist.current() + if !exists("b:syntastic_loclist") + let b:syntastic_loclist = g:SyntasticLoclist.New([]) + endif + return b:syntastic_loclist +endfunction + +function! g:SyntasticLoclist.extend(other) + let list = self.toRaw() + call extend(list, a:other.toRaw()) + return g:SyntasticLoclist.New(list) +endfunction + +function! g:SyntasticLoclist.toRaw() + return copy(self._rawLoclist) +endfunction + +function! g:SyntasticLoclist.filteredRaw() + return copy(self._quietWarnings ? self.errors() : self._rawLoclist) +endfunction + +function! g:SyntasticLoclist.quietWarnings() + return self._quietWarnings +endfunction + +function! g:SyntasticLoclist.isEmpty() + return empty(self._rawLoclist) +endfunction + +function! g:SyntasticLoclist.getLength() + return len(self._rawLoclist) +endfunction + +function! g:SyntasticLoclist.getName() + return len(self._name) +endfunction + +function! g:SyntasticLoclist.setName(name) + let self._name = a:name +endfunction + +function! g:SyntasticLoclist.hasErrorsOrWarningsToDisplay() + if self._hasErrorsOrWarningsToDisplay >= 0 + return self._hasErrorsOrWarningsToDisplay + endif + let self._hasErrorsOrWarningsToDisplay = empty(self._rawLoclist) ? 0 : (!self._quietWarnings || len(self.errors())) + return self._hasErrorsOrWarningsToDisplay +endfunction + +function! g:SyntasticLoclist.errors() + if !exists("self._cachedErrors") + let self._cachedErrors = self.filter({'type': "E"}) + endif + return self._cachedErrors +endfunction + +function! g:SyntasticLoclist.warnings() + if !exists("self._cachedWarnings") + let self._cachedWarnings = self.filter({'type': "W"}) + endif + return self._cachedWarnings +endfunction + +" cache used by EchoCurrentError() +function! g:SyntasticLoclist.messages(buf) + if !exists("self._cachedMessages") + let self._cachedMessages = {} + let errors = self.errors() + (self._quietWarnings ? [] : self.warnings()) + + for e in errors + let b = e['bufnr'] + let l = e['lnum'] + + if !has_key(self._cachedMessages, b) + let self._cachedMessages[b] = {} + endif + + if !has_key(self._cachedMessages[b], l) + let self._cachedMessages[b][l] = e['text'] + endif + endfor + endif + + return get(self._cachedMessages, a:buf, {}) +endfunction + +"Filter the list and return new native loclist +"e.g. +" .filter({'bufnr': 10, 'type': 'e'}) +" +"would return all errors for buffer 10. +" +"Note that all comparisons are done with ==? +function! g:SyntasticLoclist.filter(filters) + let rv = [] + + for error in self._rawLoclist + + let passes_filters = 1 + for key in keys(a:filters) + if error[key] !=? a:filters[key] + let passes_filters = 0 + break + endif + endfor + + if passes_filters + call add(rv, error) + endif + endfor + return rv +endfunction + +"display the cached errors for this buf in the location list +function! g:SyntasticLoclist.show() + call setloclist(0, self.filteredRaw()) + if self.hasErrorsOrWarningsToDisplay() + let num = winnr() + exec "lopen " . g:syntastic_loc_list_height + if num != winnr() + wincmd p + endif + + " try to find the loclist window and set w:quickfix_title + for buf in tabpagebuflist() + if buflisted(buf) && bufloaded(buf) && getbufvar(buf, '&buftype') ==# 'quickfix' + let win = bufwinnr(buf) + let title = getwinvar(win, 'quickfix_title') + if title ==# ':setloclist()' || strpart(title, 0, 16) ==# ':SyntasticCheck ' + call setwinvar(win, 'quickfix_title', ':SyntasticCheck ' . self._name) + endif + endif + endfor + endif +endfunction + +" Non-method functions {{{1 + +function! g:SyntasticLoclistHide() + silent! lclose +endfunction + +" vim: set sw=4 sts=4 et fdm=marker: diff --git a/sources_non_forked/syntastic/plugin/syntastic/makeprg_builder.vim b/sources_non_forked/syntastic/plugin/syntastic/makeprg_builder.vim new file mode 100644 index 00000000..ef77efa9 --- /dev/null +++ b/sources_non_forked/syntastic/plugin/syntastic/makeprg_builder.vim @@ -0,0 +1,72 @@ +if exists("g:loaded_syntastic_makeprg_builder") + finish +endif +let g:loaded_syntastic_makeprg_builder = 1 + +let g:SyntasticMakeprgBuilder = {} + +" Public methods {{{1 + +function! g:SyntasticMakeprgBuilder.New(exe, args, fname, post_args, tail, filetype, subchecker) + let newObj = copy(self) + let newObj._exe = a:exe + let newObj._args = a:args + let newObj._fname = a:fname + let newObj._post_args = a:post_args + let newObj._tail = a:tail + let newObj._filetype = empty(a:filetype) ? &filetype : a:filetype + let newObj._subchecker = a:subchecker + return newObj +endfunction + +function! g:SyntasticMakeprgBuilder.makeprg() + return join([self.exe(), self.args(), self.fname(), self.post_args(), self.tail()]) +endfunction + +function! g:SyntasticMakeprgBuilder.exe() + return self._getOpt('exe') +endfunction + +function! g:SyntasticMakeprgBuilder.args() + return self._getOpt('args') +endfunction + +function! g:SyntasticMakeprgBuilder.fname() + if empty(self._fname) + return syntastic#util#shexpand('%') + else + return self._fname + endif +endfunction + +function! g:SyntasticMakeprgBuilder.post_args() + return self._getOpt('post_args') +endfunction + +function! g:SyntasticMakeprgBuilder.tail() + return self._getOpt('tail') +endfunction + +" Private methods {{{1 + +function g:SyntasticMakeprgBuilder._getOpt(name) + if self._optExists(a:name) + return {self._optName(a:name)} + endif + + return self['_' . a:name] +endfunction + +function! g:SyntasticMakeprgBuilder._optExists(name) + return exists(self._optName(a:name)) +endfunction + +function! g:SyntasticMakeprgBuilder._optName(name) + let setting = "g:syntastic_" . self._filetype + if !empty(self._subchecker) + let setting .= '_' . self._subchecker + endif + return setting . '_' . a:name +endfunction + +" vim: set sw=4 sts=4 et fdm=marker: diff --git a/sources_non_forked/syntastic/plugin/syntastic/modemap.vim b/sources_non_forked/syntastic/plugin/syntastic/modemap.vim new file mode 100644 index 00000000..2a838883 --- /dev/null +++ b/sources_non_forked/syntastic/plugin/syntastic/modemap.vim @@ -0,0 +1,67 @@ +if exists("g:loaded_syntastic_modemap") + finish +endif +let g:loaded_syntastic_modemap = 1 + +let g:SyntasticModeMap = {} + +" Public methods {{{1 + +function! g:SyntasticModeMap.Instance() + if !exists('s:SyntasticModeMapInstance') + let s:SyntasticModeMapInstance = copy(self) + call s:SyntasticModeMapInstance._initModeMapFromGlobalOpts() + endif + + return s:SyntasticModeMapInstance +endfunction + +function! g:SyntasticModeMap.allowsAutoChecking(filetype) + let fts = split(a:filetype, '\.') + + if self.isPassive() + return self._isOneFiletypeActive(fts) + else + return self._noFiletypesArePassive(fts) + endif +endfunction + +function! g:SyntasticModeMap.isPassive() + return self._mode == "passive" +endfunction + +function! g:SyntasticModeMap.toggleMode() + if self._mode == "active" + let self._mode = "passive" + else + let self._mode = "active" + endif +endfunction + +function! g:SyntasticModeMap.echoMode() + echo "Syntastic: " . self._mode . " mode enabled" +endfunction + +" Private methods {{{1 + +function! g:SyntasticModeMap._initModeMapFromGlobalOpts() + let self._mode = "active" + let self._activeFiletypes = [] + let self._passiveFiletypes = [] + + if exists("g:syntastic_mode_map") + let self._mode = get(g:syntastic_mode_map, 'mode', self._mode) + let self._activeFiletypes = get(g:syntastic_mode_map, 'active_filetypes', self._activeFiletypes) + let self._passiveFiletypes = get(g:syntastic_mode_map, 'passive_filetypes', self._passiveFiletypes) + endif +endfunction + +function! g:SyntasticModeMap._isOneFiletypeActive(filetypes) + return !empty(filter(a:filetypes, 'index(self._activeFiletypes, v:val) != -1')) +endfunction + +function! g:SyntasticModeMap._noFiletypesArePassive(filetypes) + return empty(filter(a:filetypes, 'index(self._passiveFiletypes, v:val) != -1')) +endfunction + +" vim: set sw=4 sts=4 et fdm=marker: diff --git a/sources_non_forked/syntastic/plugin/syntastic/notifiers.vim b/sources_non_forked/syntastic/plugin/syntastic/notifiers.vim new file mode 100644 index 00000000..12f41445 --- /dev/null +++ b/sources_non_forked/syntastic/plugin/syntastic/notifiers.vim @@ -0,0 +1,55 @@ +if exists("g:loaded_syntastic_notifiers") + finish +endif +let g:loaded_syntastic_notifiers = 1 + +let g:SyntasticNotifiers = {} + +let s:notifier_types = ['signs', 'balloons', 'highlighting', 'cursor', 'autoloclist'] + +" Public methods {{{1 + +function! g:SyntasticNotifiers.Instance() + if !exists('s:SyntasticNotifiersInstance') + let s:SyntasticNotifiersInstance = copy(self) + call s:SyntasticNotifiersInstance._initNotifiers() + endif + + return s:SyntasticNotifiersInstance +endfunction + +function! g:SyntasticNotifiers.refresh(loclist) + for type in self._enabled_types + let class = substitute(type, '.*', 'Syntastic\u&Notifier', '') + if !has_key(g:{class}, 'enabled') || self._notifier[type].enabled() + call self._notifier[type].refresh(a:loclist) + endif + endfor +endfunction + +function! g:SyntasticNotifiers.reset(loclist) + for type in self._enabled_types + let class = substitute(type, '.*', 'Syntastic\u&Notifier', '') + + " reset notifiers regardless if they are enabled or not, since + " the user might have disabled them since the last refresh(); + " notifiers MUST be prepared to deal with reset() when disabled + if has_key(g:{class}, 'reset') + call self._notifier[type].reset(a:loclist) + endif + endfor +endfunction + +" Private methods {{{1 + +function! g:SyntasticNotifiers._initNotifiers() + let self._notifier = {} + for type in s:notifier_types + let class = substitute(type, '.*', 'Syntastic\u&Notifier', '') + let self._notifier[type] = g:{class}.New() + endfor + + let self._enabled_types = copy(s:notifier_types) +endfunction + +" vim: set sw=4 sts=4 et fdm=marker: diff --git a/sources_non_forked/syntastic/plugin/syntastic/registry.vim b/sources_non_forked/syntastic/plugin/syntastic/registry.vim new file mode 100644 index 00000000..6f61d65f --- /dev/null +++ b/sources_non_forked/syntastic/plugin/syntastic/registry.vim @@ -0,0 +1,213 @@ +if exists("g:loaded_syntastic_registry") + finish +endif +let g:loaded_syntastic_registry = 1 + +let s:defaultCheckers = { + \ 'c': ['gcc'], + \ 'coffee': ['coffee', 'coffeelint'], + \ 'cpp': ['gcc'], + \ 'css': ['csslint', 'phpcs'], + \ 'go': ['go'], + \ 'html': ['tidy'], + \ 'java': ['javac'], + \ 'javascript': ['jshint', 'jslint'], + \ 'json': ['jsonlint', 'jsonval'], + \ 'objc': ['gcc'], + \ 'objcpp': ['gcc'], + \ 'perl': ['perl', 'perlcritic'], + \ 'php': ['php', 'phpcs', 'phpmd'], + \ 'puppet': ['puppet', 'puppetlint'], + \ 'python': ['python', 'flake8', 'pylint'], + \ 'ruby': ['mri'], + \ 'sh': ['sh'], + \ 'tex': ['lacheck'] + \ } + +let s:defaultFiletypeMap = { + \ 'gentoo-metadata': 'xml', + \ 'lhaskell': 'haskell' + \ } + +let g:SyntasticRegistry = {} + +" TODO: Handling of filetype aliases: all public methods take aliases as +" parameters, all private methods take normalized filetypes. Public methods +" are thus supposed to normalize filetypes before calling private methods. + +" Public methods {{{1 + +function! g:SyntasticRegistry.Instance() + if !exists('s:SyntasticRegistryInstance') + let s:SyntasticRegistryInstance = copy(self) + let s:SyntasticRegistryInstance._checkerMap = {} + endif + + return s:SyntasticRegistryInstance +endfunction + +function! g:SyntasticRegistry.CreateAndRegisterChecker(args) + let checker = g:SyntasticChecker.New(a:args) + let registry = g:SyntasticRegistry.Instance() + call registry.registerChecker(checker) +endfunction + +function! g:SyntasticRegistry.registerChecker(checker) abort + let ft = a:checker.getFiletype() + + if !has_key(self._checkerMap, ft) + let self._checkerMap[ft] = [] + endif + + call self._validateUniqueName(a:checker) + + call add(self._checkerMap[ft], a:checker) +endfunction + +function! g:SyntasticRegistry.checkable(ftalias) + return !empty(self.getActiveCheckers(a:ftalias)) +endfunction + +function! g:SyntasticRegistry.getActiveCheckers(ftalias) + let filetype = s:SyntasticRegistryNormaliseFiletype(a:ftalias) + let checkers = self.availableCheckersFor(a:ftalias) + + if self._userHasFiletypeSettings(filetype) + return self._filterCheckersByUserSettings(checkers, filetype) + endif + + if has_key(s:defaultCheckers, filetype) + return self._filterCheckersByDefaultSettings(checkers, filetype) + endif + + let checkers = self.availableCheckersFor(filetype) + + if !empty(checkers) + return [checkers[0]] + endif + + return [] +endfunction + +function! g:SyntasticRegistry.getChecker(ftalias, name) + for checker in self.availableCheckersFor(a:ftalias) + if checker.getName() == a:name + return checker + endif + endfor + + return {} +endfunction + +function! g:SyntasticRegistry.availableCheckersFor(ftalias) + let filetype = s:SyntasticRegistryNormaliseFiletype(a:ftalias) + let checkers = copy(self._allCheckersFor(filetype)) + return self._filterCheckersByAvailability(checkers) +endfunction + +function! g:SyntasticRegistry.echoInfoFor(ftalias_list) + echomsg "Syntastic info for filetype: " . join(a:ftalias_list, '.') + + let available = [] + let active = [] + for ftalias in a:ftalias_list + call extend(available, self.availableCheckersFor(ftalias)) + call extend(active, self.getActiveCheckers(ftalias)) + endfor + + echomsg "Available checkers: " . join(syntastic#util#unique(map(available, "v:val.getName()"))) + echomsg "Currently active checker(s): " . join(syntastic#util#unique(map(active, "v:val.getName()"))) +endfunction + +" Private methods {{{1 + +function! g:SyntasticRegistry._allCheckersFor(filetype) + call self._loadCheckers(a:filetype) + if empty(self._checkerMap[a:filetype]) + return [] + endif + + return self._checkerMap[a:filetype] +endfunction + +function! g:SyntasticRegistry._filterCheckersByDefaultSettings(checkers, filetype) + if has_key(s:defaultCheckers, a:filetype) + return self._filterCheckersByName(a:checkers, s:defaultCheckers[a:filetype]) + endif + + return a:checkers +endfunction + +function! g:SyntasticRegistry._filterCheckersByUserSettings(checkers, filetype) + if exists("b:syntastic_checkers") + let whitelist = b:syntastic_checkers + else + let whitelist = g:syntastic_{a:filetype}_checkers + endif + return self._filterCheckersByName(a:checkers, whitelist) +endfunction + +function! g:SyntasticRegistry._filterCheckersByName(checkers, list) + let checkers_by_name = {} + for c in a:checkers + let checkers_by_name[c.getName()] = c + endfor + + let filtered = [] + for name in a:list + if has_key(checkers_by_name, name) + call add(filtered, checkers_by_name[name]) + endif + endfor + + return filtered +endfunction + +function! g:SyntasticRegistry._filterCheckersByAvailability(checkers) + return filter(copy(a:checkers), "v:val.isAvailable()") +endfunction + +function! g:SyntasticRegistry._loadCheckers(filetype) + if self._haveLoadedCheckers(a:filetype) + return + endif + + exec "runtime! syntax_checkers/" . a:filetype . "/*.vim" + + if !has_key(self._checkerMap, a:filetype) + let self._checkerMap[a:filetype] = [] + endif +endfunction + +function! g:SyntasticRegistry._haveLoadedCheckers(filetype) + return has_key(self._checkerMap, a:filetype) +endfunction + +function! g:SyntasticRegistry._userHasFiletypeSettings(filetype) + if exists("g:syntastic_" . a:filetype . "_checker") && !exists("g:syntastic_" . a:filetype . "_checkers") + let g:syntastic_{a:filetype}_checkers = [g:syntastic_{a:filetype}_checker] + call syntastic#util#deprecationWarn("variable g:syntastic_" . a:filetype . "_checker is deprecated") + endif + return exists("b:syntastic_checkers") || exists("g:syntastic_" . a:filetype . "_checkers") +endfunction + +function! g:SyntasticRegistry._validateUniqueName(checker) abort + for checker in self._allCheckersFor(a:checker.getFiletype()) + if checker.getName() == a:checker.getName() + throw "Syntastic: Duplicate syntax checker name for: " . a:checker.getName() + endif + endfor +endfunction + +" Private functions {{{1 + +"resolve filetype aliases, and replace - with _ otherwise we cant name +"syntax checker functions legally for filetypes like "gentoo-metadata" +function! s:SyntasticRegistryNormaliseFiletype(ftalias) + let ft = get(s:defaultFiletypeMap, a:ftalias, a:ftalias) + let ft = get(g:syntastic_filetype_map, ft, ft) + let ft = substitute(ft, '-', '_', 'g') + return ft +endfunction + +" vim: set sw=4 sts=4 et fdm=marker: diff --git a/sources_non_forked/syntastic/plugin/syntastic/signs.vim b/sources_non_forked/syntastic/plugin/syntastic/signs.vim new file mode 100644 index 00000000..067658b1 --- /dev/null +++ b/sources_non_forked/syntastic/plugin/syntastic/signs.vim @@ -0,0 +1,149 @@ +if exists("g:loaded_syntastic_notifier_signs") + finish +endif +let g:loaded_syntastic_notifier_signs = 1 + +if !exists("g:syntastic_enable_signs") + let g:syntastic_enable_signs = 1 +endif + +if !exists("g:syntastic_error_symbol") + let g:syntastic_error_symbol = '>>' +endif + +if !exists("g:syntastic_warning_symbol") + let g:syntastic_warning_symbol = '>>' +endif + +if !exists("g:syntastic_style_error_symbol") + let g:syntastic_style_error_symbol = 'S>' +endif + +if !exists("g:syntastic_style_warning_symbol") + let g:syntastic_style_warning_symbol = 'S>' +endif + + +" start counting sign ids at 5000, start here to hopefully avoid conflicting +" with any other code that places signs (not sure if this precaution is +" actually needed) +let s:first_sign_id = 5000 +let s:next_sign_id = s:first_sign_id + +let g:SyntasticSignsNotifier = {} + +let s:setup_done = 0 + +" Public methods {{{1 + +function! g:SyntasticSignsNotifier.New() + let newObj = copy(self) + + if !s:setup_done + call self._setup() + let s:setup_done = 1 + endif + + return newObj +endfunction + +function! g:SyntasticSignsNotifier.enabled() + return + \ has('signs') && + \ exists('b:syntastic_enable_signs') ? b:syntastic_enable_signs : g:syntastic_enable_signs +endfunction + +function! g:SyntasticSignsNotifier.refresh(loclist) + let old_signs = copy(self._bufSignIds()) + if self.enabled() + call self._signErrors(a:loclist) + endif + call self._removeSigns(old_signs) + let s:first_sign_id = s:next_sign_id +endfunction + +" Private methods {{{1 + +" One time setup: define our own sign types and highlighting +function! g:SyntasticSignsNotifier._setup() + if has('signs') + if !hlexists('SyntasticErrorSign') + highlight link SyntasticErrorSign error + endif + if !hlexists('SyntasticWarningSign') + highlight link SyntasticWarningSign todo + endif + if !hlexists('SyntasticStyleErrorSign') + highlight link SyntasticStyleErrorSign SyntasticErrorSign + endif + if !hlexists('SyntasticStyleWarningSign') + highlight link SyntasticStyleWarningSign SyntasticWarningSign + endif + if !hlexists('SyntasticStyleErrorLine') + highlight link SyntasticStyleErrorLine SyntasticErrorLine + endif + if !hlexists('SyntasticStyleWarningLine') + highlight link SyntasticStyleWarningLine SyntasticWarningLine + endif + + " define the signs used to display syntax and style errors/warns + exe 'sign define SyntasticError text=' . g:syntastic_error_symbol . + \ ' texthl=SyntasticErrorSign linehl=SyntasticErrorLine' + exe 'sign define SyntasticWarning text=' . g:syntastic_warning_symbol . + \ ' texthl=SyntasticWarningSign linehl=SyntasticWarningLine' + exe 'sign define SyntasticStyleError text=' . g:syntastic_style_error_symbol . + \ ' texthl=SyntasticStyleErrorSign linehl=SyntasticStyleErrorLine' + exe 'sign define SyntasticStyleWarning text=' . g:syntastic_style_warning_symbol . + \ ' texthl=SyntasticStyleWarningSign linehl=SyntasticStyleWarningLine' + endif +endfunction + +" Place signs by all syntax errors in the buffer +function! g:SyntasticSignsNotifier._signErrors(loclist) + let loclist = a:loclist + if loclist.hasErrorsOrWarningsToDisplay() + + " errors some first, so that they are not masked by warnings + let buf = bufnr('') + let issues = copy(loclist.errors()) + if !loclist.quietWarnings() + call extend(issues, loclist.warnings()) + endif + call filter(issues, 'v:val["bufnr"] == buf') + let seen = {} + + for i in issues + if !has_key(seen, i['lnum']) + let seen[i['lnum']] = 1 + + let sign_severity = i['type'] ==? 'W' ? 'Warning' : 'Error' + let sign_subtype = get(i, 'subtype', '') + let sign_type = 'Syntastic' . sign_subtype . sign_severity + + exec "sign place " . s:next_sign_id . " line=" . i['lnum'] . " name=" . sign_type . " buffer=" . i['bufnr'] + call add(self._bufSignIds(), s:next_sign_id) + let s:next_sign_id += 1 + endif + endfor + endif +endfunction + +" Remove the signs with the given ids from this buffer +function! g:SyntasticSignsNotifier._removeSigns(ids) + if has('signs') + for i in a:ids + exec "sign unplace " . i + call remove(self._bufSignIds(), index(self._bufSignIds(), i)) + endfor + endif +endfunction + +" Get all the ids of the SyntaxError signs in the buffer +function! g:SyntasticSignsNotifier._bufSignIds() + if !exists("b:syntastic_sign_ids") + let b:syntastic_sign_ids = [] + endif + return b:syntastic_sign_ids +endfunction + +" vim: set sw=4 sts=4 et fdm=marker: diff --git a/sources_non_forked/syntastic/syntax_checkers/ada/gcc.vim b/sources_non_forked/syntastic/syntax_checkers/ada/gcc.vim new file mode 100644 index 00000000..7050c3d5 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/ada/gcc.vim @@ -0,0 +1,168 @@ +"============================================================================ +"File: ada.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Alfredo Di Napoli +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. +" +"============================================================================ + +" In order to also check header files add this to your .vimrc: +" +" let g:syntastic_ada_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_ada_no_include_search = 1 +" +" To disable the include of the default include dirs (such as /usr/include) +" add this line to your .vimrc: +" +" let g:syntastic_ada_no_default_include_dirs = 1 +" +" 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_ada_includes. Then the header files are being re-checked +" on the next file write. +" +" let g:syntastic_ada_auto_refresh_includes = 1 +" +" Alternatively you can set the buffer local variable b:syntastic_ada_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_ada_cflags = ' -I/usr/include/libsoup-2.4' +" +" 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_ada_include_dirs. This list can be used like this: +" +" let g:syntastic_ada_include_dirs = [ 'includes', 'headers' ] +" +" Moreover it is possible to add additional compiler options to the syntax +" checking execution via the variable 'g:syntastic_ada_compiler_options': +" +" let g:syntastic_ada_compiler_options = ' -std=c++0x' +" +" Additionally the setting 'g:syntastic_ada_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_ada_config': +" +" let g:syntastic_ada_config_file = '.config' +" +" Using the global variable 'g:syntastic_ada_remove_include_errors' you can +" specify whether errors of files included via the +" g:syntastic_ada_include_dirs' setting are removed from the result set: +" +" let g:syntastic_ada_remove_include_errors = 1 +" +" Use the variable 'g:syntastic_ada_errorformat' to override the default error +" format: +" +" let g:syntastic_ada_errorformat = '%f:%l:%c: %trror: %m' +" +" Set your compiler executable with e.g. (defaults to gcc) +" +" let g:syntastic_ada_compiler = 'gcc' + +if exists('g:loaded_syntastic_ada_gcc_checker') + finish +endif +let g:loaded_syntastic_ada_gcc_checker = 1 + +if !exists('g:syntastic_ada_compiler') + let g:syntastic_ada_compiler = 'gcc' +endif + +function! SyntaxCheckers_ada_gcc_IsAvailable() + return executable(g:syntastic_ada_compiler) +endfunction + +let s:save_cpo = &cpo +set cpo&vim + +if !exists('g:syntastic_ada_compiler_options') + let g:syntastic_ada_compiler_options = '' +endif + +if !exists('g:syntastic_ada_config_file') + let g:syntastic_ada_config_file = '.syntastic_ada_config' +endif + +function! SyntaxCheckers_ada_gcc_GetLocList() + let makeprg = g:syntastic_ada_compiler . ' -c -x ada -fsyntax-only ' + let errorformat = '%-G%f:%s:,%f:%l:%c: %m,%f:%l: %m' + + if exists('g:syntastic_c_errorformat') + let errorformat = g:syntastic_c_errorformat + endif + + " add optional user-defined compiler options + let makeprg .= g:syntastic_ada_compiler_options + + let makeprg .= ' ' . syntastic#util#shexpand('%') . + \ ' ' . syntastic#c#GetIncludeDirs('ada') + + " determine whether to parse header files as well + if expand('%') =~? '\.ads$' + if exists('g:syntastic_ada_check_header') + let makeprg = g:syntastic_ada_compiler . + \ ' -c ' . syntastic#util#shexpand('%') . + \ ' ' . g:syntastic_ada_compiler_options . + \ ' ' . syntastic#c#GetIncludeDirs('ada') + else + return [] + endif + endif + + " check if the user manually set some cflags + if !exists('b:syntastic_ada_cflags') + " check whether to search for include files at all + if !exists('g:syntastic_ada_no_include_search') || + \ g:syntastic_ada_no_include_search != 1 + " refresh the include file search if desired + if exists('g:syntastic_ada_auto_refresh_includes') && + \ g:syntastic_ada_auto_refresh_includes != 0 + let makeprg .= syntastic#c#SearchHeaders() + else + " search for header includes if not cached already + if !exists('b:syntastic_ada_includes') + let b:syntastic_ada_includes = syntastic#c#SearchHeaders() + endif + let makeprg .= b:syntastic_ada_includes + endif + endif + else + " use the user-defined cflags + let makeprg .= b:syntastic_ada_cflags + endif + + " add optional config file parameters + let makeprg .= ' ' . syntastic#c#ReadConfig(g:syntastic_ada_config_file) + + " process makeprg + let errors = SyntasticMake({ 'makeprg': makeprg, + \ 'errorformat': errorformat }) + + " filter the processed errors if desired + if exists('g:syntastic_ada_remove_include_errors') && + \ g:syntastic_ada_remove_include_errors != 0 + return filter(errors, + \ 'has_key(v:val, "bufnr") && v:val["bufnr"]=='.bufnr('')) + else + return errors + endif +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'ada', + \ 'name': 'gcc'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/applescript/osacompile.vim b/sources_non_forked/syntastic/syntax_checkers/applescript/osacompile.vim new file mode 100644 index 00000000..7567eb08 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/applescript/osacompile.vim @@ -0,0 +1,50 @@ +"============================================================================== +" FileName: applescript.vim +" Desc: Syntax checking plugin for syntastic.vim +" Author: Zhao Cai +" Email: caizhaoff@gmail.com +" Version: 0.2.1 +" Date Created: Thu 09 Sep 2011 10:30:09 AM EST +" Last Modified: Fri 09 Dec 2011 01:10:24 PM EST +" +" History: 0.1.0 - working, but it will run the script everytime to check +" syntax. Should use osacompile but strangely it does not give +" errors. +" +" 0.2.0 - switch to osacompile, it gives less errors compared +" with osascript. +" +" 0.2.1 - remove g:syntastic_applescript_tempfile. use +" tempname() instead. +" +" 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_applescript_osacompile_checker") + finish +endif +let g:loaded_syntastic_applescript_osacompile_checker=1 + +function! SyntaxCheckers_applescript_osacompile_IsAvailable() + return executable('osacompile') +endfunction + +function! SyntaxCheckers_applescript_osacompile_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'osacompile', + \ 'args': '-o ' . tempname() . '.scpt ', + \ 'filetype': 'applescript', + \ 'subchecker': 'osacompile' }) + let errorformat = '%f:%l:%m' + + return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'applescript', + \ 'name': 'osacompile'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/c/checkpatch.vim b/sources_non_forked/syntastic/syntax_checkers/c/checkpatch.vim new file mode 100644 index 00000000..0d579bfd --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/c/checkpatch.vim @@ -0,0 +1,48 @@ +"============================================================================ +"File: checkpatch.vim +"Description: Syntax checking plugin for syntastic.vim using checkpatch.pl +"Maintainer: Daniel Walker +"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_c_checkpatch_checker") + finish +endif +let g:loaded_syntastic_c_checkpatch_checker = 1 + +" Bail if the user doesn't have `checkpatch.pl` or ./scripts/checkpatch.pl installed. +if executable("checkpatch.pl") + let g:syntastic_c_checker_checkpatch_location = 'checkpatch.pl' +elseif executable("./scripts/checkpatch.pl") + let g:syntastic_c_checker_checkpatch_location = './scripts/checkpatch.pl' +endif + +function SyntaxCheckers_c_checkpatch_IsAvailable() + return exists("g:syntastic_c_checker_checkpatch_location") +endfunction + + +function! SyntaxCheckers_c_checkpatch_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': g:syntastic_c_checker_checkpatch_location, + \ 'args': '--no-summary --no-tree --terse --file', + \ 'filetype': 'c', + \ 'subchecker': 'checkpatch' }) + + let errorformat = + \ '%f:%l: %tARNING: %m,' . + \ '%f:%l: %tRROR: %m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'returns': [0], + \ 'subtype': 'Style' }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'c', + \ 'name': 'checkpatch'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/c/gcc.vim b/sources_non_forked/syntastic/syntax_checkers/c/gcc.vim new file mode 100644 index 00000000..d5c05f99 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/c/gcc.vim @@ -0,0 +1,183 @@ +"============================================================================ +"File: c.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Gregor Uhlenheuer +"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. +" +"============================================================================ + +" In order to also check header files add this to your .vimrc: +" +" let g:syntastic_c_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_c_no_include_search = 1 +" +" To disable the include of the default include dirs (such as /usr/include) +" add this line to your .vimrc: +" +" let g:syntastic_c_no_default_include_dirs = 1 +" +" 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_c_includes. Then the header files are being re-checked on +" the next file write. +" +" let g:syntastic_c_auto_refresh_includes = 1 +" +" Alternatively you can set the buffer local variable b:syntastic_c_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_c_cflags = ' -I/usr/include/libsoup-2.4' +" +" 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_c_include_dirs. This list can be used like this: +" +" let g:syntastic_c_include_dirs = [ 'includes', 'headers' ] +" +" Moreover it is possible to add additional compiler options to the syntax +" checking execution via the variable 'g:syntastic_c_compiler_options': +" +" let g:syntastic_c_compiler_options = ' -ansi' +" +" Additionally the setting 'g:syntastic_c_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_c_config': +" +" let g:syntastic_c_config_file = '.config' +" +" Using the global variable 'g:syntastic_c_remove_include_errors' you can +" specify whether errors of files included via the g:syntastic_c_include_dirs' +" setting are removed from the result set: +" +" let g:syntastic_c_remove_include_errors = 1 +" +" Use the variable 'g:syntastic_c_errorformat' to override the default error +" format: +" +" let g:syntastic_c_errorformat = '%f:%l:%c: %trror: %m' +" +" Set your compiler executable with e.g. (defaults to gcc) +" +" let g:syntastic_c_compiler = 'clang' + +if exists('g:loaded_syntastic_c_gcc_checker') + finish +endif +let g:loaded_syntastic_c_gcc_checker = 1 + +if !exists('g:syntastic_c_compiler') + let g:syntastic_c_compiler = 'gcc' +endif + +function! SyntaxCheckers_c_gcc_IsAvailable() + return executable(g:syntastic_c_compiler) +endfunction + +let s:save_cpo = &cpo +set cpo&vim + +if !exists('g:syntastic_c_compiler_options') + let g:syntastic_c_compiler_options = '-std=gnu99' +endif + +if !exists('g:syntastic_c_config_file') + let g:syntastic_c_config_file = '.syntastic_c_config' +endif + +function! SyntaxCheckers_c_gcc_GetLocList() + let makeprg = g:syntastic_c_compiler . ' -x c -fsyntax-only ' + let errorformat = + \ '%-G%f:%s:,' . + \ '%-G%f:%l: %#error: %#(Each undeclared identifier is reported only%.%#,' . + \ '%-G%f:%l: %#error: %#for each function it appears%.%#,' . + \ '%-GIn file included%.%#,' . + \ '%-G %#from %f:%l\,,' . + \ '%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' + + if exists('g:syntastic_c_errorformat') + let errorformat = g:syntastic_c_errorformat + endif + + " add optional user-defined compiler options + let makeprg .= g:syntastic_c_compiler_options + + let makeprg .= ' ' . syntastic#util#shexpand('%') . + \ ' ' . syntastic#c#GetIncludeDirs('c') + + " determine whether to parse header files as well + if expand('%') =~? '\.h$' + if exists('g:syntastic_c_check_header') + let makeprg = g:syntastic_c_compiler . + \ ' -c ' . syntastic#util#shexpand('%') . + \ ' ' . g:syntastic_c_compiler_options . + \ ' ' . syntastic#c#GetNullDevice() . + \ ' ' . syntastic#c#GetIncludeDirs('c') + else + return [] + endif + endif + + " check if the user manually set some cflags + if !exists('b:syntastic_c_cflags') + " check whether to search for include files at all + if !exists('g:syntastic_c_no_include_search') || + \ g:syntastic_c_no_include_search != 1 + " refresh the include file search if desired + if exists('g:syntastic_c_auto_refresh_includes') && + \ g:syntastic_c_auto_refresh_includes != 0 + let makeprg .= syntastic#c#SearchHeaders() + else + " search for header includes if not cached already + if !exists('b:syntastic_c_includes') + let b:syntastic_c_includes = syntastic#c#SearchHeaders() + endif + let makeprg .= b:syntastic_c_includes + endif + endif + else + " use the user-defined cflags + let makeprg .= b:syntastic_c_cflags + endif + + " add optional config file parameters + let makeprg .= ' ' . syntastic#c#ReadConfig(g:syntastic_c_config_file) + + " process makeprg + let errors = SyntasticMake({ 'makeprg': makeprg, + \ 'errorformat': errorformat }) + + " filter the processed errors if desired + if exists('g:syntastic_c_remove_include_errors') && + \ g:syntastic_c_remove_include_errors != 0 + return filter(errors, + \ 'has_key(v:val, "bufnr") && v:val["bufnr"]=='.bufnr('')) + else + return errors + endif +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'c', + \ 'name': 'gcc'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/c/make.vim b/sources_non_forked/syntastic/syntax_checkers/c/make.vim new file mode 100644 index 00000000..a0ccbf61 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/c/make.vim @@ -0,0 +1,65 @@ +"============================================================================ +"File: make.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Gregor Uhlenheuer +"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_c_make_checker') + finish +endif +let g:loaded_syntastic_c_make_checker = 1 + +function SyntaxCheckers_c_make_IsAvailable() + return executable('make') +endfunction + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_c_make_GetLocList() + + let makeprg = 'make -sk' + + let errorformat = + \ '%-G%f:%s:,' . + \ '%-G%f:%l: %#error: %#(Each undeclared identifier is reported only%.%#,' . + \ '%-G%f:%l: %#error: %#for each function it appears%.%#,' . + \ '%-GIn file included%.%#,' . + \ '%-G %#from %f:%l\,,' . + \ '%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' + + if exists('g:syntastic_c_errorformat') + let errorformat = g:syntastic_c_errorformat + endif + + " process makeprg + let errors = SyntasticMake({ 'makeprg': makeprg, + \ 'errorformat': errorformat }) + + " filter the processed errors if desired + if exists('g:syntastic_c_remove_include_errors') && + \ g:syntastic_c_remove_include_errors != 0 + return filter(errors, + \ 'has_key(v:val, "bufnr") && v:val["bufnr"]=='.bufnr('')) + else + return errors + endif +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'c', + \ 'name': 'make'}) + +let &cpo = s:save_cpo +unlet s:save_cpo diff --git a/sources_non_forked/syntastic/syntax_checkers/c/oclint.vim b/sources_non_forked/syntastic/syntax_checkers/c/oclint.vim new file mode 100644 index 00000000..e366a7ab --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/c/oclint.vim @@ -0,0 +1,58 @@ +"============================================================================ +"File: oclint.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: "UnCO" Lin +"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. +"============================================================================ +" +" The setting 'g:syntastic_oclint_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_oclint_config': +" +" let g:syntastic_oclint_config_file = '.config' + +if exists("g:loaded_syntastic_c_oclint_checker") + finish +endif +let g:loaded_syntastic_c_oclint_checker = 1 + +function! SyntaxCheckers_c_oclint_IsAvailable() + return executable("oclint") +endfunction + +if !exists('g:syntastic_oclint_config_file') + let g:syntastic_oclint_config_file = '.syntastic_oclint_config' +endif + +function! SyntaxCheckers_c_oclint_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'oclint', + \ 'args': '-text', + \ 'post_args': '-- -c ' . syntastic#c#ReadConfig(g:syntastic_oclint_config_file), + \ 'filetype': 'c', + \ 'subchecker': 'oclint' }) + + let errorformat = + \ '%E%f:%l:%c: %m P1 ,' . + \ '%E%f:%l:%c: %m P2 ,' . + \ '%W%f:%l:%c: %m P3 ,' . + \ '%E%f:%l:%c: fatal error: %m,' . + \ '%E%f:%l:%c: error: %m,' . + \ '%W%f:%l:%c: warning: %m,' . + \ '%-G%.%#' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'subtype': 'Style', + \ 'postprocess': ['compressWhitespace', 'sort'] }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'c', + \ 'name': 'oclint'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/c/sparse.vim b/sources_non_forked/syntastic/syntax_checkers/c/sparse.vim new file mode 100644 index 00000000..0307e324 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/c/sparse.vim @@ -0,0 +1,51 @@ +"============================================================================ +"File: sparse.vim +"Description: Syntax checking plugin for syntastic.vim using sparse.pl +"Maintainer: Daniel Walker +"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. +"============================================================================ +" +" The setting 'g:syntastic_sparse_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_sparse_config': +" +" let g:syntastic_sparse_config_file = '.config' + +if exists("g:loaded_syntastic_c_sparse_checker") + finish +endif +let g:loaded_syntastic_c_sparse_checker = 1 + +function! SyntaxCheckers_c_sparse_IsAvailable() + return executable("sparse") +endfunction + +if !exists('g:syntastic_sparse_config_file') + let g:syntastic_sparse_config_file = '.syntastic_sparse_config' +endif + +function! SyntaxCheckers_c_sparse_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'sparse', + \ 'args': '-ftabstop=' . &ts . ' ' . syntastic#c#ReadConfig(g:syntastic_sparse_config_file), + \ 'filetype': 'c', + \ 'subchecker': 'sparse' }) + + let errorformat = '%f:%l:%v: %trror: %m,%f:%l:%v: %tarning: %m,' + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'defaults': {'bufnr': bufnr("")}, + \ 'returns': [0] }) + return loclist +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'c', + \ 'name': 'sparse'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/c/splint.vim b/sources_non_forked/syntastic/syntax_checkers/c/splint.vim new file mode 100644 index 00000000..6b2a1c1b --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/c/splint.vim @@ -0,0 +1,57 @@ +"============================================================================ +"File: splint.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: LCD 47 +"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. +"============================================================================ +" +" The setting 'g:syntastic_splint_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_splint_config': +" +" let g:syntastic_splint_config_file = '.config' + +if exists("g:loaded_syntastic_c_splint_checker") + finish +endif +let g:loaded_syntastic_c_splint_checker = 1 + +function! SyntaxCheckers_c_splint_IsAvailable() + return executable("splint") +endfunction + +if !exists('g:syntastic_splint_config_file') + let g:syntastic_splint_config_file = '.syntastic_splint_config' +endif + +function! SyntaxCheckers_c_splint_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'splint', + \ 'post_args': '-showfunc -hints +quiet ' . syntastic#c#ReadConfig(g:syntastic_splint_config_file), + \ 'filetype': 'c', + \ 'subchecker': 'splint' }) + + let errorformat = + \ '%-G%f:%l:%v: %[%#]%[%#]%[%#] Internal Bug %.%#,' . + \ '%W%f:%l:%v: %m,' . + \ '%W%f:%l: %m,' . + \ '%-C %\+In file included from %.%#,' . + \ '%-C %\+from %.%#,' . + \ '%+C %.%#' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'subtype': 'Style', + \ 'postprocess': ['compressWhitespace'], + \ 'defaults': {'type': 'W'} }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'c', + \ 'name': 'splint'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/c/ycm.vim b/sources_non_forked/syntastic/syntax_checkers/c/ycm.vim new file mode 100644 index 00000000..5cce6fc5 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/c/ycm.vim @@ -0,0 +1,32 @@ +"============================================================================ +"File: ycm.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Val Markovic +"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_c_ycm_checker") + finish +endif +let g:loaded_syntastic_c_ycm_checker = 1 + +function! SyntaxCheckers_c_ycm_IsAvailable() + return exists('g:loaded_youcompleteme') +endfunction + +if !exists('g:loaded_youcompleteme') + finish +endif + +function! SyntaxCheckers_c_ycm_GetLocList() + return youcompleteme#CurrentFileDiagnostics() +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'c', + \ 'name': 'ycm'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/co/coco.vim b/sources_non_forked/syntastic/syntax_checkers/co/coco.vim new file mode 100644 index 00000000..a3186108 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/co/coco.vim @@ -0,0 +1,44 @@ +"============================================================================ +"File: co.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Andrew Kelley +"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_co_coco_checker") + finish +endif +let g:loaded_syntastic_co_coco_checker=1 + +"bail if the user doesnt have coco installed +if !executable("coco") + finish +endif + +function! SyntaxCheckers_co_coco_GetLocList() + return executable('coco') +endfunction + +function! SyntaxCheckers_co_coco_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'coco', + \ 'args': '-c -o /tmp', + \ 'filetype': 'co', + \ 'subchecker': 'coco' }) + + let errorformat = + \ '%EFailed at: %f,' . + \ '%ZSyntax%trror: %m on line %l,'. + \ '%EFailed at: %f,'. + \ '%Z%trror: Parse error on line %l: %m' + + return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'co', + \ 'name': 'coco'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/coffee/coffee.vim b/sources_non_forked/syntastic/syntax_checkers/coffee/coffee.vim new file mode 100644 index 00000000..846180b9 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/coffee/coffee.vim @@ -0,0 +1,48 @@ +"============================================================================ +"File: coffee.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Lincoln Stoll +"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. +" +"============================================================================ +" +" Note: this script requires CoffeeScript version 1.6.2 or newer. +" +if exists("g:loaded_syntastic_coffee_coffee_checker") + finish +endif +let g:loaded_syntastic_coffee_coffee_checker=1 + +function! SyntaxCheckers_coffee_coffee_IsAvailable() + return executable("coffee") && + \ syntastic#util#versionIsAtLeast(syntastic#util#parseVersion('coffee --version 2>' . syntastic#util#DevNull()), [1,6,2]) +endfunction + +function! SyntaxCheckers_coffee_coffee_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'coffee', + \ 'args': '-cp', + \ 'filetype': 'coffee', + \ 'subchecker': 'coffee' }) + + let errorformat = + \ '%E%f:%l:%c: %trror: %m,' . + \ 'Syntax%trror: In %f\, %m on line %l,' . + \ '%EError: In %f\, Parse error on line %l: %m,' . + \ '%EError: In %f\, %m on line %l,' . + \ '%W%f(%l): lint warning: %m,' . + \ '%W%f(%l): warning: %m,' . + \ '%E%f(%l): SyntaxError: %m,' . + \ '%-Z%p^,' . + \ '%-G%.%#' + + return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'coffee', + \ 'name': 'coffee'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/coffee/coffeelint.vim b/sources_non_forked/syntastic/syntax_checkers/coffee/coffeelint.vim new file mode 100644 index 00000000..cae5c40c --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/coffee/coffeelint.vim @@ -0,0 +1,38 @@ +"============================================================================ +"File: coffeelint.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Lincoln Stoll +"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_coffee_coffeelint_checker") + finish +endif +let g:loaded_syntastic_coffee_coffeelint_checker=1 + +function! SyntaxCheckers_coffee_coffeelint_IsAvailable() + return executable('coffeelint') +endfunction + +function! SyntaxCheckers_coffee_coffeelint_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'coffeelint', + \ 'args': '--csv', + \ 'filetype': 'coffee', + \ 'subchecker': 'coffeelint' }) + + let errorformat = '%f\,%l\,%trror\,%m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'subtype': 'Style' }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'coffee', + \ 'name': 'coffeelint'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/coq/coqtop.vim b/sources_non_forked/syntastic/syntax_checkers/coq/coqtop.vim new file mode 100644 index 00000000..f1efa4d8 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/coq/coqtop.vim @@ -0,0 +1,40 @@ +"============================================================================ +"File: coqtop.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Matvey Aksenov +"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_coq_coqtop_checker") + finish +endif +let g:loaded_syntastic_coq_coqtop_checker=1 + +function! SyntaxCheckers_coq_coqtop_IsAvailable() + return executable('coqtop') +endfunction + +function! SyntaxCheckers_coq_coqtop_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'coqtop', + \ 'args': '-noglob -batch -load-vernac-source', + \ 'filetype': 'coq', + \ 'subchecker': 'coqtop' }) + + let errorformat = + \ '%AFile \"%f\"\, line %l\, characters %c\-%.%#\:,'. + \ '%C%m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'coq', + \ 'name': 'coqtop'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/cpp/cpplint.vim b/sources_non_forked/syntastic/syntax_checkers/cpp/cpplint.vim new file mode 100644 index 00000000..35e77ccc --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/cpp/cpplint.vim @@ -0,0 +1,65 @@ +"============================================================================ +"File: cpplint.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: LCD 47 +"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. +" +"============================================================================ +" +" For details about cpplint see: +" https://code.google.com/p/google-styleguide/ +" +" Checker options: +" +" - g:syntastic_cpp_cpplint_thres (integer; default: 5) +" error threshold: policy violations with a severity above this +" value are highlighted as errors, the others are warnings +" +" - g:syntastic_cpp_cpplint_args (string; default: '--verbose=3') +" command line options to pass to cpplint + +if exists("g:loaded_syntastic_cpp_cpplint_checker") + finish +endif +let g:loaded_syntastic_cpp_cpplint_checker = 1 + +if !exists('g:syntastic_cpp_cpplint_thres') + let g:syntastic_cpp_cpplint_thres = 5 +endif + +if ! exists('g:syntastic_cpp_cpplint_args') + let g:syntastic_cpp_cpplint_args = '--verbose=3' +endif + +function! SyntaxCheckers_cpp_cpplint_IsAvailable() + return executable('cpplint.py') +endfunction + +function! SyntaxCheckers_cpp_cpplint_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'cpplint.py', + \ 'filetype': 'cpp', + \ 'subchecker': 'cpplint' }) + + let errorformat = '%A%f:%l: %m [%t],%-G%.%#' + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'subtype': 'Style' }) + + " change error types according to the prescribed threshold + for n in range(len(loclist)) + let loclist[n]['type'] = loclist[n]['type'] < g:syntastic_cpp_cpplint_thres ? 'W' : 'E' + endfor + + return loclist +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'cpp', + \ 'name': 'cpplint'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/cpp/gcc.vim b/sources_non_forked/syntastic/syntax_checkers/cpp/gcc.vim new file mode 100644 index 00000000..40b2a105 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/cpp/gcc.vim @@ -0,0 +1,179 @@ +"============================================================================ +"File: cpp.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Gregor Uhlenheuer +"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. +" +"============================================================================ + +" In order to also check header files add this to your .vimrc: +" +" let g:syntastic_cpp_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_cpp_no_include_search = 1 +" +" To disable the include of the default include dirs (such as /usr/include) +" add this line to your .vimrc: +" +" let g:syntastic_cpp_no_default_include_dirs = 1 +" +" 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_cpp_includes. Then the header files are being re-checked +" on the next file write. +" +" let g:syntastic_cpp_auto_refresh_includes = 1 +" +" Alternatively you can set the buffer local variable b:syntastic_cpp_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_cpp_cflags = ' -I/usr/include/libsoup-2.4' +" +" 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_cpp_include_dirs. This list can be used like this: +" +" let g:syntastic_cpp_include_dirs = [ 'includes', 'headers' ] +" +" Moreover it is possible to add additional compiler options to the syntax +" checking execution via the variable 'g:syntastic_cpp_compiler_options': +" +" let g:syntastic_cpp_compiler_options = ' -std=c++0x' +" +" Additionally the setting 'g:syntastic_cpp_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_cpp_config': +" +" let g:syntastic_cpp_config_file = '.config' +" +" Using the global variable 'g:syntastic_cpp_remove_include_errors' you can +" specify whether errors of files included via the +" g:syntastic_cpp_include_dirs' setting are removed from the result set: +" +" let g:syntastic_cpp_remove_include_errors = 1 +" +" Use the variable 'g:syntastic_cpp_errorformat' to override the default error +" format: +" +" let g:syntastic_cpp_errorformat = '%f:%l:%c: %trror: %m' +" +" Set your compiler executable with e.g. (defaults to g++) +" +" let g:syntastic_cpp_compiler = 'clang++' + +if exists('g:loaded_syntastic_cpp_gcc_checker') + finish +endif +let g:loaded_syntastic_cpp_gcc_checker = 1 + +if !exists('g:syntastic_cpp_compiler') + let g:syntastic_cpp_compiler = 'g++' +endif + +function! SyntaxCheckers_cpp_gcc_IsAvailable() + return executable(g:syntastic_cpp_compiler) +endfunction + +let s:save_cpo = &cpo +set cpo&vim + +if !exists('g:syntastic_cpp_compiler_options') + let g:syntastic_cpp_compiler_options = '' +endif + +if !exists('g:syntastic_cpp_config_file') + let g:syntastic_cpp_config_file = '.syntastic_cpp_config' +endif + +function! SyntaxCheckers_cpp_gcc_GetLocList() + let makeprg = g:syntastic_cpp_compiler . ' -x c++ -fsyntax-only ' + let errorformat = + \ '%-G%f:%s:,' . + \ '%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' + + if exists('g:syntastic_cpp_errorformat') + let errorformat = g:syntastic_cpp_errorformat + endif + + " add optional user-defined compiler options + let makeprg .= g:syntastic_cpp_compiler_options + + let makeprg .= ' ' . syntastic#util#shexpand('%') . + \ ' ' . syntastic#c#GetIncludeDirs('cpp') + + " determine whether to parse header files as well + if expand('%') =~? '\.\(h\|hpp\|hh\)$' + if exists('g:syntastic_cpp_check_header') + let makeprg = g:syntastic_cpp_compiler . + \ ' -c ' . syntastic#util#shexpand('%') . + \ ' ' . g:syntastic_cpp_compiler_options . + \ ' ' . syntastic#c#GetNullDevice() . + \ ' ' . syntastic#c#GetIncludeDirs('cpp') + else + return [] + endif + endif + + " check if the user manually set some cflags + if !exists('b:syntastic_cpp_cflags') + " check whether to search for include files at all + if !exists('g:syntastic_cpp_no_include_search') || + \ g:syntastic_cpp_no_include_search != 1 + " refresh the include file search if desired + if exists('g:syntastic_cpp_auto_refresh_includes') && + \ g:syntastic_cpp_auto_refresh_includes != 0 + let makeprg .= syntastic#c#SearchHeaders() + else + " search for header includes if not cached already + if !exists('b:syntastic_cpp_includes') + let b:syntastic_cpp_includes = syntastic#c#SearchHeaders() + endif + let makeprg .= b:syntastic_cpp_includes + endif + endif + else + " use the user-defined cflags + let makeprg .= b:syntastic_cpp_cflags + endif + + " add optional config file parameters + let makeprg .= ' ' . syntastic#c#ReadConfig(g:syntastic_cpp_config_file) + + " process makeprg + let errors = SyntasticMake({ 'makeprg': makeprg, + \ 'errorformat': errorformat }) + + " filter the processed errors if desired + if exists('g:syntastic_cpp_remove_include_errors') && + \ g:syntastic_cpp_remove_include_errors != 0 + return filter(errors, + \ 'has_key(v:val, "bufnr") && v:val["bufnr"]=='.bufnr('')) + else + return errors + endif +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'cpp', + \ 'name': 'gcc'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/cpp/oclint.vim b/sources_non_forked/syntastic/syntax_checkers/cpp/oclint.vim new file mode 100644 index 00000000..867f15de --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/cpp/oclint.vim @@ -0,0 +1,36 @@ +"============================================================================ +"File: oclint.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: "UnCO" Lin +"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. +"============================================================================ +" +" The setting 'g:syntastic_oclint_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_oclint_config': +" +" let g:syntastic_oclint_config_file = '.config' + +if exists("g:loaded_syntastic_cpp_oclint_checker") + finish +endif +let g:loaded_syntastic_cpp_oclint_checker = 1 + +function! SyntaxCheckers_cpp_oclint_IsAvailable() + return SyntaxCheckers_c_oclint_IsAvailable() +endfunction + +function! SyntaxCheckers_cpp_oclint_GetLocList() + return SyntaxCheckers_c_oclint_GetLocList() +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'cpp', + \ 'name': 'oclint'}) + +runtime! syntax_checkers/c/*.vim diff --git a/sources_non_forked/syntastic/syntax_checkers/cpp/ycm.vim b/sources_non_forked/syntastic/syntax_checkers/cpp/ycm.vim new file mode 100644 index 00000000..b0dbab58 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/cpp/ycm.vim @@ -0,0 +1,34 @@ +"============================================================================ +"File: ycm.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Val Markovic +"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_cpp_ycm_checker") + finish +endif +let g:loaded_syntastic_cpp_ycm_checker = 1 + +function! SyntaxCheckers_cpp_ycm_IsAvailable() + return SyntaxCheckers_c_ycm_IsAvailable() +endfunction + +if !exists('g:loaded_youcompleteme') + finish +endif + +function! SyntaxCheckers_cpp_ycm_GetLocList() + return SyntaxCheckers_c_ycm_GetLocList() +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'cpp', + \ 'name': 'ycm'}) + +runtime! syntax_checkers/c/*.vim diff --git a/sources_non_forked/syntastic/syntax_checkers/cs/mcs.vim b/sources_non_forked/syntastic/syntax_checkers/cs/mcs.vim new file mode 100644 index 00000000..b3c96a95 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/cs/mcs.vim @@ -0,0 +1,39 @@ +"============================================================================ +"File: cs.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Daniel Walker +"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_cs_mcs_checker") + finish +endif +let g:loaded_syntastic_cs_mcs_checker=1 + +function! SyntaxCheckers_cs_mcs_IsAvailable() + return executable('mcs') +endfunction + +function! SyntaxCheckers_cs_mcs_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'mcs', + \ 'args': '--parse', + \ 'filetype': 'cs', + \ 'subchecker': 'mcs' }) + + let errorformat = '%f(%l\,%c): %trror %m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'defaults': {'bufnr': bufnr("")} }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'cs', + \ 'name': 'mcs'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/css/csslint.vim b/sources_non_forked/syntastic/syntax_checkers/css/csslint.vim new file mode 100644 index 00000000..6a2659d7 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/css/csslint.vim @@ -0,0 +1,54 @@ +"============================================================================ +"File: css.vim +"Description: Syntax checking plugin for syntastic.vim using `csslint` CLI tool (http://csslint.net). +"Maintainer: Ory Band +"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. +"============================================================================ +" +" Specify additional options to csslint with this option. e.g. to disable +" warnings: +" +" let g:syntastic_csslint_options = "--warnings=none" + +if exists("g:loaded_syntastic_css_csslint_checker") + finish +endif +let g:loaded_syntastic_css_csslint_checker=1 + +if !exists('g:syntastic_csslint_options') + let g:syntastic_csslint_options = "" +endif + +function! SyntaxCheckers_css_csslint_IsAvailable() + return executable('csslint') +endfunction + +function! SyntaxCheckers_css_csslint_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'csslint', + \ 'args': '--format=compact ' . g:syntastic_csslint_options, + \ 'filetype': 'css', + \ 'subchecker': 'csslint' }) + + " Print CSS Lint's error/warning messages from compact format. Ignores blank lines. + let 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,' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'defaults': {'bufnr': bufnr("")} }) + +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'css', + \ 'name': 'csslint'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/css/phpcs.vim b/sources_non_forked/syntastic/syntax_checkers/css/phpcs.vim new file mode 100644 index 00000000..ffcb7fee --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/css/phpcs.vim @@ -0,0 +1,33 @@ +"============================================================================ +"File: phpcs.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: LCD 47 +"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. +" +"============================================================================ +" +" See here for details of phpcs +" - phpcs (see http://pear.php.net/package/PHP_CodeSniffer) +" +if exists("g:loaded_syntastic_css_phpcs_checker") + finish +endif +let g:loaded_syntastic_css_phpcs_checker=1 + +function! SyntaxCheckers_css_phpcs_IsAvailable() + return SyntaxCheckers_php_phpcs_IsAvailable() +endfunction + +function! SyntaxCheckers_css_phpcs_GetLocList() + return SyntaxCheckers_php_phpcs_GetLocList() +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'css', + \ 'name': 'phpcs'}) + +runtime! syntax_checkers/php/*.vim diff --git a/sources_non_forked/syntastic/syntax_checkers/css/prettycss.vim b/sources_non_forked/syntastic/syntax_checkers/css/prettycss.vim new file mode 100644 index 00000000..c3cd9de1 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/css/prettycss.vim @@ -0,0 +1,62 @@ +"============================================================================ +"File: prettycss.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: LCD 47 +"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. +" +"============================================================================ +" +" For details about PrettyCSS see: +" +" - http://fidian.github.io/PrettyCSS/ +" - https://github.com/fidian/PrettyCSS + +if exists("g:loaded_syntastic_css_prettycss_checker") + finish +endif +let g:loaded_syntastic_css_prettycss_checker=1 + +function! SyntaxCheckers_css_prettycss_IsAvailable() + return executable('prettycss') +endfunction + +function! SyntaxCheckers_css_prettycss_GetHighlightRegex(item) + let term = matchstr(a:item["text"], ' (\zs[^)]\+\ze)$') + if term != '' + let term = '\V' . term + endif + return term +endfunction + +function! SyntaxCheckers_css_prettycss_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'prettycss', + \ 'filetype': 'css', + \ 'subchecker': 'prettycss' }) + + " Print CSS Lint's error/warning messages from compact format. Ignores blank lines. + let errorformat = + \ '%EError: %m\, line %l\, char %c),' . + \ '%WWarning: %m\, line %l\, char %c),' . + \ '%-G%.%#' + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'defaults': {'bufnr': bufnr("")}, + \ 'postprocess': ['sort'] }) + + for n in range(len(loclist)) + let loclist[n]["text"] .= ')' + endfor + + return loclist +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'css', + \ 'name': 'prettycss'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/cucumber/cucumber.vim b/sources_non_forked/syntastic/syntax_checkers/cucumber/cucumber.vim new file mode 100644 index 00000000..4458c78f --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/cucumber/cucumber.vim @@ -0,0 +1,42 @@ +"============================================================================ +"File: cucumber.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Martin Grenfell +"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_cucumber_cucumber_checker") + finish +endif +let g:loaded_syntastic_cucumber_cucumber_checker=1 + +function! SyntaxCheckers_cucumber_cucumber_IsAvailable() + return executable('cucumber') +endfunction + +function! SyntaxCheckers_cucumber_cucumber_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'cucumber', + \ 'args': '--dry-run --quiet --strict --format pretty', + \ 'filetype': 'cucumber', + \ 'subchecker': 'cucumber' }) + + let errorformat = + \ '%f:%l:%c:%m,' . + \ '%W %.%# (%m),' . + \ '%-Z%f:%l:%.%#,'. + \ '%-G%.%#' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'cucumber', + \ 'name': 'cucumber'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/cuda/nvcc.vim b/sources_non_forked/syntastic/syntax_checkers/cuda/nvcc.vim new file mode 100644 index 00000000..7bc6c4bb --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/cuda/nvcc.vim @@ -0,0 +1,72 @@ +"============================================================================ +"File: cuda.vim +"Description: Syntax checking plugin for syntastic.vim +" +"Author: Hannes Schulz +" +"============================================================================ + +" in order to also check header files add this to your .vimrc: +" (this creates an empty .syntastic_dummy.cu file in your source directory) +" +" let g:syntastic_cuda_check_header = 1 + +" By default, nvcc and thus syntastic, defaults to the most basic architecture. +" This can produce false errors if the developer intends to compile for newer +" hardware and use newer features, eg. double precision numbers. To pass a +" specific target arch to nvcc, e.g. add the following to your .vimrc: +" +" let g:syntastic_cuda_arch = "sm_20" + + +if exists("g:loaded_syntastic_cuda_nvcc_checker") + finish +endif +let g:loaded_syntastic_cuda_nvcc_checker=1 + +function! SyntaxCheckers_cuda_nvcc_IsAvailable() + return executable('nvcc') +endfunction + +function! SyntaxCheckers_cuda_nvcc_GetLocList() + if exists('g:syntastic_cuda_arch') + let arch_flag = '-arch=' . g:syntastic_cuda_arch + else + let arch_flag = '' + endif + let makeprg = + \ 'nvcc ' . arch_flag . ' --cuda -O0 -I . -Xcompiler -fsyntax-only ' . + \ syntastic#util#shexpand('%') . ' ' . syntastic#c#GetNullDevice() + let errorformat = + \ '%*[^"]"%f"%*\D%l: %m,'. + \ '"%f"%*\D%l: %m,'. + \ '%-G%f:%l: (Each undeclared identifier is reported only once,'. + \ '%-G%f:%l: for each function it appears in.),'. + \ '%f:%l:%c:%m,'. + \ '%f(%l):%m,'. + \ '%f:%l:%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,'. + \ '%f|%l| %m' + + if expand('%') =~? '\%(.h\|.hpp\|.cuh\)$' + if exists('g:syntastic_cuda_check_header') + let makeprg = + \ 'echo > .syntastic_dummy.cu ; ' . + \ 'nvcc ' . arch_flag . ' --cuda -O0 -I . .syntastic_dummy.cu -Xcompiler -fsyntax-only -include ' . + \ syntastic#util#shexpand('%') . ' ' . syntastic#c#GetNullDevice() + else + return [] + endif + endif + + return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'cuda', + \ 'name': 'nvcc'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/d/dmd.vim b/sources_non_forked/syntastic/syntax_checkers/d/dmd.vim new file mode 100644 index 00000000..17228e41 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/d/dmd.vim @@ -0,0 +1,177 @@ +"============================================================================ +"File: d.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Alfredo Di Napoli +"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: +" +" 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 +" +" To disable the include of the default include dirs (such as /usr/include) +" add this line to your .vimrc: +" +" let g:syntastic_d_no_default_include_dirs = 1 +" +" 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' +" +" In order to add some custom include directories that should be added to the +" dmd 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' ] +" +" 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 +" +" Use the variable 'g:syntastic_d_errorformat' to override the default error +" format: +" +" let g:syntastic_d_errorformat = '%f:%l:%c: %trror: %m' +" +" Set your compiler executable with e.g. (defaults to dmd) +" +" let g:syntastic_d_compiler = 'clang++' + +if exists('g:loaded_syntastic_d_dmd_checker') + finish +endif +let g:loaded_syntastic_d_dmd_checker = 1 + +if !exists('g:syntastic_d_compiler') + let g:syntastic_d_compiler = 'dmd' +endif + +function! SyntaxCheckers_d_dmd_IsAvailable() + return executable(g:syntastic_d_compiler) +endfunction + +let s:save_cpo = &cpo +set cpo&vim + +if !exists('g:syntastic_d_compiler_options') + let g:syntastic_d_compiler_options = '' +endif + +if !exists('g:syntastic_d_config_file') + let g:syntastic_d_config_file = '.syntastic_d_config' +endif + +function! SyntaxCheckers_d_dmd_GetLocList() + let makeprg = g:syntastic_d_compiler . ' -c -of' . syntastic#util#DevNull() . ' ' + let errorformat = '%-G%f:%s:,%f(%l): %m,%f:%l: %m' + + if exists('g:syntastic_d_errorformat') + let errorformat = g:syntastic_d_errorformat + endif + + " add optional user-defined compiler options + let makeprg .= g:syntastic_d_compiler_options + + let makeprg .= ' ' . syntastic#util#shexpand('%') . + \ ' ' . syntastic#c#GetIncludeDirs('d') + + " determine whether to parse header files as well + if expand('%') =~? '\.di$' + if exists('g:syntastic_d_check_header') + let makeprg = g:syntastic_d_compiler . + \ ' -c ' . syntastic#util#shexpand('%') . + \ ' -of' . syntastic#util#DevNull() . + \ ' ' . g:syntastic_d_compiler_options . + \ ' ' . syntastic#c#GetIncludeDirs('d') + else + return [] + endif + endif + + " check if the user manually set some cflags + if !exists('b:syntastic_d_cflags') + " check whether to search for include files at all + if !exists('g:syntastic_d_no_include_search') || + \ g:syntastic_d_no_include_search != 1 + " refresh the include file search if desired + if exists('g:syntastic_d_auto_refresh_includes') && + \ g:syntastic_d_auto_refresh_includes != 0 + let makeprg .= syntastic#c#SearchHeaders() + else + " search for header includes if not cached already + if !exists('b:syntastic_d_includes') + let b:syntastic_d_includes = syntastic#c#SearchHeaders() + endif + let makeprg .= b:syntastic_d_includes + endif + endif + else + " use the user-defined cflags + 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 + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'd', + \ 'name': 'dmd'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/dart/dart_analyzer.vim b/sources_non_forked/syntastic/syntax_checkers/dart/dart_analyzer.vim new file mode 100644 index 00000000..a0835c41 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/dart/dart_analyzer.vim @@ -0,0 +1,66 @@ +"============================================================================ +"File: dart_analyzer.vim +"Description: Dart syntax checker - using dart_analyzer +"Maintainer: Maksim Ryzhikov +"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_dart_dart_analyzer_checker") + finish +endif +let g:loaded_syntastic_dart_dart_analyzer_checker=1 + +if !exists("g:syntastic_dart_analyzer_conf") + let g:syntastic_dart_analyzer_conf = '' +endif + +function! SyntaxCheckers_dart_dart_analyzer_IsAvailable() + return executable("dart_analyzer") +endfunction + +function! SyntaxCheckers_dart_dart_analyzer_GetHighlightRegex(error) + let lcol = a:error['col'] - 1 + let rcol = a:error['nr'] + lcol + 1 + + return '\%>'.lcol.'c\%<'.rcol.'c' +endfunction + +function! SyntaxCheckers_dart_dart_analyzer_GetLocList() + let args = !empty(g:syntastic_dart_analyzer_conf) ? ' ' . g:syntastic_dart_analyzer_conf : '' + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'dart_analyzer', + \ 'args': '--error_format machine', + \ 'post_args': args, + \ 'filetype': 'dart', + \ 'subchecker': 'dart_analyzer' }) + + " Machine readable format looks like: + " SEVERITY|TYPE|ERROR_CODE|file:FILENAME|LINE_NUMBER|COLUMN|LENGTH|MESSAGE + " SEVERITY: (WARNING|ERROR) + " TYPE: (RESOLVER|STATIC_TYPE|...) + " ERROR_CODE: (NO_SUCH_TYPE|...) + " FILENAME: String + " LINE_NUMBER: int + " COLUMN: int + " LENGHT: int + " MESSAGE: String + + " We use %n to grab the error length to be able to access it in the matcher. + let commonformat = '|%.%#|%.%#|file:%f|%l|%c|%n|%m' + + " TODO(amouravski): simply take everything after ERROR|WARNING as a message + " and then parse it by hand later. + let errorformat = '%EERROR'.l:commonformat.','. + \'%WWARNING'.l:commonformat + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'dart', + \ 'name': 'dart_analyzer'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/docbk/xmllint.vim b/sources_non_forked/syntastic/syntax_checkers/docbk/xmllint.vim new file mode 100644 index 00000000..cc0e3e35 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/docbk/xmllint.vim @@ -0,0 +1,30 @@ +"============================================================================ +"File: docbk.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Martin Grenfell +"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_xmllint_checker") + finish +endif +let g:loaded_syntastic_docbk_xmllint_checker=1 + +function! SyntaxCheckers_docbk_xmllint_IsAvailable() + return SyntaxCheckers_xml_xmllint_IsAvailable() +endfunction + +function! SyntaxCheckers_docbk_xmllint_GetLocList() + return SyntaxCheckers_xml_xmllint_GetLocList() +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'docbk', + \ 'name': 'xmllint'}) + +runtime! syntax_checkers/xml/*.vim diff --git a/sources_non_forked/syntastic/syntax_checkers/elixir/elixir.vim b/sources_non_forked/syntastic/syntax_checkers/elixir/elixir.vim new file mode 100644 index 00000000..521e9456 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/elixir/elixir.vim @@ -0,0 +1,45 @@ +"============================================================================ +"File: elixir.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Richard Ramsden +"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_elixir_elixir_checker") + finish +endif +let g:loaded_syntastic_elixir_elixir_checker=1 + +" TODO: we should probably split this into separate checkers +function! SyntaxCheckers_elixir_elixir_IsAvailable() + return executable('elixir') && executable('mix') +endfunction + +function! SyntaxCheckers_elixir_elixir_GetLocList() + + let make_options = {} + let compile_command = 'elixir' + let mix_file = syntastic#util#findInParent('mix.exs', expand('%:p:h')) + + if filereadable(mix_file) + let compile_command = 'mix compile' + let make_options['cwd'] = fnamemodify(mix_file, ':p:h') + endif + + let make_options['makeprg'] = syntastic#makeprg#build({ + \ 'exe': compile_command, + \ 'filetype': 'elixir', + \ 'subchecker': 'elixir' }) + + let make_options['errorformat'] = '** %*[^\ ] %f:%l: %m' + + return SyntasticMake(make_options) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'elixir', + \ 'name': 'elixir'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/erlang/erlang.vim b/sources_non_forked/syntastic/syntax_checkers/erlang/erlang.vim new file mode 100644 index 00000000..967b759d --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/erlang/erlang.vim @@ -0,0 +1,51 @@ +"============================================================================ +"File: erlang.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Pawel Salata +"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_erlang_erlang_checker") + finish +endif +let g:loaded_syntastic_erlang_erlang_checker=1 + +let s:check_file = expand(':p:h') . '/erlang_check_file.erl' +if !exists("g:syntastic_erlc_include_path") + let g:syntastic_erlc_include_path="" +endif + +function! SyntaxCheckers_erlang_escript_IsAvailable() + return executable('escript') +endfunction + +function! SyntaxCheckers_erlang_escript_GetLocList() + let extension = expand('%:e') + if match(extension, 'hrl') >= 0 + return [] + endif + let shebang = getbufline(bufnr('%'), 1)[0] + if len(shebang) > 0 + if match(shebang, 'escript') >= 0 + let makeprg = 'escript -s ' . syntastic#util#shexpand('%:p') + else + let makeprg = 'escript ' . s:check_file . ' ' . syntastic#util#shexpand('%:p') . ' ' . g:syntastic_erlc_include_path + endif + else + let makeprg = 'escript ' . s:check_file . ' ' . syntastic#util#shexpand('%:p') . ' '. g:syntastic_erlc_include_path + endif + let errorformat = + \ '%f:%l:\ %tarning:\ %m,'. + \ '%E%f:%l:\ %m' + + return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'erlang', + \ 'name': 'escript'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/erlang/erlang_check_file.erl b/sources_non_forked/syntastic/syntax_checkers/erlang/erlang_check_file.erl new file mode 100755 index 00000000..54cc9366 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/erlang/erlang_check_file.erl @@ -0,0 +1,34 @@ +#!/usr/bin/env escript +-export([main/1]). + +main([FileName]) -> + LibDirs = filelib:wildcard("{lib,deps}/*/ebin"), + compile(FileName, LibDirs); +main([FileName | LibDirs]) -> + compile(FileName, LibDirs). + +compile(FileName, LibDirs) -> + Root = get_root(filename:dirname(FileName)), + ok = code:add_pathsa(LibDirs), + compile:file(FileName, [warn_obsolete_guard, + warn_unused_import, + warn_shadow_vars, + warn_export_vars, + strong_validation, + report, + {i, filename:join(Root, "include")}, + {i, filename:join(Root, "deps")}, + {i, filename:join(Root, "apps")}, + {i, filename:join(Root, "lib")} + ]). + +get_root(Dir) -> + Path = filename:split(filename:absname(Dir)), + filename:join(get_root(lists:reverse(Path), Path)). + +get_root([], Path) -> + Path; +get_root(["src" | Tail], _Path) -> + lists:reverse(Tail); +get_root([_ | Tail], Path) -> + get_root(Tail, Path). diff --git a/sources_non_forked/syntastic/syntax_checkers/eruby/ruby.vim b/sources_non_forked/syntastic/syntax_checkers/eruby/ruby.vim new file mode 100644 index 00000000..3a772351 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/eruby/ruby.vim @@ -0,0 +1,65 @@ +"============================================================================ +"File: ruby.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Martin Grenfell +"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_eruby_ruby_checker") + finish +endif +let g:loaded_syntastic_eruby_ruby_checker=1 + +if !exists("g:syntastic_ruby_exec") + let g:syntastic_ruby_exec = "ruby" +endif + +function! SyntaxCheckers_eruby_ruby_IsAvailable() + return executable(expand(g:syntastic_ruby_exec)) +endfunction + +function! SyntaxCheckers_eruby_ruby_GetLocList() + let exe = expand(g:syntastic_ruby_exec) + if !has('win32') + let exe = 'RUBYOPT= ' . exe + endif + + let fname = "'" . escape(expand('%'), "\\'") . "'" + + " TODO: encodings became useful in ruby 1.9 :) + if syntastic#util#versionIsAtLeast(syntastic#util#parseVersion('ruby --version'), [1, 9]) + let enc = &fileencoding != '' ? &fileencoding : &encoding + let encoding_spec = ', :encoding => "' . (enc ==? 'utf-8' ? 'UTF-8' : 'BINARY') . '"' + else + let encoding_spec = '' + endif + + "gsub fixes issue #7, rails has it's own eruby syntax + let makeprg = + \ exe . ' -rerb -e ' . + \ syntastic#util#shescape('puts ERB.new(File.read(' . + \ fname . encoding_spec . + \ ').gsub(''<\%='',''<\%''), nil, ''-'').src') . + \ ' \| ' . exe . ' -c' + + let errorformat = + \ '%-GSyntax OK,'. + \ '%E-:%l: syntax error\, %m,%Z%p^,'. + \ '%W-:%l: warning: %m,'. + \ '%Z%p^,'. + \ '%-C%.%#' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'defaults': { 'bufnr': bufnr(""), 'vcol': 1 } }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'eruby', + \ 'name': 'ruby'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/fortran/gfortran.vim b/sources_non_forked/syntastic/syntax_checkers/fortran/gfortran.vim new file mode 100644 index 00000000..0df45d3a --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/fortran/gfortran.vim @@ -0,0 +1,63 @@ +"============================================================================ +"File: fortran.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Karl Yngve Lervåg +"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. +"Note: This syntax checker uses gfortran with the option -fsyntax-only +" to check for errors and warnings. Additional flags may be +" supplied through both local and global variables, +" b:syntastic_fortran_flags, +" g:syntastic_fortran_flags. +" This is particularly useful when the source requires module files +" in order to compile (that is when it needs modules defined in +" separate files). +" +"============================================================================ + +if exists("g:loaded_syntastic_fortran_gfortran_checker") + finish +endif +let g:loaded_syntastic_fortran_gfortran_checker=1 + +if !exists('g:syntastic_fortran_flags') + let g:syntastic_fortran_flags = '' +endif + +function! SyntaxCheckers_fortran_gfortran_IsAvailable() + return executable('gfortran') +endfunction + +function! SyntaxCheckers_fortran_gfortran_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'gfortran', + \ 'args': s:args(), + \ 'filetype': 'fortran', + \ 'subchecker': 'gfortran' }) + + let errorformat = + \ '%-C %#,'. + \ '%-C %#%.%#,'. + \ '%A%f:%l.%c:,'. + \ '%Z%m,'. + \ '%G%.%#' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +function s:args() + let rv = '-fsyntax-only ' . g:syntastic_fortran_flags + if exists('b:syntastic_fortran_flags') + let rv .= " " . b:syntastic_fortran_flags + endif + return rv +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'fortran', + \ 'name': 'gfortran'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/go/go.vim b/sources_non_forked/syntastic/syntax_checkers/go/go.vim new file mode 100644 index 00000000..e389012a --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/go/go.vim @@ -0,0 +1,75 @@ +"============================================================================ +"File: go.vim +"Description: Check go syntax using 'gofmt -l' followed by 'go [build|test]' +"Maintainer: Kamil Kisiel +"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. +" +" This syntax checker does not reformat your source code. +" Use a BufWritePre autocommand to that end: +" autocmd FileType go autocmd BufWritePre Fmt +"============================================================================ +if exists("g:loaded_syntastic_go_go_checker") + finish +endif +let g:loaded_syntastic_go_go_checker=1 + +function! SyntaxCheckers_go_go_IsAvailable() + return executable('go') +endfunction + +function! SyntaxCheckers_go_go_GetLocList() + " Check with gofmt first, since `go build` and `go test` might not report + " syntax errors in the current file if another file with syntax error is + " compiled first. + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'gofmt', + \ 'args': '-l', + \ 'tail': '1>' . syntastic#util#DevNull(), + \ 'filetype': 'go', + \ 'subchecker': 'go' }) + + let errorformat = + \ '%f:%l:%c: %m,' . + \ '%-G%.%#' + + let errors = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'defaults': {'type': 'e'} }) + if !empty(errors) + return errors + endif + + " Test files, i.e. files with a name ending in `_test.go`, are not + " compiled by `go build`, therefore `go test` must be called for those. + if match(expand('%'), '_test.go$') == -1 + let makeprg = 'go build ' . syntastic#c#GetNullDevice() + else + let makeprg = 'go test -c ' . syntastic#c#GetNullDevice() + endif + + let errorformat = + \ '%f:%l:%c:%m,' . + \ '%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({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'cwd': expand('%:p:h'), + \ 'defaults': {'type': 'e'} }) + + return errors +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'go', + \ 'name': 'go'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/go/gofmt.vim b/sources_non_forked/syntastic/syntax_checkers/go/gofmt.vim new file mode 100644 index 00000000..b150916f --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/go/gofmt.vim @@ -0,0 +1,42 @@ +"============================================================================ +"File: gofmt.vim +"Description: Check go syntax using 'gofmt -l' +"Maintainer: Brandon Thomson +"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. +" +" This syntax checker does not reformat your source code. +" Use a BufWritePre autocommand to that end: +" autocmd FileType go autocmd BufWritePre Fmt +"============================================================================ +if exists("g:loaded_syntastic_go_gofmt_checker") + finish +endif +let g:loaded_syntastic_go_gofmt_checker=1 + +function! SyntaxCheckers_go_gofmt_IsAvailable() + return executable('gofmt') +endfunction + +function! SyntaxCheckers_go_gofmt_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'gofmt', + \ 'args': '-l', + \ 'tail': '1>' . syntastic#util#DevNull(), + \ 'filetype': 'go', + \ 'subchecker': 'gofmt' }) + + let errorformat = '%f:%l:%c: %m,%-G%.%#' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'defaults': {'type': 'e'} }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'go', + \ 'name': 'gofmt'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/go/golint.vim b/sources_non_forked/syntastic/syntax_checkers/go/golint.vim new file mode 100644 index 00000000..954a7c2a --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/go/golint.vim @@ -0,0 +1,37 @@ +"============================================================================ +"File: golint.vim +"Description: Check go syntax using 'golint' +"Maintainer: Hiroshi Ioka +"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_go_golint_checker") + finish +endif +let g:loaded_syntastic_go_golint_checker=1 + +function! SyntaxCheckers_go_golint_IsAvailable() + return executable('golint') +endfunction + +function! SyntaxCheckers_go_golint_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'golint', + \ 'filetype': 'go', + \ 'subchecker': 'golint' }) + + let errorformat = '%f:%l:%c: %m,%-G%.%#' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'subtype': 'Style' }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'go', + \ 'name': 'golint'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/go/govet.vim b/sources_non_forked/syntastic/syntax_checkers/go/govet.vim new file mode 100644 index 00000000..4b1d7efb --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/go/govet.vim @@ -0,0 +1,40 @@ +"============================================================================ +"File: govet.vim +"Description: Perform static analysis of Go code with the vet tool +"Maintainer: Kamil Kisiel +"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_go_govet_checker") + finish +endif +let g:loaded_syntastic_go_govet_checker=1 + +function! SyntaxCheckers_go_govet_IsAvailable() + return executable('go') +endfunction + +function! SyntaxCheckers_go_govet_GetLocList() + let makeprg = 'go vet' + 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({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'cwd': expand('%:p:h'), + \ 'defaults': {'type': 'w'} }) + + return errors +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'go', + \ 'name': 'govet'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/haml/haml.vim b/sources_non_forked/syntastic/syntax_checkers/haml/haml.vim new file mode 100644 index 00000000..77d0a8dc --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/haml/haml.vim @@ -0,0 +1,45 @@ +"============================================================================ +"File: haml.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Martin Grenfell +"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_haml_haml_checker") + finish +endif +let g:loaded_syntastic_haml_haml_checker=1 + +if !exists("g:syntastic_haml_interpreter") + let g:syntastic_haml_interpreter = "haml" +endif + +function! SyntaxCheckers_haml_haml_IsAvailable() + return executable(g:syntastic_haml_interpreter) +endfunction + +function! SyntaxCheckers_haml_haml_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': g:syntastic_haml_interpreter, + \ 'args': '-c', + \ 'filetype': 'haml', + \ 'subchecker': 'haml' }) + + let errorformat = + \ 'Haml error on line %l: %m,' . + \ 'Syntax error on line %l: %m,' . + \ '%-G%.%#' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'haml', + \ 'name': 'haml'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/haskell/ghc-mod.vim b/sources_non_forked/syntastic/syntax_checkers/haskell/ghc-mod.vim new file mode 100644 index 00000000..f3677dc1 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/haskell/ghc-mod.vim @@ -0,0 +1,47 @@ +"============================================================================ +"File: ghc-mod.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Anthony Carapetis +"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_haskell_ghc_mod_checker") + finish +endif +let g:loaded_syntastic_haskell_ghc_mod_checker=1 + +function! SyntaxCheckers_haskell_ghc_mod_IsAvailable() + return executable('ghc-mod') +endfunction + +function! SyntaxCheckers_haskell_ghc_mod_GetLocList() + let errorformat = + \ '%-G%\s%#,' . + \ '%f:%l:%c:%trror: %m,' . + \ '%f:%l:%c:%tarning: %m,'. + \ '%f:%l:%c: %trror: %m,' . + \ '%f:%l:%c: %tarning: %m,' . + \ '%f:%l:%c:%m,' . + \ '%E%f:%l:%c:,' . + \ '%Z%m' + + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'ghc-mod check', + \ 'filetype': 'haskell', + \ 'subchecker': 'ghc_mod' }) + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) + + return loclist +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'haskell', + \ 'name': 'ghc_mod'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/haskell/hdevtools.vim b/sources_non_forked/syntastic/syntax_checkers/haskell/hdevtools.vim new file mode 100644 index 00000000..3f4b0b73 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/haskell/hdevtools.vim @@ -0,0 +1,46 @@ +"============================================================================ +"File: hdevtools.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Anthony Carapetis +"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_haskell_hdevtools_checker") + finish +endif +let g:loaded_syntastic_haskell_hdevtools_checker=1 + +function! SyntaxCheckers_haskell_hdevtools_IsAvailable() + return executable('hdevtools') +endfunction + +function! SyntaxCheckers_haskell_hdevtools_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'hdevtools check', + \ 'args': get(g:, 'hdevtools_options', ''), + \ 'filetype': 'haskell', + \ 'subchecker': 'hdevtools' }) + + let errorformat= '\%-Z\ %#,'. + \ '%W%f:%l:%c:\ Warning:\ %m,'. + \ '%E%f:%l:%c:\ %m,'. + \ '%E%>%f:%l:%c:,'. + \ '%+C\ \ %#%m,'. + \ '%W%>%f:%l:%c:,'. + \ '%+C\ \ %#%tarning:\ %m,' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'postprocess': ['compressWhitespace'] }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'haskell', + \ 'name': 'hdevtools'}) + diff --git a/sources_non_forked/syntastic/syntax_checkers/haskell/hlint.vim b/sources_non_forked/syntastic/syntax_checkers/haskell/hlint.vim new file mode 100644 index 00000000..c748b77c --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/haskell/hlint.vim @@ -0,0 +1,38 @@ +"============================================================================ +"File: hlint.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Nicolas Wu +"License: BSD +"============================================================================ + +if exists("g:loaded_syntastic_haskell_hlint_checker") + finish +endif +let g:loaded_syntastic_haskell_hlint_checker=1 + +function! SyntaxCheckers_haskell_hlint_IsAvailable() + return executable('hlint') +endfunction + +function! SyntaxCheckers_haskell_hlint_GetLocList() + let errorformat = + \ '%E%f:%l:%c: Error: %m,' . + \ '%W%f:%l:%c: Warning: %m,' . + \ '%C%m' + + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'hlint', + \ 'filetype': 'haskell', + \ 'subchecker': 'hlint' }) + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'postprocess': ['compressWhitespace'] }) + + return loclist +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'haskell', + \ 'name': 'hlint'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/haxe/haxe.vim b/sources_non_forked/syntastic/syntax_checkers/haxe/haxe.vim new file mode 100644 index 00000000..969a9369 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/haxe/haxe.vim @@ -0,0 +1,52 @@ +"============================================================================ +"File: haxe.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: David Bernard +"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_haxe_haxe_checker") + finish +endif +let g:loaded_syntastic_haxe_haxe_checker=1 + +function! SyntaxCheckers_haxe_haxe_IsAvailable() + return executable('haxe') +endfunction + +function! SyntaxCheckers_haxe_haxe_GetLocList() + if exists('b:vaxe_hxml') + let hxml = b:vaxe_hxml + elseif exists('g:vaxe_hxml') + let hxml = g:vaxe_hxml + else + let hxml = syntastic#util#findInParent('*.hxml', expand('%:p:h')) + endif + let hxml = fnamemodify(hxml, ':p') + + if !empty(hxml) + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'haxe', + \ 'fname': syntastic#util#shescape(fnameescape(fnamemodify(hxml, ':t'))), + \ 'filetype': 'haxe', + \ 'subchecker': 'haxe' }) + + let errorformat = '%E%f:%l: characters %c-%*[0-9] : %m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'cwd': fnamemodify(hxml, ':h') }) + endif + + return [] +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'haxe', + \ 'name': 'haxe'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/hss/hss.vim b/sources_non_forked/syntastic/syntax_checkers/hss/hss.vim new file mode 100644 index 00000000..5d2cf005 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/hss/hss.vim @@ -0,0 +1,38 @@ +"============================================================================ +"File: hss.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Justin Donaldson (jdonaldson@gmail.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_hss_hss_checker") + finish +endif +let g:loaded_syntastic_hss_hss_checker=1 + +function! SyntaxCheckers_hss_hss_IsAvailable() + return executable('hss') +endfunction + +function! SyntaxCheckers_hss_hss_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'hss', + \ 'args' : '-output ' . syntastic#util#DevNull(), + \ 'filetype': 'hss', + \ 'subchecker': 'hss' }) + + let errorformat = '%E%f:%l: %m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'hss', + \ 'name': 'hss'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/html/tidy.vim b/sources_non_forked/syntastic/syntax_checkers/html/tidy.vim new file mode 100644 index 00000000..27a97613 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/html/tidy.vim @@ -0,0 +1,174 @@ +"============================================================================ +"File: tidy.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Martin Grenfell +"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. +" +"============================================================================ +" +" Checker option: +" +" - g:syntastic_html_tidy_ignore_errors (list; default: []) +" list of errors to ignore +" - g:syntastic_html_tidy_blocklevel_tags (list; default: []) +" list of additional blocklevel tags, to be added to "--new-blocklevel-tags" +" - g:syntastic_html_tidy_inline_tags (list; default: []) +" list of additional inline tags, to be added to "--new-inline-tags" +" - g:syntastic_html_tidy_empty_tags (list; default: []) +" list of additional empty tags, to be added to "--new-empty-tags" + +if exists("g:loaded_syntastic_html_tidy_checker") + finish +endif +let g:loaded_syntastic_html_tidy_checker = 1 + +if !exists('g:syntastic_html_tidy_ignore_errors') + let g:syntastic_html_tidy_ignore_errors = [] +endif + +if !exists('g:syntastic_html_tidy_blocklevel_tags') + let g:syntastic_html_tidy_blocklevel_tags = [] +endif + +if !exists('g:syntastic_html_tidy_inline_tags') + let g:syntastic_html_tidy_inline_tags = [] +endif + +if !exists('g:syntastic_html_tidy_empty_tags') + let g:syntastic_html_tidy_empty_tags = [] +endif + +function! SyntaxCheckers_html_tidy_IsAvailable() + return executable('tidy') +endfunction + +" 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', + \'cp932' : '-shiftjis', + \'sjis' : '-shiftjis', + \'cp850' : '-ibm858', + \} + return get(tidy_opts, &fileencoding, '-utf8') +endfunction + +let s:ignore_errors = [ + \ " lacks \"summary\" attribute", + \ "not approved by W3C", + \ "attribute \"placeholder\"", + \ " proprietary attribute \"charset\"", + \ " lacks \"content\" attribute", + \ "inserting \"type\" attribute", + \ "proprietary attribute \"data-", + \ "missing declaration", + \ "inserting implicit ", + \ "inserting missing 'title' element", + \ "attribute \"[+", + \ "unescaped & or unknown entity", + \ " attribute \"type\" has invalid value \"search\"" + \ ] + +let s:blocklevel_tags = [ + \ "main", + \ "section", + \ "article", + \ "aside", + \ "hgroup", + \ "header", + \ "footer", + \ "nav", + \ "figure", + \ "figcaption" + \ ] + +let s:inline_tags = [ + \ "video", + \ "audio", + \ "source", + \ "embed", + \ "mark", + \ "progress", + \ "meter", + \ "time", + \ "ruby", + \ "rt", + \ "rp", + \ "canvas", + \ "command", + \ "details", + \ "datalist" + \ ] + +let s:empty_tags = [ + \ "wbr", + \ "keygen" + \ ] + +function! s:IgnoreError(text) + for i in s:ignore_errors + g:syntastic_html_tidy_ignore_errors + if stridx(a:text, i) != -1 + return 1 + endif + endfor + return 0 +endfunction + +function! s:NewTags(name) + return syntastic#util#shescape(join( s:{a:name} + g:syntastic_html_tidy_{a:name}, ',' )) +endfunction + +function s:Args() + let args = s:TidyEncOptByFenc() . + \ ' --new-blocklevel-tags ' . s:NewTags('blocklevel_tags') . + \ ' --new-inline-tags ' . s:NewTags('inline_tags') . + \ ' --new-empty-tags ' . s:NewTags('empty_tags') . + \ ' -e' + return args +endfunction + +function! SyntaxCheckers_html_tidy_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'tidy', + \ 'args': s:Args(), + \ 'tail': '2>&1', + \ 'filetype': 'html', + \ 'subchecker': 'tidy' }) + + let errorformat = + \ '%Wline %l column %v - Warning: %m,' . + \ '%Eline %l column %v - Error: %m,' . + \ '%-G%.%#' + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'defaults': {'bufnr': bufnr("")}, + \ 'returns': [0, 1, 2] }) + + " filter out valid HTML5 from the errors + for n in range(len(loclist)) + if loclist[n]['valid'] && s:IgnoreError(loclist[n]['text']) == 1 + let loclist[n]['valid'] = 0 + endif + endfor + + return loclist +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'html', + \ 'name': 'tidy'}) + diff --git a/sources_non_forked/syntastic/syntax_checkers/html/validator.vim b/sources_non_forked/syntastic/syntax_checkers/html/validator.vim new file mode 100644 index 00000000..7e24a17b --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/html/validator.vim @@ -0,0 +1,78 @@ +"============================================================================ +"File: validator.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: LCD 47 +"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. +" +"============================================================================ +" +" For detail;s about validator see: http://about.validator.nu/ +" +" Checker options: +" +" - g:syntastic_html_validator_api (string; default: 'http://validator.nu/') +" URL of the service to use for checking; leave it to the default to run the +" checks against http://validator.nu/, or set it to 'http://localhost:8888/' +" if you're running a local service as per http://about.validator.nu/#src +" +" - g:syntastic_html_validator_parser (string; default: empty) +" parser to use; legal values are: xml, xmldtd, html, html5, html4, html4tr; +" set it to 'html5' to check HTML5 files; see the wiki for reference: +" http://wiki.whatwg.org/wiki/Validator.nu_Common_Input_Parameters#parser +" +" - g:syntastic_html_validator_nsfilter (string; default: empty) +" sets the nsfilter for the parser; see the wiki for details: +" http://wiki.whatwg.org/wiki/Validator.nu_Common_Input_Parameters#nsfilter + +if exists("g:loaded_syntastic_html_validator_checker") + finish +endif +let g:loaded_syntastic_html_validator_checker=1 + +if !exists('g:syntastic_html_validator_api') + let g:syntastic_html_validator_api = 'http://validator.nu/' +endif + +if !exists('g:syntastic_html_validator_parser') + let g:syntastic_html_validator_parser = '' +endif + +if !exists('g:syntastic_html_validator_nsfilter') + let g:syntastic_html_validator_nsfilter = '' +endif + +let s:decoder = 'awk -f ' . syntastic#util#shescape(expand(':p:h') . '/validator_decode.awk') + +function! SyntaxCheckers_html_validator_IsAvailable() + return executable('curl') && executable('awk') +endfunction + +function! SyntaxCheckers_html_validator_GetLocList() + let makeprg = 'curl -s --compressed -F out=gnu -F asciiquotes=yes' . + \ (!empty(g:syntastic_html_validator_parser) ? ' -F parser=' . g:syntastic_html_validator_parser : '') . + \ (!empty(g:syntastic_html_validator_nsfilter) ? ' -F nsfilter=' . g:syntastic_html_validator_nsfilter : '') . + \ ' -F doc=@' . syntastic#util#shexpand('%') . '\;type=text/html\;filename=' . syntastic#util#shexpand('%') . ' ' . + \ g:syntastic_html_validator_api . ' \| ' . s:decoder + let errorformat = + \ '%E"%f":%l: %trror: %m,' . + \ '%E"%f":%l-%\d%\+: %trror: %m,' . + \ '%E"%f":%l%\%.%c: %trror: %m,' . + \ '%E"%f":%l%\%.%c-%\d%\+%\%.%\d%\+: %trror: %m,' . + \ '%E"%f":%l: %trror fatal: %m,' . + \ '%E"%f":%l-%\d%\+: %trror fatal: %m,' . + \ '%E"%f":%l%\%.%c: %trror fatal: %m,' . + \ '%E"%f":%l%\%.%c-%\d%\+%\%.%\d%\+: %trror fatal: %m,' . + \ '%W"%f":%l: info %tarning: %m,' . + \ '%W"%f":%l-%\d%\+: info %tarning: %m,' . + \ '%W"%f":%l%\%.%c: info %tarning: %m,' . + \ '%W"%f":%l%\%.%c-%\d%\+%\%.%\d%\+: info %tarning: %m' + return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat, 'defaults': {'bufnr': bufnr("")} }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'html', + \ 'name': 'validator'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/html/validator_decode.awk b/sources_non_forked/syntastic/syntax_checkers/html/validator_decode.awk new file mode 100644 index 00000000..71db8067 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/html/validator_decode.awk @@ -0,0 +1,61 @@ +#!/usr/bin/awk -f +#============================================================================ +#File: validator_decode.awk +#Description: Helper script for validator.vim +#Maintainer: LCD 47 +#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. +# +#============================================================================ + +BEGIN { + FS = OFS = "\"" + hextab ["0"] = 0; hextab ["8"] = 8; + hextab ["1"] = 1; hextab ["9"] = 9; + hextab ["2"] = 2; hextab ["A"] = hextab ["a"] = 10 + hextab ["3"] = 3; hextab ["B"] = hextab ["b"] = 11; + hextab ["4"] = 4; hextab ["C"] = hextab ["c"] = 12; + hextab ["5"] = 5; hextab ["D"] = hextab ["d"] = 13; + hextab ["6"] = 6; hextab ["E"] = hextab ["e"] = 14; + hextab ["7"] = 7; hextab ["F"] = hextab ["f"] = 15; +} + +function urldecode (url) { + decoded = "" + i = 1 + len = length (url) + while ( i <= len ) { + c = substr (url, i, 1) + if ( c == "%" ) { + if ( i + 2 <= len ) { + c1 = substr (url, i + 1, 1) + c2 = substr (url, i + 2, 1) + if ( hextab [c1] != "" && hextab [c2] != "" ) { + code = 0 + hextab [c1] * 16 + hextab [c2] + 0 + c = sprintf ("%c", code) + } + else + c = c c1 c2 + i += 2 + } + else if ( i + 1 <= len ) { + c = substr (url, i, 2) + i++ + } + } + else if ( c == "+" ) + c = " " + decoded = decoded c + i++ + } + return decoded +} + +{ + $2 = urldecode($2) + gsub ("\\\\\"", "\"", $2) + print +} diff --git a/sources_non_forked/syntastic/syntax_checkers/html/w3.vim b/sources_non_forked/syntastic/syntax_checkers/html/w3.vim new file mode 100644 index 00000000..01c413cc --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/html/w3.vim @@ -0,0 +1,65 @@ +"============================================================================ +"File: w3.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Martin Grenfell +"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. +" +"============================================================================ +" +" Checker option: +" +" - g:syntastic_html_w3_api (string; default: 'http://validator.w3.org/check') +" URL of the service to use for checking; leave it to the default to run the +" checks against http://validator.w3.org/, or set it to +" 'http://localhost/w3c-validator/check' if you're running a local service + +if exists("g:loaded_syntastic_html_w3_checker") + finish +endif +let g:loaded_syntastic_html_w3_checker = 1 + +if !exists('g:syntastic_html_w3_api') + let g:syntastic_html_w3_api = 'http://validator.w3.org/check' +endif + +function! SyntaxCheckers_html_w3_IsAvailable() + return executable('curl') +endfunction + +function! SyntaxCheckers_html_w3_GetLocList() + let makeprg = 'curl -s -F output=json ' . + \ '-F uploaded_file=@' . syntastic#util#shexpand('%:p') . '\;type=text/html ' . + \ g:syntastic_html_w3_api + + let errorformat = + \ '%A %\+{,' . + \ '%C %\+"lastLine": %l\,%\?,' . + \ '%C %\+"lastColumn": %c\,%\?,' . + \ '%C %\+"message": "%m"\,%\?,' . + \ '%C %\+"type": "%trror"\,%\?,' . + \ '%-G %\+"type": "%tnfo"\,%\?,' . + \ '%C %\+"subtype": "%tarning"\,%\?,' . + \ '%Z %\+}\,,' . + \ '%-G%.%#' + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'defaults': {'bufnr': bufnr("")}, + \ 'returns': [0] }) + + for n in range(len(loclist)) + let loclist[n]['text'] = substitute(loclist[n]['text'], '\\\([\"]\)', '\1', 'g') + endfor + + return loclist +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'html', + \ 'name': 'w3'}) + diff --git a/sources_non_forked/syntastic/syntax_checkers/java/checkstyle.vim b/sources_non_forked/syntastic/syntax_checkers/java/checkstyle.vim new file mode 100644 index 00000000..da32c65c --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/java/checkstyle.vim @@ -0,0 +1,60 @@ +"============================================================================ +"File: checkstyle.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Dmitry Geurkov +"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. +" +" Tested with checkstyle 5.5 +"============================================================================ +if exists("g:loaded_syntastic_java_checkstyle_checker") + finish +endif +let g:loaded_syntastic_java_checkstyle_checker=1 + +if !exists("g:syntastic_java_checkstyle_classpath") + let g:syntastic_java_checkstyle_classpath = 'checkstyle-5.5-all.jar' +endif + +if !exists("g:syntastic_java_checkstyle_conf_file") + let g:syntastic_java_checkstyle_conf_file = 'sun_checks.xml' +endif + +function! SyntaxCheckers_java_checkstyle_IsAvailable() + return executable('java') +endfunction + +function! SyntaxCheckers_java_checkstyle_GetLocList() + + let fname = fnameescape( expand('%:p:h') . '/' . expand('%:t') ) + + if has('win32unix') + let fname = substitute(system('cygpath -m ' . fname), '\%x00', '', 'g') + endif + + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'java', + \ 'args': '-cp ' . g:syntastic_java_checkstyle_classpath . + \ ' com.puppycrawl.tools.checkstyle.Main -c ' . g:syntastic_java_checkstyle_conf_file, + \ 'fname': fname, + \ 'filetype': 'java', + \ 'subchecker': 'checkstyle' }) + + let errorformat = + \ '%f:%l:%c:\ %m,' . + \ '%f:%l:\ %m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'subtype': 'Style', + \ 'postprocess': ['cygwinRemoveCR'] }) + +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'java', + \ 'name': 'checkstyle'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/java/javac.vim b/sources_non_forked/syntastic/syntax_checkers/java/javac.vim new file mode 100644 index 00000000..122a6368 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/java/javac.vim @@ -0,0 +1,366 @@ +"============================================================================ +"File: javac.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Jochen Keil +" Dmitry Geurkov +"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_java_javac_checker") + finish +endif +let g:loaded_syntastic_java_javac_checker=1 +let g:syntastic_java_javac_maven_pom_tags = ["build", "properties"] +let g:syntastic_java_javac_maven_pom_properties = {} + +" Global Options +if !exists("g:syntastic_java_javac_executable") + let g:syntastic_java_javac_executable = 'javac' +endif + +if !exists("g:syntastic_java_maven_executable") + let g:syntastic_java_maven_executable = 'mvn' +endif + +if !exists("g:syntastic_java_javac_options") + let g:syntastic_java_javac_options = '-Xlint' +endif + +if !exists("g:syntastic_java_javac_classpath") + let g:syntastic_java_javac_classpath = '' +endif + +if !exists("g:syntastic_java_javac_delete_output") + let g:syntastic_java_javac_delete_output = 1 +endif + +function! s:CygwinPath(path) + return substitute(system("cygpath -m ".a:path), '\%x00', '', 'g') +endfunction + +if !exists("g:syntastic_java_javac_temp_dir") + if has('win32') || has('win64') + let g:syntastic_java_javac_temp_dir = $TEMP."\\vim-syntastic-javac" + elseif has('win32unix') + let g:syntastic_java_javac_temp_dir = s:CygwinPath('/tmp/vim-syntastic-javac') + else + let g:syntastic_java_javac_temp_dir = '/tmp/vim-syntastic-javac' + endif +endif + +if !exists("g:syntastic_java_javac_autoload_maven_classpath") + let g:syntastic_java_javac_autoload_maven_classpath = 1 +endif + +if !exists('g:syntastic_java_javac_config_file_enabled') + let g:syntastic_java_javac_config_file_enabled = 0 +endif + +if !exists('g:syntastic_java_javac_config_file') + let g:syntastic_java_javac_config_file = '.syntastic_javac_config' +endif + +if !exists("g:syntastic_java_javac_maven_pom_ftime") + let g:syntastic_java_javac_maven_pom_ftime = {} +endif + +if !exists("g:syntastic_java_javac_maven_pom_classpath") + let g:syntastic_java_javac_maven_pom_classpath = {} +endif + +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 ' . a:dir) + else + silent! call delete(a:dir) + endif +endfunction + +function! s:AddToClasspath(classpath,path) + if a:path == '' + return a:classpath + endif + if a:classpath != '' && a:path != '' + if has('win32') || has('win32unix') || has('win64') + return a:classpath . ";" . a:path + else + return a:classpath . ":" . a:path + endif + else + return a:path + endif +endfunction + +function! s:LoadClasspathFromConfigFile() + if filereadable(g:syntastic_java_javac_config_file) + let path = '' + let lines = readfile(g:syntastic_java_javac_config_file) + for l in lines + if l != '' + let path .= l . "\n" + endif + endfor + return path + else + return '' + endif +endfunction + +function! s:SaveClasspath() + let path = '' + let lines = getline(1, line('$')) + " save classpath to config file + if g:syntastic_java_javac_config_file_enabled + call writefile(lines,g:syntastic_java_javac_config_file) + endif + for l in lines + if l != '' + let path .= l . "\n" + endif + endfor + let g:syntastic_java_javac_classpath = path + let &modified = 0 +endfunction + +function! s:EditClasspath() + let command = 'syntastic javac classpath' + let winnr = bufwinnr('^' . command . '$') + if winnr < 0 + let pathlist = split(g:syntastic_java_javac_classpath,"\n") + execute (len(pathlist) + 5) . 'sp ' . fnameescape(command) + + augroup syntastic + autocmd BufWriteCmd call s:SaveClasspath() | bwipeout + augroup END + + setlocal buftype=acwrite bufhidden=wipe nobuflisted noswapfile nowrap number + for p in pathlist + call append(line('$') - 1, p) + endfor + else + execute winnr . 'wincmd w' + endif +endfunction + +function! s:GetMavenProperties() + let mvn_properties = {} + let pom = findfile("pom.xml", ".;") + if filereadable(pom) + if !has_key(g:syntastic_java_javac_maven_pom_properties, pom) + let mvn_cmd = g:syntastic_java_maven_executable . ' -f ' . pom + let mvn_is_managed_tag = 1 + let mvn_settings_output = split(system(mvn_cmd . ' help:effective-pom'), "\n") + let current_path = 'project' + for line in mvn_settings_output + let matches = matchlist(line, '^\s*<\([a-zA-Z0-9\-\.]\+\)>\s*$') + if mvn_is_managed_tag && !empty(matches) + let mvn_is_managed_tag = index(g:syntastic_java_javac_maven_pom_tags, matches[1]) >= 0 + let current_path .= '.' . matches[1] + else + let matches = matchlist(line, '^\s*\s*$') + if !empty(matches) + let mvn_is_managed_tag = index(g:syntastic_java_javac_maven_pom_tags, matches[1]) < 0 + let current_path = substitute(current_path, '\.' . matches[1] . "$", '', '') + else + let matches = matchlist(line, '^\s*<\([a-zA-Z0-9\-\.]\+\)>\(.\+\)\s*$') + if mvn_is_managed_tag && !empty(matches) + let mvn_properties[current_path . '.' . matches[1]] = matches[2] + endif + endif + endif + endfor + let g:syntastic_java_javac_maven_pom_properties[pom] = mvn_properties + endif + return g:syntastic_java_javac_maven_pom_properties[pom] + endif + return mvn_properties +endfunction + +command! SyntasticJavacEditClasspath call s:EditClasspath() + +function! s:GetMavenClasspath() + let pom = findfile("pom.xml", ".;") + if filereadable(pom) + if !has_key(g:syntastic_java_javac_maven_pom_ftime, pom) || g:syntastic_java_javac_maven_pom_ftime[pom] != getftime(pom) + let mvn_cmd = g:syntastic_java_maven_executable . ' -f ' . pom + let mvn_classpath_output = split(system(mvn_cmd . ' dependency:build-classpath'), "\n") + let class_path_next = 0 + + for line in mvn_classpath_output + if class_path_next == 1 + let mvn_classpath = s:RemoveCarriageReturn(line) + break + endif + if match(line,'Dependencies classpath:') >= 0 + let class_path_next = 1 + endif + endfor + + let mvn_properties = s:GetMavenProperties() + + let output_dir = 'target/classes' + if has_key(mvn_properties, 'project.build.outputDirectory') + let output_dir = mvn_properties['project.build.outputDirectory'] + endif + let mvn_classpath = s:AddToClasspath(mvn_classpath, output_dir) + + let test_output_dir = 'target/test-classes' + if has_key(mvn_properties, 'project.build.testOutputDirectory') + let test_output_dir = mvn_properties['project.build.testOutputDirectory'] + endif + let mvn_classpath = s:AddToClasspath(mvn_classpath, test_output_dir) + + let g:syntastic_java_javac_maven_pom_ftime[pom] = getftime(pom) + let g:syntastic_java_javac_maven_pom_classpath[pom] = mvn_classpath + endif + return g:syntastic_java_javac_maven_pom_classpath[pom] + endif + return '' +endfunction + +function! SyntaxCheckers_java_javac_IsAvailable() + return executable(g:syntastic_java_javac_executable) +endfunction + +function! s:MavenOutputDirectory() + let pom = findfile("pom.xml", ".;") + if filereadable(pom) + let mvn_properties = s:GetMavenProperties() + let output_dir = getcwd() + if has_key(mvn_properties, 'project.properties.build.dir') + let output_dir = mvn_properties['project.properties.build.dir'] + endif + if match(expand( '%:p:h' ), "src.main.java") >= 0 + let output_dir .= '/target/classes' + if has_key(mvn_properties, 'project.build.outputDirectory') + let output_dir = mvn_properties['project.build.outputDirectory'] + endif + endif + if match(expand( '%:p:h' ), "src.test.java") >= 0 + let output_dir .= '/target/test-classes' + if has_key(mvn_properties, 'project.build.testOutputDirectory') + let output_dir = mvn_properties['project.build.testOutputDirectory'] + endif + endif + + if has('win32unix') + let output_dir=s:CygwinPath(output_dir) + endif + return output_dir + endif +endfunction + +function! SyntaxCheckers_java_javac_GetLocList() + + let javac_opts = g:syntastic_java_javac_options + + if g:syntastic_java_javac_delete_output + let output_dir = g:syntastic_java_javac_temp_dir + let javac_opts .= ' -d ' . output_dir + endif + + " load classpath from config file + if g:syntastic_java_javac_config_file_enabled + let loaded_classpath = s:LoadClasspathFromConfigFile() + if loaded_classpath != '' + let g:syntastic_java_javac_classpath = loaded_classpath + endif + endif + + let javac_classpath = '' + + " add classpathes to javac_classpath + for path in split(g:syntastic_java_javac_classpath,"\n") + if path != '' + try + let ps = glob(path,0,1) + catch + let ps = split(glob(path,0),"\n") + endtry + if type(ps) == type([]) + for p in ps + if p != '' + let javac_classpath = s:AddToClasspath(javac_classpath,p) + endif + endfor + else + let javac_classpath = s:AddToClasspath(javac_classpath,ps) + endif + endif + endfor + + if g:syntastic_java_javac_autoload_maven_classpath + if !g:syntastic_java_javac_delete_output + let maven_output_dir = s:MavenOutputDirectory() + let javac_opts .= ' -d ' . maven_output_dir + endif + let maven_classpath = s:GetMavenClasspath() + let javac_classpath = s:AddToClasspath(javac_classpath,maven_classpath) + endif + + if javac_classpath != '' + let javac_opts .= ' -cp "' . fnameescape(javac_classpath) . '"' + endif + + " path seperator + if has('win32') || has('win32unix') || has('win64') + let sep = "\\" + else + let sep = '/' + endif + + let fname = fnameescape(expand ( '%:p:h' ) . sep . expand ( '%:t' )) + + if has('win32unix') + let fname = s:CygwinPath(fname) + endif + + let makeprg = syntastic#makeprg#build({ + \ 'exe': g:syntastic_java_javac_executable, + \ 'args': javac_opts, + \ 'fname': fname, + \ 'tail': '2>&1', + \ 'filetype': 'java', + \ 'subchecker': 'javac' }) + + " unashamedly stolen from *errorformat-javac* (quickfix.txt) and modified to include error types + let errorformat = + \ '%E%f:%l:\ error:\ %m,'. + \ '%W%f:%l:\ warning:\ %m,'. + \ '%A%f:%l:\ %m,'. + \ '%+Z%p^,'. + \ '%+C%.%#,'. + \ '%-G%.%#' + + if g:syntastic_java_javac_delete_output + silent! call mkdir(output_dir,'p') + endif + let errors = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'postprocess': ['cygwinRemoveCR'] }) + + if g:syntastic_java_javac_delete_output + call s:RemoveDir(output_dir) + endif + return errors + +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'java', + \ 'name': 'javac'}) + diff --git a/sources_non_forked/syntastic/syntax_checkers/javascript/closurecompiler.vim b/sources_non_forked/syntastic/syntax_checkers/javascript/closurecompiler.vim new file mode 100644 index 00000000..6c55f4f2 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/javascript/closurecompiler.vim @@ -0,0 +1,66 @@ +"============================================================================ +"File: closurecompiler.vim +"Description: Javascript syntax checker - using Google Closure Compiler +"Maintainer: Motohiro Takayama +"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. +"============================================================================ +" +" To enable this plugin, edit the .vimrc like this: +" +" let g:syntastic_javascript_checker = "closurecompiler" +" +" and set the path to the Google Closure Compiler: +" +" let g:syntastic_javascript_closure_compiler_path = '/path/to/google-closure-compiler.jar' +" +" It takes additional options for Google Closure Compiler with the variable +" g:syntastic_javascript_closure_compiler_options. +" + +if exists("g:loaded_syntastic_javascript_closurecompiler_checker") + finish +endif +let g:loaded_syntastic_javascript_closurecompiler_checker=1 + +if !exists("g:syntastic_javascript_closure_compiler_options") + let g:syntastic_javascript_closure_compiler_options = "" +endif + +function! SyntaxCheckers_javascript_closurecompiler_IsAvailable() + return exists("g:syntastic_javascript_closure_compiler_path") +endfunction + +function! SyntaxCheckers_javascript_closurecompiler_GetLocList() + if exists("g:syntastic_javascript_closure_compiler_file_list") + let file_list = join(readfile(g:syntastic_javascript_closure_compiler_file_list), ' ') + else + let file_list = syntastic#util#shexpand('%') + endif + + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'java -jar ' . g:syntastic_javascript_closure_compiler_path, + \ 'args': g:syntastic_javascript_closure_compiler_options . ' --js' , + \ 'fname': file_list, + \ 'filetype': 'javascript', + \ 'subchecker': 'closurecompiler' }) + + let errorformat = + \ '%-GOK,'. + \ '%E%f:%l: ERROR - %m,'. + \ '%Z%p^,'. + \ '%W%f:%l: WARNING - %m,'. + \ '%Z%p^' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'javascript', + \ 'name': 'closurecompiler'}) + diff --git a/sources_non_forked/syntastic/syntax_checkers/javascript/gjslint.vim b/sources_non_forked/syntastic/syntax_checkers/javascript/gjslint.vim new file mode 100644 index 00000000..039d0eed --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/javascript/gjslint.vim @@ -0,0 +1,46 @@ +"============================================================================ +"File: gjslint.vim +"Description: Javascript syntax checker - using gjslint +"Maintainer: Martin Grenfell +"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_javascript_gjslint_checker") + finish +endif +let g:loaded_syntastic_javascript_gjslint_checker=1 + +if !exists("g:syntastic_javascript_gjslint_conf") + let g:syntastic_javascript_gjslint_conf = "" +endif + +function! SyntaxCheckers_javascript_gjslint_IsAvailable() + return executable('gjslint') +endfunction + +function! SyntaxCheckers_javascript_gjslint_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'gjslint', + \ 'args': g:syntastic_javascript_gjslint_conf . " --nosummary --unix_mode --nodebug_indentation --nobeep", + \ 'filetype': 'javascript', + \ 'subchecker': 'gjslint' }) + + let errorformat = + \ "%f:%l:(New Error -%\\?\%n) %m," . + \ "%f:%l:(-%\\?%n) %m," . + \ "%-G1 files checked," . + \ " no errors found.," . + \ "%-G%.%#" + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'javascript', + \ 'name': 'gjslint'}) + diff --git a/sources_non_forked/syntastic/syntax_checkers/javascript/jshint.vim b/sources_non_forked/syntastic/syntax_checkers/javascript/jshint.vim new file mode 100644 index 00000000..e98e5628 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/javascript/jshint.vim @@ -0,0 +1,55 @@ +"============================================================================ +"File: jshint.vim +"Description: Javascript syntax checker - using jshint +"Maintainer: Martin Grenfell +"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_javascript_jshint_checker") + finish +endif +let g:loaded_syntastic_javascript_jshint_checker=1 + +if !exists("g:syntastic_javascript_jshint_conf") + let g:syntastic_javascript_jshint_conf = "" +endif + +function! SyntaxCheckers_javascript_jshint_IsAvailable() + return executable('jshint') +endfunction + +function! SyntaxCheckers_javascript_jshint_GetLocList() + let jshint_new = s:JshintNew() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'jshint', + \ 'post_args': (jshint_new ? ' --verbose ' : '') . s:Args(), + \ 'filetype': 'javascript', + \ 'subchecker': 'jshint' }) + + let errorformat = jshint_new ? + \ '%f: line %l\, col %c\, %m \(%t%*\d\)' : + \ '%E%f: line %l\, col %c\, %m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'defaults': {'bufnr': bufnr('')} }) +endfunction + +function s:JshintNew() + return syntastic#util#versionIsAtLeast(syntastic#util#parseVersion('jshint --version'), [1, 1]) +endfunction + +function s:Args() + " node-jshint uses .jshintrc as config unless --config arg is present + return !empty(g:syntastic_javascript_jshint_conf) ? ' --config ' . g:syntastic_javascript_jshint_conf : '' +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'javascript', + \ 'name': 'jshint'}) + diff --git a/sources_non_forked/syntastic/syntax_checkers/javascript/jsl.vim b/sources_non_forked/syntastic/syntax_checkers/javascript/jsl.vim new file mode 100644 index 00000000..bef1b89a --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/javascript/jsl.vim @@ -0,0 +1,56 @@ +"============================================================================ +"File: jsl.vim +"Description: Javascript syntax checker - using jsl +"Maintainer: Martin Grenfell +"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_javascript_jsl_checker") + finish +endif +let g:loaded_syntastic_javascript_jsl_checker=1 + +if !exists("g:syntastic_javascript_jsl_conf") + let g:syntastic_javascript_jsl_conf = "" +endif + +function s:ConfFlag() + if !empty(g:syntastic_javascript_jsl_conf) + return "-conf " . g:syntastic_javascript_jsl_conf + endif + + return "" +endfunction + +function! SyntaxCheckers_javascript_jsl_IsAvailable() + return executable('jsl') +endfunction + +function! SyntaxCheckers_javascript_jsl_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'jsl', + \ 'args': s:ConfFlag() . " -nologo -nofilelisting -nosummary -nocontext -process", + \ 'filetype': 'javascript', + \ 'subchecker': 'jsl' }) + + let errorformat = + \ '%W%f(%l): lint warning: %m,'. + \ '%-Z%p^,'. + \ '%W%f(%l): warning: %m,'. + \ '%-Z%p^,'. + \ '%E%f(%l): SyntaxError: %m,'. + \ '%-Z%p^,'. + \ '%-G' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'javascript', + \ 'name': 'jsl'}) + diff --git a/sources_non_forked/syntastic/syntax_checkers/javascript/jslint.vim b/sources_non_forked/syntastic/syntax_checkers/javascript/jslint.vim new file mode 100644 index 00000000..ab6469d4 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/javascript/jslint.vim @@ -0,0 +1,53 @@ +"============================================================================ +"File: jslint.vim +"Description: Javascript syntax checker - using jslint +"Maintainer: Martin Grenfell +"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. +" +"Tested with jslint 0.1.4. +"============================================================================ +if exists("g:loaded_syntastic_javascript_jslint_checker") + finish +endif +let g:loaded_syntastic_javascript_jslint_checker=1 + +if !exists("g:syntastic_javascript_jslint_conf") + let g:syntastic_javascript_jslint_conf = "--white --undef --nomen --regexp --plusplus --bitwise --newcap --sloppy --vars" +endif + +function! SyntaxCheckers_javascript_jslint_IsAvailable() + return executable('jslint') +endfunction + +function! SyntaxCheckers_javascript_jslint_HighlightTerm(error) + let unexpected = matchstr(a:error['text'], 'Expected.*and instead saw \'\zs.*\ze\'') + if len(unexpected) < 1 | return '' | end + return '\V'.split(unexpected, "'")[1] +endfunction + +function! SyntaxCheckers_javascript_jslint_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'jslint', + \ 'args': g:syntastic_javascript_jslint_conf, + \ 'filetype': 'javascript', + \ 'subchecker': 'jslint' }) + + let errorformat = + \ '%E %##%n %m,'. + \ '%-Z%.%#Line %l\, Pos %c,'. + \ '%-G%.%#' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'defaults': {'bufnr': bufnr("")} }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'javascript', + \ 'name': 'jslint'}) + diff --git a/sources_non_forked/syntastic/syntax_checkers/json/jsonlint.vim b/sources_non_forked/syntastic/syntax_checkers/json/jsonlint.vim new file mode 100644 index 00000000..7c6b34d5 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/json/jsonlint.vim @@ -0,0 +1,43 @@ +"============================================================================ +"File: jsonlint.vim +"Description: JSON syntax checker - using jsonlint +"Maintainer: Miller Medeiros +"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_json_jsonlint_checker") + finish +endif +let g:loaded_syntastic_json_jsonlint_checker=1 + +function! SyntaxCheckers_json_jsonlint_IsAvailable() + return executable('jsonlint') +endfunction + +function! SyntaxCheckers_json_jsonlint_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'jsonlint', + \ 'post_args': '--compact', + \ 'filetype': 'json', + \ 'subchecker': 'jsonlint' }) + + let errorformat = + \ '%ELine %l:%c,'. + \ '%Z\\s%#Reason: %m,'. + \ '%C%.%#,'. + \ '%f: line %l\, col %c\, %m,'. + \ '%-G%.%#' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'defaults': {'bufnr': bufnr('')} }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'json', + \ 'name': 'jsonlint'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/json/jsonval.vim b/sources_non_forked/syntastic/syntax_checkers/json/jsonval.vim new file mode 100644 index 00000000..4359e86c --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/json/jsonval.vim @@ -0,0 +1,40 @@ +"============================================================================ +"File: jsonval.vim +"Description: JSON syntax checker - using jsonval +"Maintainer: Miller Medeiros +"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_json_jsonval_checker") + finish +endif +let g:loaded_syntastic_json_jsonval_checker=1 + +function! SyntaxCheckers_json_jsonval_IsAvailable() + return executable('jsonval') +endfunction + +function! SyntaxCheckers_json_jsonval_GetLocList() + " based on https://gist.github.com/1196345 + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'jsonval', + \ 'filetype': 'json', + \ 'subchecker': 'jsonval' }) + + let errorformat = + \ '%E%f:\ %m\ at\ line\ %l,' . + \ '%-G%.%#' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'defaults': {'bufnr': bufnr('')} }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'json', + \ 'name': 'jsonval'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/less/less-lint.coffee b/sources_non_forked/syntastic/syntax_checkers/less/less-lint.coffee new file mode 100644 index 00000000..0b05e4a7 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/less/less-lint.coffee @@ -0,0 +1,41 @@ +#!/usr/bin/env node + +fs = require 'fs' +less = require 'less' +args = process.argv.slice(1) +options = {} + +args = args.filter (arg) -> + match = arg.match(/^-I(.+)$/) + if match + options.paths.push(match[1]); + return false + + match = arg.match(/^--?([a-z][\-0-9a-z]*)(?:=([^\s]+))?$/i) + if match + arg = match[1] + else + return arg + + switch arg + when 'strict-imports' then options.strictImports = true + when 'include-path' + options.paths = match[2].split(if os.type().match(/Windows/) then ';' else ':') + .map (p) -> + if p + return path.resolve(process.cwd(), p) + when 'O0' then options.optimization = 0 + when 'O1' then options.optimization = 1 + when 'O2' then options.optimization = 2 + +options.filename = args[1] + +parser = new(less.Parser) options + +fs.readFile(options.filename, 'utf-8', (err,data) -> + parser.parse(data, (err, tree) -> + if err + less.writeError err + process.exit(1) + ) +) diff --git a/sources_non_forked/syntastic/syntax_checkers/less/less-lint.js b/sources_non_forked/syntastic/syntax_checkers/less/less-lint.js new file mode 100644 index 00000000..5abc653c --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/less/less-lint.js @@ -0,0 +1,57 @@ +// Generated by CoffeeScript 1.3.3 +(function() { + var args, fs, less, options, parser; + + fs = require('fs'); + + less = require('less'); + + args = process.argv.slice(1); + + options = {}; + + args = args.filter(function(arg) { + var match; + match = arg.match(/^-I(.+)$/); + if (match) { + options.paths.push(match[1]); + return false; + } + match = arg.match(/^--?([a-z][\-0-9a-z]*)(?:=([^\s]+))?$/i); + if (match) { + arg = match[1]; + } else { + return arg; + } + switch (arg) { + case 'strict-imports': + return options.strictImports = true; + case 'include-path': + return options.paths = match[2].split(os.type().match(/Windows/) ? ';' : ':').map(function(p) { + if (p) { + return path.resolve(process.cwd(), p); + } + }); + case 'O0': + return options.optimization = 0; + case 'O1': + return options.optimization = 1; + case 'O2': + return options.optimization = 2; + } + }); + + options.filename = args[1]; + + parser = new less.Parser(options); + + fs.readFile(options.filename, 'utf-8', function(err, data) { + return parser.parse(data, function(err, tree) { + if (err) { + less.writeError(err); + return process.exit(1); + } + }); + }); + +}).call(this); diff --git a/sources_non_forked/syntastic/syntax_checkers/less/lessc.vim b/sources_non_forked/syntastic/syntax_checkers/less/lessc.vim new file mode 100644 index 00000000..001be351 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/less/lessc.vim @@ -0,0 +1,61 @@ +"============================================================================ +"File: less.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Julien Blanchard +"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. +" +"============================================================================ + +" To send additional options to less use the variable g:syntastic_less_options. +" The default is +" let g:syntastic_less_options = "--no-color" +" +" To use less-lint instead of less set the variable +" g:syntastic_less_use_less_lint. + +if exists("g:loaded_syntastic_less_lessc_checker") + finish +endif +let g:loaded_syntastic_less_lessc_checker=1 + +if !exists("g:syntastic_less_options") + let g:syntastic_less_options = "--no-color" +endif + +if !exists("g:syntastic_less_use_less_lint") + let g:syntastic_less_use_less_lint = 0 +endif + +if g:syntastic_less_use_less_lint + let s:check_file = 'node ' . expand(':p:h') . '/less-lint.js' +else + let s:check_file = 'lessc' +end + +function! SyntaxCheckers_less_lessc_IsAvailable() + return executable('lessc') +endfunction + +function! SyntaxCheckers_less_lessc_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': s:check_file, + \ 'args': g:syntastic_less_options, + \ 'tail': syntastic#util#DevNull(), + \ 'filetype': 'less', + \ 'subchecker': 'lessc' }) + + let errorformat = '%m in %f:%l:%c' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'defaults': {'bufnr': bufnr(""), 'text': "Syntax error"} }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'less', + \ 'name': 'lessc'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/lisp/clisp.vim b/sources_non_forked/syntastic/syntax_checkers/lisp/clisp.vim new file mode 100644 index 00000000..caf094f1 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/lisp/clisp.vim @@ -0,0 +1,47 @@ +"============================================================================ +"File: lisp.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Karl Yngve Lervåg +"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_lisp_clisp_checker") + finish +endif +let g:loaded_syntastic_lisp_clisp_checker=1 + +function! SyntaxCheckers_lisp_clisp_IsAvailable() + return executable("clisp") +endfunction + +function! SyntaxCheckers_lisp_clisp_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'clisp', + \ 'args': '-q -c', + \ 'tail': '-o /tmp/clisp-vim-compiled-file', + \ 'filetype': 'lisp', + \ 'subchecker': 'clisp' }) + + let errorformat = + \ '%-G;%.%#,' . + \ '%W%>WARNING:%.%#line %l : %m,' . + \ '%Z %#%m,' . + \ '%W%>WARNING:%.%#lines %l..%\d\# : %m,' . + \ '%Z %#%m,' . + \ '%E%>The following functions were %m,' . + \ '%Z %m,' . + \ '%-G%.%#' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'defaults': {'bufnr': bufnr('')} }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'lisp', + \ 'name': 'clisp'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/llvm/llvm.vim b/sources_non_forked/syntastic/syntax_checkers/llvm/llvm.vim new file mode 100644 index 00000000..ea4fa04b --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/llvm/llvm.vim @@ -0,0 +1,38 @@ +"============================================================================ +"File: llvm.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Andrew Kelley +"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_llvm_llvm_checker") + finish +endif +let g:loaded_syntastic_llvm_llvm_checker=1 + +function! SyntaxCheckers_llvm_llvm_IsAvailable() + return executable("llc") +endfunction + +function! SyntaxCheckers_llvm_llvm_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'llc', + \ 'args': syntastic#c#GetNullDevice(), + \ 'filetype': 'llvm', + \ 'subchecker': 'llvm' }) + + let errorformat = 'llc: %f:%l:%c: %trror: %m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'llvm', + \ 'name': 'llvm'}) + diff --git a/sources_non_forked/syntastic/syntax_checkers/lua/luac.vim b/sources_non_forked/syntastic/syntax_checkers/lua/luac.vim new file mode 100644 index 00000000..c26e520a --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/lua/luac.vim @@ -0,0 +1,64 @@ +"============================================================================ +"File: lua.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Gregor Uhlenheuer +"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_lua_luac_checker") + finish +endif +let g:loaded_syntastic_lua_luac_checker=1 + +function! SyntaxCheckers_lua_luac_IsAvailable() + return executable('luac') +endfunction + +function! SyntaxCheckers_lua_luac_GetHighlightRegex(pos) + let near = matchstr(a:pos['text'], "near '[^']\\+'") + let result = '' + if len(near) > 0 + let near = split(near, "'")[1] + if near == '' + let p = getpos('$') + let a:pos['lnum'] = p[1] + let a:pos['col'] = p[2] + let result = '\%'.p[2].'c' + else + let result = '\V'.near + endif + let open = matchstr(a:pos['text'], "(to close '[^']\\+' at line [0-9]\\+)") + if len(open) > 0 + let oline = split(open, "'")[1:2] + let line = 0+strpart(oline[1], 9) + call matchadd('SpellCap', '\%'.line.'l\V'.oline[0]) + endif + endif + return result +endfunction + + +function! SyntaxCheckers_lua_luac_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'luac', + \ 'args': '-p', + \ 'filetype': 'lua', + \ 'subchecker': 'luac' }) + + let errorformat = 'luac: %#%f:%l: %m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'defaults': { 'bufnr': bufnr(''), 'type': 'E' } }) + +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'lua', + \ 'name': 'luac'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/matlab/mlint.vim b/sources_non_forked/syntastic/syntax_checkers/matlab/mlint.vim new file mode 100644 index 00000000..380d22c8 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/matlab/mlint.vim @@ -0,0 +1,41 @@ +"============================================================================ +"File: matlab.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Jason Graham +"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_matlab_mlint_checker") + finish +endif +let g:loaded_syntastic_matlab_mlint_checker=1 + +function! SyntaxCheckers_matlab_mlint_IsAvailable() + return executable("mlint") +endfunction + +function! SyntaxCheckers_matlab_mlint_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'mlint', + \ 'args': '-id $*', + \ 'filetype': 'matlab', + \ 'subchecker': 'mlint' }) + + let errorformat = + \ 'L %l (C %c): %*[a-zA-Z0-9]: %m,'. + \ 'L %l (C %c-%*[0-9]): %*[a-zA-Z0-9]: %m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'defaults': {'bufnr': bufnr("")} }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'matlab', + \ 'name': 'mlint'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/nasm/nasm.vim b/sources_non_forked/syntastic/syntax_checkers/nasm/nasm.vim new file mode 100644 index 00000000..9c6195cf --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/nasm/nasm.vim @@ -0,0 +1,38 @@ +"============================================================================ +"File: nasm.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Håvard Pettersson +"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_nasm_nasm_checker") + finish +endif +let g:loaded_syntastic_nasm_nasm_checker=1 + +function! SyntaxCheckers_nasm_nasm_IsAvailable() + return executable("nasm") +endfunction + +function! SyntaxCheckers_nasm_nasm_GetLocList() + let wd = syntastic#util#shescape(expand("%:p:h") . "/") + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'nasm', + \ 'args': '-X gnu -f elf -I ' . wd . ' ' . syntastic#c#GetNullDevice() + \ 'filetype': 'nasm', + \ 'subchecker': 'nasm' }) + + let errorformat = '%f:%l: %t%*[^:]: %m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'nasm', + \ 'name': 'nasm'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/nroff/mandoc.vim b/sources_non_forked/syntastic/syntax_checkers/nroff/mandoc.vim new file mode 100644 index 00000000..3333d24e --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/nroff/mandoc.vim @@ -0,0 +1,41 @@ +"============================================================================ +"File: mandoc.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: LCD 47 +"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_mandoc_checker") + finish +endif +let g:loaded_syntastic_nroff_mandoc_checker=1 + +function! SyntaxCheckers_nroff_mandoc_IsAvailable() + return executable("mandoc") +endfunction + +function! SyntaxCheckers_nroff_mandoc_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'mandoc', + \ 'args': '-Tlint', + \ 'filetype': 'nroff', + \ 'subchecker': 'mandoc' }) + + let errorformat = + \ '%E%f:%l:%c: %tRROR: %m,' . + \ '%W%f:%l:%c: %tARNING: %m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'returns': [0, 2, 3, 4] }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'nroff', + \ 'name': 'mandoc'}) + diff --git a/sources_non_forked/syntastic/syntax_checkers/objc/gcc.vim b/sources_non_forked/syntastic/syntax_checkers/objc/gcc.vim new file mode 100644 index 00000000..e16822f3 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/objc/gcc.vim @@ -0,0 +1,184 @@ +"============================================================================ +"File: objc.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Gregor Uhlenheuer +"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. +" +"============================================================================ + +" 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_objc_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_objc_no_include_search = 1 +" +" To disable the include of the default include dirs (such as /usr/include) +" add this line to your .vimrc: +" +" let g:syntastic_objc_no_default_include_dirs = 1 +" +" 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_objc_includes. Then the header files are being re-checked on +" the next file write. +" +" let g:syntastic_objc_auto_refresh_includes = 1 +" +" Alternatively you can set the buffer local variable b:syntastic_objc_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_objc_cflags = ' -I/usr/include/libsoup-2.4' +" +" 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_objc_include_dirs. This list can be used like this: +" +" let g:syntastic_objc_include_dirs = [ 'includes', 'headers' ] +" +" Moreover it is possible to add additional compiler options to the syntax +" checking execution via the variable 'g:syntastic_objc_compiler_options': +" +" let g:syntastic_objc_compiler_options = ' -ansi' +" +" Additionally the setting 'g:syntastic_objc_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_objc_config': +" +" let g:syntastic_objc_config_file = '.config' +" +" Using the global variable 'g:syntastic_objc_remove_include_errors' you can +" specify whether errors of files included via the g:syntastic_objc_include_dirs' +" setting are removed from the result set: +" +" let g:syntastic_objc_remove_include_errors = 1 +" +" Use the variable 'g:syntastic_objc_errorformat' to override the default error +" format: +" +" let g:syntastic_objc_errorformat = '%f:%l:%c: %trror: %m' +" +" Set your compiler executable with e.g. (defaults to gcc) +" +" let g:syntastic_objc_compiler = 'clang' + +if exists('g:loaded_syntastic_objc_gcc_checker') + finish +endif +let g:loaded_syntastic_objc_gcc_checker = 1 + +if !exists('g:syntastic_objc_compiler') + let g:syntastic_objc_compiler = 'gcc' +endif + +function! SyntaxCheckers_objc_gcc_IsAvailable() + return executable(g:syntastic_objc_compiler) +endfunction + +let s:save_cpo = &cpo +set cpo&vim + +if !exists('g:syntastic_objc_compiler_options') + let g:syntastic_objc_compiler_options = '-std=gnu99' +endif + +if !exists('g:syntastic_objc_config_file') + let g:syntastic_objc_config_file = '.syntastic_objc_config' +endif + +function! SyntaxCheckers_objc_gcc_GetLocList() + let makeprg = g:syntastic_objc_compiler . ' -x objective-c -fsyntax-only -lobjc' + let errorformat = + \ '%-G%f:%s:,' . + \ '%-G%f:%l: %#error: %#(Each undeclared identifier is reported only%.%#,' . + \ '%-G%f:%l: %#error: %#for each function it appears%.%#,' . + \ '%-GIn file included%.%#,'. + \ '%-G %#from %f:%l\,,' . + \ '%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' + + if exists('g:syntastic_objc_errorformat') + let errorformat = g:syntastic_objc_errorformat + endif + + " add optional user-defined compiler options + let makeprg .= g:syntastic_objc_compiler_options + + let makeprg .= ' ' . syntastic#util#shexpand('%') . + \ ' ' . syntastic#c#GetIncludeDirs('objc') + + " determine whether to parse header files as well + if expand('%') =~? '\.h$' + if exists('g:syntastic_objc_check_header') + let makeprg = g:syntastic_objc_compiler . + \ ' -x objective-c-header ' . + \ ' -c ' . syntastic#util#shexpand('%') . + \ ' ' . g:syntastic_objc_compiler_options . + \ ' ' . syntastic#c#GetIncludeDirs('objc') + else + return [] + endif + endif + + " check if the user manually set some cflags + if !exists('b:syntastic_objc_cflags') + " check whether to search for include files at all + if !exists('g:syntastic_objc_no_include_search') || + \ g:syntastic_objc_no_include_search != 1 + " refresh the include file search if desired + if exists('g:syntastic_objc_auto_refresh_includes') && + \ g:syntastic_objc_auto_refresh_includes != 0 + let makeprg .= syntastic#c#SearchHeaders() + else + " search for header includes if not cached already + if !exists('b:syntastic_objc_includes') + let b:syntastic_objc_includes = syntastic#c#SearchHeaders() + endif + let makeprg .= b:syntastic_objc_includes + endif + endif + else + " use the user-defined cflags + let makeprg .= b:syntastic_objc_cflags + endif + + " add optional config file parameters + let makeprg .= ' ' . syntastic#c#ReadConfig(g:syntastic_objc_config_file) + + " process makeprg + let errors = SyntasticMake({ 'makeprg': makeprg, + \ 'errorformat': errorformat }) + + " filter the processed errors if desired + if exists('g:syntastic_objc_remove_include_errors') && + \ g:syntastic_objc_remove_include_errors != 0 + return filter(errors, + \ 'has_key(v:val, "bufnr") && v:val["bufnr"]=='.bufnr('')) + else + return errors + endif +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'objc', + \ 'name': 'gcc'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/objc/oclint.vim b/sources_non_forked/syntastic/syntax_checkers/objc/oclint.vim new file mode 100644 index 00000000..0ebd6612 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/objc/oclint.vim @@ -0,0 +1,36 @@ +"============================================================================ +"File: oclint.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: "UnCO" Lin +"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. +"============================================================================ +" +" The setting 'g:syntastic_oclint_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_oclint_config': +" +" let g:syntastic_oclint_config_file = '.config' + +if exists("g:loaded_syntastic_objc_oclint_checker") + finish +endif +let g:loaded_syntastic_objc_oclint_checker = 1 + +function! SyntaxCheckers_objc_oclint_IsAvailable() + return SyntaxCheckers_c_oclint_IsAvailable() +endfunction + +function! SyntaxCheckers_objc_oclint_GetLocList() + return SyntaxCheckers_c_oclint_GetLocList() +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'objc', + \ 'name': 'oclint'}) + +runtime! syntax_checkers/c/*.vim diff --git a/sources_non_forked/syntastic/syntax_checkers/objc/ycm.vim b/sources_non_forked/syntastic/syntax_checkers/objc/ycm.vim new file mode 100644 index 00000000..40f53fb4 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/objc/ycm.vim @@ -0,0 +1,34 @@ +"============================================================================ +"File: ycm.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Val Markovic +"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_objc_ycm_checker") + finish +endif +let g:loaded_syntastic_objc_ycm_checker = 1 + +runtime! syntax_checkers/c/*.vim + +function! SyntaxCheckers_objc_ycm_IsAvailable() + return SyntaxCheckers_c_ycm_IsAvailable() +endfunction + +if !exists('g:loaded_youcompleteme') + finish +endif + +function! SyntaxCheckers_objc_ycm_GetLocList() + return SyntaxCheckers_c_ycm_GetLocList() +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'objc', + \ 'name': 'ycm'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/objcpp/gcc.vim b/sources_non_forked/syntastic/syntax_checkers/objcpp/gcc.vim new file mode 100644 index 00000000..889a5973 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/objcpp/gcc.vim @@ -0,0 +1,184 @@ +"============================================================================ +"File: objcpp.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Gregor Uhlenheuer +"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. +" +"============================================================================ + +" 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_objcpp_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_objcpp_no_include_search = 1 +" +" To disable the include of the default include dirs (such as /usr/include) +" add this line to your .vimrc: +" +" let g:syntastic_objcpp_no_default_include_dirs = 1 +" +" 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_objcpp_includes. Then the header files are being re-checked on +" the next file write. +" +" let g:syntastic_objcpp_auto_refresh_includes = 1 +" +" Alternatively you can set the buffer local variable b:syntastic_objcpp_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_objcpp_cflags = ' -I/usr/include/libsoup-2.4' +" +" 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_objcpp_include_dirs. This list can be used like this: +" +" let g:syntastic_objcpp_include_dirs = [ 'includes', 'headers' ] +" +" Moreover it is possible to add additional compiler options to the syntax +" checking execution via the variable 'g:syntastic_objcpp_compiler_options': +" +" let g:syntastic_objcpp_compiler_options = ' -ansi' +" +" Additionally the setting 'g:syntastic_objcpp_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_objcpp_config': +" +" let g:syntastic_objcpp_config_file = '.config' +" +" Using the global variable 'g:syntastic_objcpp_remove_include_errors' you can +" specify whether errors of files included via the g:syntastic_objcpp_include_dirs' +" setting are removed from the result set: +" +" let g:syntastic_objcpp_remove_include_errors = 1 +" +" Use the variable 'g:syntastic_objcpp_errorformat' to override the default error +" format: +" +" let g:syntastic_objcpp_errorformat = '%f:%l:%c: %trror: %m' +" +" Set your compiler executable with e.g. (defaults to gcc) +" +" let g:syntastic_objcpp_compiler = 'clang' + +if exists('g:loaded_syntastic_objcpp_gcc_checker') + finish +endif +let g:loaded_syntastic_objcpp_gcc_checker = 1 + +if !exists('g:syntastic_objcpp_compiler') + let g:syntastic_objcpp_compiler = 'gcc' +endif + +function! SyntaxCheckers_objcpp_gcc_IsAvailable() + return executable(g:syntastic_objcpp_compiler) +endfunction + +let s:save_cpo = &cpo +set cpo&vim + +if !exists('g:syntastic_objcpp_compiler_options') + let g:syntastic_objcpp_compiler_options = '-std=gnu99' +endif + +if !exists('g:syntastic_objcpp_config_file') + let g:syntastic_objcpp_config_file = '.syntastic_objcpp_config' +endif + +function! SyntaxCheckers_objcpp_gcc_GetLocList() + let makeprg = g:syntastic_objcpp_compiler . ' -x objective-c++ -fsyntax-only -lobjc' + let errorformat = + \ '%-G%f:%s:,' . + \ '%-G%f:%l: %#error: %#(Each undeclared identifier is reported only%.%#,' . + \ '%-G%f:%l: %#error: %#for each function it appears%.%#,' . + \ '%-GIn file included%.%#,'. + \ '%-G %#from %f:%l\,,' . + \ '%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' + + if exists('g:syntastic_objcpp_errorformat') + let errorformat = g:syntastic_objcpp_errorformat + endif + + " add optional user-defined compiler options + let makeprg .= g:syntastic_objcpp_compiler_options + + let makeprg .= ' ' . syntastic#util#shexpand('%') . + \ ' ' . syntastic#c#GetIncludeDirs('objcpp') + + " determine whether to parse header files as well + if expand('%') =~? '\.h$' + if exists('g:syntastic_objcpp_check_header') + let makeprg = g:syntastic_objcpp_compiler . + \ ' -x objective-c++-header ' . + \ ' -c ' . syntastic#util#shexpand('%') . + \ ' ' . g:syntastic_objcpp_compiler_options . + \ ' ' . syntastic#c#GetIncludeDirs('objcpp') + else + return [] + endif + endif + + " check if the user manually set some cflags + if !exists('b:syntastic_objcpp_cflags') + " check whether to search for include files at all + if !exists('g:syntastic_objcpp_no_include_search') || + \ g:syntastic_objcpp_no_include_search != 1 + " refresh the include file search if desired + if exists('g:syntastic_objcpp_auto_refresh_includes') && + \ g:syntastic_objcpp_auto_refresh_includes != 0 + let makeprg .= syntastic#c#SearchHeaders() + else + " search for header includes if not cached already + if !exists('b:syntastic_objcpp_includes') + let b:syntastic_objcpp_includes = syntastic#c#SearchHeaders() + endif + let makeprg .= b:syntastic_objcpp_includes + endif + endif + else + " use the user-defined cflags + let makeprg .= b:syntastic_objcpp_cflags + endif + + " add optional config file parameters + let makeprg .= ' ' . syntastic#c#ReadConfig(g:syntastic_objcpp_config_file) + + " process makeprg + let errors = SyntasticMake({ 'makeprg': makeprg, + \ 'errorformat': errorformat }) + + " filter the processed errors if desired + if exists('g:syntastic_objcpp_remove_include_errors') && + \ g:syntastic_objcpp_remove_include_errors != 0 + return filter(errors, + \ 'has_key(v:val, "bufnr") && v:val["bufnr"]=='.bufnr('')) + else + return errors + endif +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'objcpp', + \ 'name': 'gcc'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/objcpp/oclint.vim b/sources_non_forked/syntastic/syntax_checkers/objcpp/oclint.vim new file mode 100644 index 00000000..a46fe045 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/objcpp/oclint.vim @@ -0,0 +1,36 @@ +"============================================================================ +"File: oclint.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: "UnCO" Lin +"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. +"============================================================================ +" +" The setting 'g:syntastic_oclint_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_oclint_config': +" +" let g:syntastic_oclint_config_file = '.config' + +if exists("g:loaded_syntastic_objcpp_oclint_checker") + finish +endif +let g:loaded_syntastic_objcpp_oclint_checker = 1 + +function! SyntaxCheckers_objcpp_oclint_IsAvailable() + return SyntaxCheckers_c_oclint_IsAvailable() +endfunction + +function! SyntaxCheckers_objcpp_oclint_GetLocList() + return SyntaxCheckers_c_oclint_GetLocList() +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'objcpp', + \ 'name': 'oclint'}) + +runtime! syntax_checkers/c/*.vim diff --git a/sources_non_forked/syntastic/syntax_checkers/objcpp/ycm.vim b/sources_non_forked/syntastic/syntax_checkers/objcpp/ycm.vim new file mode 100644 index 00000000..c9a0e458 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/objcpp/ycm.vim @@ -0,0 +1,34 @@ +"============================================================================ +"File: ycm.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Val Markovic +"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_objcpp_ycm_checker") + finish +endif +let g:loaded_syntastic_objcpp_ycm_checker = 1 + +runtime! syntax_checkers/c/*.vim + +function! SyntaxCheckers_objcpp_ycm_IsAvailable() + return SyntaxCheckers_c_ycm_IsAvailable() +endfunction + +if !exists('g:loaded_youcompleteme') + finish +endif + +function! SyntaxCheckers_objcpp_ycm_GetLocList() + return SyntaxCheckers_c_ycm_GetLocList() +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'objcpp', + \ 'name': 'ycm'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/ocaml/camlp4o.vim b/sources_non_forked/syntastic/syntax_checkers/ocaml/camlp4o.vim new file mode 100644 index 00000000..ebec5cb7 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/ocaml/camlp4o.vim @@ -0,0 +1,149 @@ +"============================================================================ +"File: ocaml.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Török Edwin +"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. +" +"============================================================================ +" +" The more reliable way to check for a single .ml file is to use ocamlc. +" You can do that setting this in your .vimrc: +" +" let g:syntastic_ocaml_use_ocamlc = 1 +" It's possible to use ocamlc in conjuction with Jane Street's Core. In order +" to do that, you have to specify this in your .vimrc: +" +" let g:syntastic_ocaml_use_janestreet_core = 1 +" let g:syntastic_ocaml_janestreet_core_dir = +" +" Where path is the path to your core installation (usually a collection of +" .cmx and .cmxa files). +" +" +" By default the camlp4o preprocessor is used to check the syntax of .ml, and .mli files, +" ocamllex is used to check .mll files and menhir is used to check .mly files. +" The output is all redirected to /dev/null, nothing is written to the disk. +" +" If your source code needs camlp4r then you can define this in your .vimrc: +" +" let g:syntastic_ocaml_camlp4r = 1 +" +" If you used some syntax extensions, or you want to also typecheck the source +" code, then you can define this: +" +" let g:syntastic_ocaml_use_ocamlbuild = 1 +" +" This will run ocamlbuild .inferred.mli, so it will write to your _build +" directory (and possibly rebuild your myocamlbuild.ml plugin), only enable this +" if you are ok with that. +" +" If you are using syntax extensions / external libraries and have a properly +" set up _tags (and myocamlbuild.ml file) then it should just work +" to enable this flag and get syntax / type checks through syntastic. +" +" For best results your current directory should be the project root +" (same situation if you want useful output from :make). + +if exists("g:loaded_syntastic_ocaml_camlp4o_checker") + finish +endif +let g:loaded_syntastic_ocaml_camlp4o_checker=1 + +if exists('g:syntastic_ocaml_camlp4r') && + \ g:syntastic_ocaml_camlp4r != 0 + let s:ocamlpp="camlp4r" +else + let s:ocamlpp="camlp4o" +endif + +function! SyntaxCheckers_ocaml_camlp4o_IsAvailable() + return executable(s:ocamlpp) +endfunction + +if !exists('g:syntastic_ocaml_use_ocamlc') || !executable('ocamlc') + let g:syntastic_ocaml_use_ocamlc = 0 +endif + +if !exists('g:syntastic_ocaml_use_janestreet_core') + let g:syntastic_ocaml_use_ocamlc = 0 +endif + +if !exists('g:syntastic_ocaml_use_ocamlbuild') || !executable("ocamlbuild") + let g:syntastic_ocaml_use_ocamlbuild = 0 +endif + +function! SyntaxCheckers_ocaml_camlp4o_GetLocList() + let makeprg = s:GetMakeprg() + if makeprg == "" + return [] + endif + + let errorformat = + \ '%AFile "%f"\, line %l\, characters %c-%*\d:,'. + \ '%AFile "%f"\, line %l\, characters %c-%*\d (end at line %*\d\, character %*\d):,'. + \ '%AFile "%f"\, line %l\, character %c:,'. + \ '%AFile "%f"\, line %l\, character %c:%m,'. + \ '%-GPreprocessing error %.%#,'. + \ '%-GCommand exited %.%#,'. + \ '%C%tarning %n: %m,'. + \ '%C%m,'. + \ '%-G+%.%#' + + return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) +endfunction + +function s:GetMakeprg() + if g:syntastic_ocaml_use_ocamlc + return s:GetOcamlcMakeprg() + endif + + if g:syntastic_ocaml_use_ocamlbuild && isdirectory('_build') + return s:GetOcamlBuildMakeprg() + endif + + return s:GetOtherMakeprg() +endfunction + +function s:GetOcamlcMakeprg() + if g:syntastic_ocaml_use_janestreet_core + let build_cmd = "ocamlc -I " + let build_cmd .= expand(g:syntastic_ocaml_janestreet_core_dir) + let build_cmd .= " -c " . syntastic#util#shexpand('%') + return build_cmd + else + return "ocamlc -c " . syntastic#util#shexpand('%') + endif +endfunction + +function s:GetOcamlBuildMakeprg() + return "ocamlbuild -quiet -no-log -tag annot," . s:ocamlpp . " -no-links -no-hygiene -no-sanitize " . + \ syntastic#util#shexpand('%:r') . ".cmi" +endfunction + +function s:GetOtherMakeprg() + "TODO: give this function a better name? + " + "TODO: should use throw/catch instead of returning an empty makeprg + + let extension = expand('%:e') + let makeprg = "" + + if match(extension, 'mly') >= 0 && executable("menhir") + " ocamlyacc output can't be redirected, so use menhir + let makeprg = "menhir --only-preprocess " . syntastic#util#shexpand('%') . " >" . syntastic#util#DevNull() + elseif match(extension,'mll') >= 0 && executable("ocamllex") + let makeprg = "ocamllex -q " . syntastic#c#GetNullDevice() . " " . syntastic#util#shexpand('%') + else + let makeprg = "camlp4o " . syntastic#c#GetNullDevice() . " " . syntastic#util#shexpand('%') + endif + + return makeprg +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'ocaml', + \ 'name': 'camlp4o'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/perl/efm_perl.pl b/sources_non_forked/syntastic/syntax_checkers/perl/efm_perl.pl new file mode 100644 index 00000000..2e74bcb0 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/perl/efm_perl.pl @@ -0,0 +1,186 @@ +#!/usr/bin/env perl +# vimparse.pl - Reformats the error messages of the Perl interpreter for use +# with the quickfix mode of Vim +# +# Copyright (c) 2001 by Jörg Ziefle +# Copyright (c) 2012 Eric Harmon +# 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 +# description and '# ') and enjoy (be sure to adjust the paths to vimparse.pl +# before): +# +# Program is run interactively with 'perl -w': +# +# set makeprg=$HOME/bin/vimparse.pl\ %\ $* +# set errorformat=%t:%f:%l:%m +# +# Program is only compiled with 'perl -wc': +# +# set makeprg=$HOME/bin/vimparse.pl\ -c\ %\ $* +# set errorformat=%t:%f:%l:%m +# +# Usage: +# vimparse.pl [-c] [-w] [-f ] [programargs] +# +# -c compile only, don't run (perl -wc) +# -w output warnings as warnings instead of errors (slightly slower) +# -f write errors to +# +# Example usages: +# * From the command line: +# vimparse.pl 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 +# type ':mak' or ':mak args' (args being the program arguments) +# 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 +# * grammatical fix: 'There was 1 error.' +# * bug fix for multiple arguments +# * more error checks +# * documentation (top of file, &usage) +# * minor code clean ups +# 0.1 (02/02/2001): +# * Initial version +# * Basic functionality +# +# Todo: +# * test on more systems +# * use portable way to determine the location of perl ('use Config') +# * include option that shows perldiag messages for each error +# * allow to pass in program by STDIN +# * more intuitive behaviour if no error is found (show message) +# +# Tested under SunOS 5.7 with Perl 5.6.0. Let me know if it's not working for +# you. +use warnings; +use strict; +use Getopt::Std; +use File::Temp qw( tempfile ); + +use vars qw/$opt_I $opt_c $opt_w $opt_f $opt_h/; # needed for Getopt in combination with use strict 'vars' + +use constant VERSION => 0.2; + +getopts('cwf:hI:'); + +&usage if $opt_h; # not necessarily needed, but good for further extension + +if (defined $opt_f) { + + open FILE, "> $opt_f" or do { + warn "Couldn't open $opt_f: $!. Using STDOUT instead.\n"; + undef $opt_f; + }; + +}; + +my $handle = (defined $opt_f ? \*FILE : \*STDOUT); + +(my $file = shift) or &usage; # display usage if no filename is supplied +my $args = (@ARGV ? ' ' . join ' ', @ARGV : ''); + +if ($file eq '-') { # make STDIN seek-able, so it can be read twice + my $fh = tempfile(); + print {$fh} ; + open \*STDIN, '<&', $fh or die "open: $!"; + seek \*STDIN, 0, 0 or die "seek: $!"; +} + +my $libs = join ' ', map {"-I$_"} split ',', $opt_I || ''; +my @error_lines = `$^X $libs @{[defined $opt_c ? '-c ' : '' ]} @{[defined $opt_w ? '-X ' : '-Mwarnings ']} "$file$args" 2>&1`; + +my @lines = map { "E:$_" } @error_lines; + +my @warn_lines; +if(defined($opt_w)) { + if ($file eq '-') { + seek \*STDIN, 0, 0 or die "seek: $!"; + } + @warn_lines = `$^X $libs @{[defined $opt_c ? '-c ' : '' ]} -Mwarnings "$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, $severity); + + if ($line =~ /^([EW]):(.*)\sat\s(.*)\sline\s(\d+)(.*)$/) { + ($severity, $message, $file, $lineno, $rest) = ($1, $2, $3, $4, $5); + $errors++; + $message .= $rest if ($rest =~ s/^,//); + print $handle "$severity:$file:$lineno:$message\n"; + + } else { next }; + +} + +if (defined $opt_f) { + + my $msg; + if ($errors == 1) { + + $msg = "There was 1 error.\n"; + + } else { + + $msg = "There were $errors errors.\n"; + + }; + + print STDOUT $msg; + close FILE; + unlink $opt_f unless $errors; + +}; + +sub usage { + + (local $0 = $0) =~ s/^.*\/([^\/]+)$/$1/; # remove path from name of program + print<] [programargs] + + -c compile only, don't run (executes 'perl -c') + -w output warnings as warnings instead of errors (slightly slower) + -f write errors to + -I specify \@INC/#include directory + +Examples: + * At the command line: + $0 program.pl + Displays output on STDOUT. + + $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 + type ':mak' or ':mak args' (args being the program arguments) + to error check. +EOT + + exit 0; + +}; diff --git a/sources_non_forked/syntastic/syntax_checkers/perl/perl.vim b/sources_non_forked/syntastic/syntax_checkers/perl/perl.vim new file mode 100644 index 00000000..d88437dd --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/perl/perl.vim @@ -0,0 +1,71 @@ +"============================================================================ +"File: perl.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Anthony Carapetis , +" Eric Harmon +"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. +" +"============================================================================ +" +" In order to add some custom lib directories that should be added to the +" perl command line you can add those as a comma-separated list to the variable +" g:syntastic_perl_lib_path. +" +" let g:syntastic_perl_lib_path = './lib,./lib/auto' +" +" To use your own perl error output munger script, use the +" g:syntastic_perl_efm_program option. Any command line parameters should be +" included in the variable declaration. The program should expect a single +" parameter; the fully qualified filename of the file to be checked. +" +" let g:syntastic_perl_efm_program = "foo.pl -o -m -g" +" + +if exists("g:loaded_syntastic_perl_perl_checker") + finish +endif +let g:loaded_syntastic_perl_perl_checker=1 + +if !exists("g:syntastic_perl_interpreter") + let g:syntastic_perl_interpreter = "perl" +endif + +function! SyntaxCheckers_perl_perl_IsAvailable() + return executable(g:syntastic_perl_interpreter) +endfunction + +if !exists("g:syntastic_perl_efm_program") + let g:syntastic_perl_efm_program = + \ g:syntastic_perl_interpreter . ' ' . + \ syntastic#util#shescape(expand(':p:h') . '/efm_perl.pl') . + \ ' -c -w' +endif + +function! SyntaxCheckers_perl_perl_GetLocList() + let makeprg = exists("b:syntastic_perl_efm_program") ? b:syntastic_perl_efm_program : g:syntastic_perl_efm_program + if exists("g:syntastic_perl_lib_path") + let makeprg .= ' -I' . g:syntastic_perl_lib_path + endif + let makeprg .= ' ' . syntastic#util#shexpand('%') . s:ExtraMakeprgArgs() + + let errorformat = '%t:%f:%l:%m' + + return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) +endfunction + +function! s:ExtraMakeprgArgs() + let shebang = syntastic#util#parseShebang() + if index(shebang['args'], '-T') != -1 + return ' -Tc' + endif + + return '' +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'perl', + \ 'name': 'perl'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/perl/perlcritic.vim b/sources_non_forked/syntastic/syntax_checkers/perl/perlcritic.vim new file mode 100644 index 00000000..910ded2b --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/perl/perlcritic.vim @@ -0,0 +1,65 @@ +"============================================================================ +"File: perlcritic.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: LCD 47 +"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. +" +"============================================================================ +" +" For details about perlcritic see: +" +" - http://perlcritic.tigris.org/ +" - https://metacpan.org/module/Perl::Critic +" +" Checker options: +" +" - g:syntastic_perl_perlcritic_thres (integer; default: 5) +" error threshold: policy violations with a severity above this +" value are highlighted as errors, the others are warnings +" +" - g:syntastic_perl_perlcritic_args (string; default: empty) +" command line options to pass to perlcritic + +if exists("g:loaded_syntastic_perl_perlcritic_checker") + finish +endif +let g:loaded_syntastic_perl_perlcritic_checker=1 + +if !exists('g:syntastic_perl_perlcritic_thres') + let g:syntastic_perl_perlcritic_thres = 5 +endif + +function! SyntaxCheckers_perl_perlcritic_IsAvailable() + return executable('perlcritic') +endfunction + +function! SyntaxCheckers_perl_perlcritic_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'perlcritic', + \ 'post_args': '--quiet --nocolor --verbose "\%s:\%f:\%l:\%c:(\%s) \%m (\%e)\n"', + \ 'filetype': 'perl', + \ 'subchecker': 'perlcritic' }) + + let errorformat = '%t:%f:%l:%c:%m' + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'returns': [0, 2], + \ 'subtype': 'Style' }) + + " change error types according to the prescribed threshold + for n in range(len(loclist)) + let loclist[n]['type'] = loclist[n]['type'] < g:syntastic_perl_perlcritic_thres ? 'W' : 'E' + endfor + + return loclist +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'perl', + \ 'name': 'perlcritic'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/perl/podchecker.vim b/sources_non_forked/syntastic/syntax_checkers/perl/podchecker.vim new file mode 100644 index 00000000..e6f80e66 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/perl/podchecker.vim @@ -0,0 +1,30 @@ +"============================================================================ +"File: podchecker.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: LCD 47 +"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_perl_podchecker_checker") + finish +endif +let g:loaded_syntastic_perl_podchecker_checker=1 + +function! SyntaxCheckers_perl_podchecker_IsAvailable() + return SyntaxCheckers_pod_podchecker_IsAvailable() +endfunction + +function! SyntaxCheckers_perl_podchecker_GetLocList() + return SyntaxCheckers_pod_podchecker_GetLocList() +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'perl', + \ 'name': 'podchecker'}) + +runtime! syntax_checkers/pod/*.vim diff --git a/sources_non_forked/syntastic/syntax_checkers/php/php.vim b/sources_non_forked/syntastic/syntax_checkers/php/php.vim new file mode 100644 index 00000000..a6abffb1 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/php/php.vim @@ -0,0 +1,52 @@ +"============================================================================ +"File: php.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Martin Grenfell +"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_php_php_checker") + finish +endif +let g:loaded_syntastic_php_php_checker=1 + +function! SyntaxCheckers_php_php_IsAvailable() + return executable("php") +endfunction + +function! SyntaxCheckers_php_php_GetHighlightRegex(item) + let unexpected = matchstr(a:item['text'], "unexpected '[^']\\+'") + if len(unexpected) < 1 + return '' + endif + return '\V'.split(unexpected, "'")[1] +endfunction + +function! SyntaxCheckers_php_php_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'php', + \ 'args': '-l -d error_reporting=E_ALL -d display_errors=1 -d log_errors=0 -d xdebug.cli_color=0', + \ 'filetype': 'php', + \ 'subchecker': 'php' }) + + let errorformat = + \ '%-GNo syntax errors detected in%.%#,'. + \ 'Parse error: %#syntax %trror\, %m in %f on line %l,'. + \ 'Parse %trror: %m in %f on line %l,'. + \ 'Fatal %trror: %m in %f on line %l,'. + \ '%-G\s%#,'. + \ '%-GErrors parsing %.%#' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'php', + \ 'name': 'php'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/php/phpcs.vim b/sources_non_forked/syntastic/syntax_checkers/php/phpcs.vim new file mode 100644 index 00000000..f6646c66 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/php/phpcs.vim @@ -0,0 +1,44 @@ +"============================================================================ +"File: phpcs.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Martin Grenfell +"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. +" +"============================================================================ +" +" See here for details of phpcs +" - phpcs (see http://pear.php.net/package/PHP_CodeSniffer) +" +if exists("g:loaded_syntastic_php_phpcs_checker") + finish +endif +let g:loaded_syntastic_php_phpcs_checker=1 + +function! SyntaxCheckers_php_phpcs_IsAvailable() + return executable('phpcs') +endfunction + +function! SyntaxCheckers_php_phpcs_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'phpcs', + \ 'args': '--report=csv', + \ 'filetype': 'php', + \ 'subchecker': 'phpcs' }) + + let errorformat = + \ '%-GFile\,Line\,Column\,Type\,Message\,Source\,Severity,'. + \ '"%f"\,%l\,%c\,%t%*[a-zA-Z]\,"%m"\,%*[a-zA-Z0-9_.-]\,%*[0-9]' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'subtype': 'Style' }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'php', + \ 'name': 'phpcs'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/php/phpmd.vim b/sources_non_forked/syntastic/syntax_checkers/php/phpmd.vim new file mode 100644 index 00000000..c21362f9 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/php/phpmd.vim @@ -0,0 +1,78 @@ +"============================================================================ +"File: phpmd.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Martin Grenfell +"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. +" +"============================================================================ +" +" See here for details of phpmd +" - phpmd (see http://phpmd.org) + +if exists("g:loaded_syntastic_php_phpmd_checker") + finish +endif +let g:loaded_syntastic_php_phpmd_checker=1 + +function! SyntaxCheckers_php_phpmd_IsAvailable() + return executable('phpmd') +endfunction + +function! SyntaxCheckers_php_phpmd_GetHighlightRegex(item) + let term = matchstr(a:item['text'], '\C^The \S\+ \w\+\(()\)\= \(has\|is not\|utilizes\)') + if term != '' + return '\V'.substitute(term, '\C^The \S\+ \(\w\+\)\(()\)\= .*', '\1', '') + endif + let term = matchstr(a:item['text'], '\C^Avoid \(variables with short\|excessively long variable\) names like \S\+\.') + if term != '' + return '\V'.substitute(term, '\C^Avoid \(variables with short\|excessively long variable\) names like \(\S\+\)\..*', '\2', '') + endif + let term = matchstr(a:item['text'], '\C^Avoid using short method names like \S\+::\S\+()\.') + if term != '' + return '\V'.substitute(term, '\C^Avoid using short method names like \S\+::\(\S\+\)()\..*', '\1', '') + endif + let term = matchstr(a:item['text'], '\C^\S\+ accesses the super-global variable ') + if term != '' + return '\V'.substitute(term, '\C accesses the super-global variable .*$', '', '') + endif + let term = matchstr(a:item['text'], '\C^Constant \S\+ should be defined in uppercase') + if term != '' + return '\V'.substitute(term, '\C^Constant \(\S\+\) should be defined in uppercase', '\1', '') + endif + let term = matchstr(a:item['text'], "\\C^The '\\S\\+()' method which returns ") + if term != '' + return '\V'.substitute(term, "\\C^The '\\(\\S\\+\\()' method which returns.*", '\1', '') + endif + let term = matchstr(a:item['text'], '\C variable \S\+ should begin with ') + if term != '' + return '\V'.substitute(term, '\C.* variable \(\S\+\) should begin with .*', '\1', '') + endif + let term = matchstr(a:item['text'], "\\C^Avoid unused \\(private fields\\|local variables\\|private methods\\|parameters\\) such as '\\S\\+'") + if term != '' + return '\V'.substitute(term, "\\C^Avoid unused \\(private fields\\|local variables\\|private methods\\|parameters\\) such as '\\(\\S\\+\\)'.*", '\2', '') + endif + return '' +endfunction + +function! SyntaxCheckers_php_phpmd_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'phpmd', + \ 'post_args': 'text codesize,design,unusedcode,naming', + \ 'filetype': 'php', + \ 'subchecker': 'phpmd' }) + + let errorformat = '%E%f:%l%\s%#%m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'subtype' : 'Style' }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'php', + \ 'name': 'phpmd'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/pod/podchecker.vim b/sources_non_forked/syntastic/syntax_checkers/pod/podchecker.vim new file mode 100644 index 00000000..c429a495 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/pod/podchecker.vim @@ -0,0 +1,51 @@ +"============================================================================ +"File: podchecker.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: LCD 47 +"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_pod_podchecker_checker") + finish +endif +let g:loaded_syntastic_pod_podchecker_checker=1 + +function! SyntaxCheckers_pod_podchecker_IsAvailable() + return executable("podchecker") +endfunction + +function! SyntaxCheckers_pod_podchecker_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'podchecker', + \ 'filetype': 'pod', + \ 'subchecker': 'podchecker' }) + + let errorformat = + \ '%W%[%#]%[%#]%[%#] WARNING: %m at line %l in file %f,' . + \ '%W%[%#]%[%#]%[%#] WARNING: %m at line EOF in file %f,' . + \ '%E%[%#]%[%#]%[%#] ERROR: %m at line %l in file %f,' . + \ '%E%[%#]%[%#]%[%#] ERROR: %m at line EOF in file %f' + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'returns': [0, 1, 2] }) + + for n in range(len(loclist)) + let e = loclist[n] + if e['valid'] && e['lnum'] == 0 + let e['lnum'] = str2nr(matchstr(e['text'], '\m\ +"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_puppet_puppet_checker") + finish +endif +let g:loaded_syntastic_puppet_puppet_checker=1 + +function! SyntaxCheckers_puppet_puppet_IsAvailable() + return executable("puppet") +endfunction + +function! SyntaxCheckers_puppet_puppet_GetLocList() + + let ver = syntastic#util#parseVersion('puppet --version 2>' . syntastic#util#DevNull()) + + if syntastic#util#versionIsAtLeast(ver, [2,7,0]) + let args = 'parser validate --color=false' + else + let args = '--color=false --parseonly' + endif + + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'puppet', + \ 'args': args, + \ 'filetype': 'puppet', + \ 'subchecker': 'puppet' }) + + let errorformat = + \ '%-Gerr: Try ''puppet help parser validate'' for usage,' . + \ '%-GError: Try ''puppet help parser validate'' for usage,' . + \ '%Eerr: Could not parse for environment %*[a-z]: %m at %f:%l,' . + \ '%EError: Could not parse for environment %*[a-z]: %m at %f:%l' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) + +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'puppet', + \ 'name': 'puppet'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/puppet/puppetlint.vim b/sources_non_forked/syntastic/syntax_checkers/puppet/puppetlint.vim new file mode 100644 index 00000000..c65e601b --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/puppet/puppetlint.vim @@ -0,0 +1,47 @@ +"============================================================================ +"File: puppetlint.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Eivind Uggedal +"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_puppet_puppetlint_checker") + finish +endif +let g:loaded_syntastic_puppet_puppetlint_checker=1 + +if exists("g:syntastic_puppet_lint_arguments") + let g:syntastic_puppet_puppetlint_args = g:syntastic_puppet_lint_arguments + call syntastic#util#deprecationWarn("variable g:syntastic_puppet_lint_arguments is deprecated, please use g:syntastic_puppet_puppetlint_args instead") +endif + +function! SyntaxCheckers_puppet_puppetlint_IsAvailable() + return + \ executable("puppet") && + \ executable("puppet-lint") && + \ syntastic#util#versionIsAtLeast(syntastic#util#parseVersion('puppet-lint --version 2>' . + \ syntastic#util#DevNull()), [0,1,10]) +endfunction + +function! SyntaxCheckers_puppet_puppetlint_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'puppet-lint', + \ 'post_args': '--log-format "\%{KIND} [\%{check}] \%{message} at \%{fullpath}:\%{linenumber}"', + \ 'filetype': 'puppet', + \ 'subchecker': 'puppetlint' }) + + let errorformat = '%t%*[a-zA-Z] %m at %f:%l' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'puppet', + \ 'name': 'puppetlint'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/python/flake8.vim b/sources_non_forked/syntastic/syntax_checkers/python/flake8.vim new file mode 100644 index 00000000..796ba6bd --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/python/flake8.vim @@ -0,0 +1,44 @@ +"============================================================================ +"File: flake8.vim +"Description: Syntax checking plugin for syntastic.vim +"Authors: Sylvain Soliman +" kstep +" +"============================================================================ +if exists("g:loaded_syntastic_python_flake8_checker") + finish +endif +let g:loaded_syntastic_python_flake8_checker=1 + +function! SyntaxCheckers_python_flake8_IsAvailable() + return executable('flake8') +endfunction + +function! SyntaxCheckers_python_flake8_GetHighlightRegex(i) + return SyntaxCheckers_python_pyflakes_GetHighlightRegex(a:i) +endfunction + +function! SyntaxCheckers_python_flake8_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'flake8', + \ 'filetype': 'python', + \ 'subchecker': 'flake8' }) + + let errorformat = + \ '%E%f:%l: could not compile,%-Z%p^,'. + \ '%W%f:%l:%c: F%n %m,'. + \ '%W%f:%l:%c: C%n %m,'. + \ '%E%f:%l:%c: %t%n %m,'. + \ '%E%f:%l: %t%n %m,'. + \ '%-G%.%#' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'python', + \ 'name': 'flake8'}) + +runtime! syntax_checkers/python/pyflakes.vim diff --git a/sources_non_forked/syntastic/syntax_checkers/python/pep8.vim b/sources_non_forked/syntastic/syntax_checkers/python/pep8.vim new file mode 100644 index 00000000..71837187 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/python/pep8.vim @@ -0,0 +1,46 @@ +"============================================================================ +"File: pep8.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: LCD 47 +"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. +" +"============================================================================ +" +" For details about pep8 see: https://github.com/jcrocholl/pep8 + +if exists("g:loaded_syntastic_python_pep8_checker") + finish +endif +let g:loaded_syntastic_python_pep8_checker=1 + +function! SyntaxCheckers_python_pep8_IsAvailable() + return executable('pep8') +endfunction + +function! SyntaxCheckers_python_pep8_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'pep8', + \ 'filetype': 'python', + \ 'subchecker': 'pep8' }) + + let errorformat = '%f:%l:%c: %m' + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'subtype': 'Style' }) + + for n in range(len(loclist)) + let loclist[n]['type'] = loclist[n]['text'] =~? '^W' ? 'W' : 'E' + endfor + + return loclist +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'python', + \ 'name': 'pep8'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/python/py3kwarn.vim b/sources_non_forked/syntastic/syntax_checkers/python/py3kwarn.vim new file mode 100644 index 00000000..44d03655 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/python/py3kwarn.vim @@ -0,0 +1,31 @@ +"============================================================================ +"File: py3kwarn.vim +"Description: Syntax checking plugin for syntastic.vim +"Authors: Liam Curry +" +"============================================================================ +if exists("g:loaded_syntastic_python_py3kwarn_checker") + finish +endif +let g:loaded_syntastic_python_py3kwarn_checker=1 + +function! SyntaxCheckers_python_py3kwarn_IsAvailable() + return executable('py3kwarn') +endfunction + +function! SyntaxCheckers_python_py3kwarn_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'py3kwarn', + \ 'filetype': 'python', + \ 'subchecker': 'py3kwarn' }) + + let errorformat = '%W%f:%l:%c: %m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'python', + \ 'name': 'py3kwarn'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/python/pyflakes.vim b/sources_non_forked/syntastic/syntax_checkers/python/pyflakes.vim new file mode 100644 index 00000000..f93047bf --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/python/pyflakes.vim @@ -0,0 +1,63 @@ +"============================================================================ +"File: pyflakes.vim +"Description: Syntax checking plugin for syntastic.vim +"Authors: Martin Grenfell +" kstep +" Parantapa Bhattacharya +" +"============================================================================ +if exists("g:loaded_syntastic_python_pyflakes_checker") + finish +endif +let g:loaded_syntastic_python_pyflakes_checker=1 + +function! SyntaxCheckers_python_pyflakes_IsAvailable() + return executable('pyflakes') +endfunction + +function! SyntaxCheckers_python_pyflakes_GetHighlightRegex(i) + 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 + \ || match(a:i['text'], 'redefinition of') > -1 + \ || match(a:i['text'], 'referenced before assignment') > -1 + \ || match(a:i['text'], 'duplicate argument') > -1 + \ || match(a:i['text'], 'after other statements') > -1 + \ || match(a:i['text'], 'shadowed by loop variable') > -1 + + " fun with Python's %r: try "..." first, then '...' + let terms = split(a:i['text'], '"', 1) + if len(terms) > 2 + return terms[1] + endif + + let terms = split(a:i['text'], "'", 1) + if len(terms) > 2 + return terms[1] + endif + endif + return '' +endfunction + +function! SyntaxCheckers_python_pyflakes_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'pyflakes', + \ 'filetype': 'python', + \ 'subchecker': 'pyflakes' }) + + let errorformat = + \ '%E%f:%l: could not compile,'. + \ '%-Z%p^,'. + \ '%E%f:%l:%c: %m,'. + \ '%E%f:%l: %m,'. + \ '%-G%.%#' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'defaults': {'text': "Syntax error"} }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'python', + \ 'name': 'pyflakes'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/python/pylama.vim b/sources_non_forked/syntastic/syntax_checkers/python/pylama.vim new file mode 100644 index 00000000..4d7d02ad --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/python/pylama.vim @@ -0,0 +1,53 @@ +"============================================================================ +"File: pylama.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: LCD 47 +"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_python_pylama_checker") + finish +endif +let g:loaded_syntastic_python_pylama_checker=1 + +function! SyntaxCheckers_python_pylama_IsAvailable() + return executable('pylama') +endfunction + +function! SyntaxCheckers_python_pylama_GetHighlightRegex(i) + return SyntaxCheckers_python_pyflakes_GetHighlightRegex(a:i) +endfunction + +function! SyntaxCheckers_python_pylama_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'pylama', + \ 'post_args': ' -f pep8', + \ 'filetype': 'python', + \ 'subchecker': 'pylama' }) + + let errorformat = '%A%f:%l:%c: %m' + + let loclist=SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'postprocess': ['sort'] }) + + for n in range(len(loclist)) + let loclist[n]['type'] = match(['R', 'C', 'W'], loclist[n]['text'][0]) >= 0 ? 'W' : 'E' + if loclist[n]['text'] =~# '\v\[%(pep8|pep257|mccabe)\]$' + let loclist[n]['subtype'] = 'Style' + endif + endfor + + return loclist +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'python', + \ 'name': 'pylama' }) + +runtime! syntax_checkers/python/pyflakes.vim diff --git a/sources_non_forked/syntastic/syntax_checkers/python/pylint.vim b/sources_non_forked/syntastic/syntax_checkers/python/pylint.vim new file mode 100644 index 00000000..923664d4 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/python/pylint.vim @@ -0,0 +1,43 @@ +"============================================================================ +"File: pylint.vim +"Description: Syntax checking plugin for syntastic.vim +"Author: Parantapa Bhattacharya +" +"============================================================================ +if exists("g:loaded_syntastic_python_pylint_checker") + finish +endif +let g:loaded_syntastic_python_pylint_checker=1 + +function! SyntaxCheckers_python_pylint_IsAvailable() + return executable('pylint') +endfunction + +function! SyntaxCheckers_python_pylint_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'pylint', + \ 'args': ' -f parseable -r n -i y', + \ 'filetype': 'python', + \ 'subchecker': 'pylint' }) + + let errorformat = + \ '%A%f:%l:%m,' . + \ '%A%f:(%l):%m,' . + \ '%-Z%p^%.%#,' . + \ '%-G%.%#' + + let loclist=SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'postprocess': ['sort'] }) + + for n in range(len(loclist)) + let loclist[n]['type'] = match(['R', 'C', 'W'], loclist[n]['text'][2]) >= 0 ? 'W' : 'E' + endfor + + return loclist +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'python', + \ 'name': 'pylint' }) diff --git a/sources_non_forked/syntastic/syntax_checkers/python/python.vim b/sources_non_forked/syntastic/syntax_checkers/python/python.vim new file mode 100644 index 00000000..eff1696b --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/python/python.vim @@ -0,0 +1,43 @@ +"============================================================================ +"File: python.vim +"Description: Syntax checking plugin for syntastic.vim +"Author: Artem Nezvigin +" +" `errorformat` derived from: +" http://www.vim.org/scripts/download_script.php?src_id=1392 +" +"============================================================================ +if exists("g:loaded_syntastic_python_python_checker") + finish +endif +let g:loaded_syntastic_python_python_checker=1 + +function! SyntaxCheckers_python_python_IsAvailable() + return executable('python') +endfunction + +function! SyntaxCheckers_python_python_GetLocList() + let fname = "'" . escape(expand('%'), "\\'") . "'" + + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'python', + \ 'args': '-c', + \ 'fname': syntastic#util#shescape("compile(open(" . fname . ").read(), " . fname . ", 'exec')"), + \ 'filetype': 'python', + \ 'subchecker': 'python' }) + + let errorformat = + \ '%E File "%f"\, line %l,' . + \ '%C %p^,' . + \ '%C %.%#,' . + \ '%Z%m,' . + \ '%-G%.%#' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'python', + \ 'name': 'python'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/rst/rst2pseudoxml.vim b/sources_non_forked/syntastic/syntax_checkers/rst/rst2pseudoxml.vim new file mode 100644 index 00000000..454b4d85 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/rst/rst2pseudoxml.vim @@ -0,0 +1,62 @@ +"============================================================================ +"File: rst.vim +"Description: Syntax checking plugin for docutil's reStructuredText files +"Maintainer: James Rowe +"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. +" +"============================================================================ + +" We use rst2pseudoxml.py, as it is ever so marginally faster than the other +" rst2${x} tools in docutils. + +if exists("g:loaded_syntastic_rst_rst2pseudoxml_checker") + finish +endif +let g:loaded_syntastic_rst_rst2pseudoxml_checker=1 + +function! SyntaxCheckers_rst_rst2pseudoxml_IsAvailable() + return executable("rst2pseudoxml.py") || executable("rst2pseudoxml") +endfunction + +function! SyntaxCheckers_rst_rst2pseudoxml_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': s:exe(), + \ 'args': '--report=2 --exit-status=1', + \ 'tail': syntastic#util#DevNull(), + \ 'filetype': 'rst', + \ 'subchecker': 'rst2pseudoxml' }) + + let errorformat = + \ '%f:%l: (%tNFO/1) %m,'. + \ '%f:%l: (%tARNING/2) %m,'. + \ '%f:%l: (%tRROR/3) %m,'. + \ '%f:%l: (%tEVERE/4) %m,'. + \ '%-G%.%#' + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) + + for n in range(len(loclist)) + if loclist[n]['type'] ==? 'S' + let loclist[n]['type'] = 'E' + elseif loclist[n]['type'] ==? 'I' + let loclist[n]['type'] = 'W' + let loclist[n]['subtype'] = 'Style' + endif + endfor + + return loclist +endfunction + +function s:exe() + return executable("rst2pseudoxml.py") ? "rst2pseudoxml.py" : "rst2pseudoxml" +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'rst', + \ 'name': 'rst2pseudoxml'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/ruby/jruby.vim b/sources_non_forked/syntastic/syntax_checkers/ruby/jruby.vim new file mode 100644 index 00000000..bef2b5f5 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/ruby/jruby.vim @@ -0,0 +1,52 @@ +"============================================================================ +"File: jruby.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Leonid Shevtsov +"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_ruby_jruby_checker") + finish +endif +let g:loaded_syntastic_ruby_jruby_checker=1 + +function! SyntaxCheckers_ruby_jruby_IsAvailable() + return executable('jruby') +endfunction + +function! SyntaxCheckers_ruby_jruby_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': s:exe(), + \ 'args': s:args(), + \ 'filetype': 'ruby', + \ 'subchecker': 'jruby' }) + + let errorformat = + \ '%-GSyntax OK for %f,'. + \ '%ESyntaxError in %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 + +function s:args() + return has('win32') ? '-W1 -T1 -c' : '-W1 -c' +endfunction + +function s:exe() + return has('win32') ? 'jruby' : 'RUBYOPT= jruby' +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'ruby', + \ 'name': 'jruby'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/ruby/macruby.vim b/sources_non_forked/syntastic/syntax_checkers/ruby/macruby.vim new file mode 100644 index 00000000..9226e41e --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/ruby/macruby.vim @@ -0,0 +1,43 @@ +"============================================================================ +"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. +" +"============================================================================ +if exists("g:loaded_syntastic_ruby_macruby_checker") + finish +endif +let g:loaded_syntastic_ruby_macruby_checker=1 + +function! SyntaxCheckers_ruby_macruby_IsAvailable() + return executable('macruby') +endfunction + +function! SyntaxCheckers_ruby_macruby_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'RUBYOPT= macruby', + \ 'args': '-W1 -c', + \ 'filetype': 'ruby', + \ 'subchecker': 'macruby' }) + + 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 + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'ruby', + \ 'name': 'macruby'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/ruby/mri.vim b/sources_non_forked/syntastic/syntax_checkers/ruby/mri.vim new file mode 100644 index 00000000..27a46a48 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/ruby/mri.vim @@ -0,0 +1,77 @@ +"============================================================================ +"File: mri.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Martin Grenfell +"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_ruby_mri_checker") + finish +endif +let g:loaded_syntastic_ruby_mri_checker=1 + +if !exists("g:syntastic_ruby_exec") + let g:syntastic_ruby_exec = "ruby" +endif + +function! SyntaxCheckers_ruby_mri_IsAvailable() + return executable(expand(g:syntastic_ruby_exec)) +endfunction + +function! SyntaxCheckers_ruby_mri_GetHighlightRegex(i) + if match(a:i['text'], 'assigned but unused variable') > -1 + let term = split(a:i['text'], ' - ')[1] + return '\V\<'.term.'\>' + endif + + return '' +endfunction + +function! SyntaxCheckers_ruby_mri_GetLocList() + let exe = expand(g:syntastic_ruby_exec) + if !has('win32') + let exe = 'RUBYOPT= ' . exe + endif + + let makeprg = syntastic#makeprg#build({ + \ 'exe': exe, + \ 'args': '-w -T1 -c', + \ 'filetype': 'ruby', + \ 'subchecker': 'mri' }) + + "this is a hack to filter out a repeated useless warning in rspec files + "containing lines like + " + " foo.should == 'bar' + " + "Which always generate the warning below. Note that ruby >= 1.9.3 includes + "the word "possibly" in the warning + let errorformat = '%-G%.%#warning: %\(possibly %\)%\?useless use of == in void context,' + + " filter out lines starting with ... + " long lines are truncated and wrapped in ... %p then returns the wrong + " column offset + let errorformat .= '%-G%\%.%\%.%\%.%.%#,' + + 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 + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'ruby', + \ 'name': 'mri'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/ruby/rubocop.vim b/sources_non_forked/syntastic/syntax_checkers/ruby/rubocop.vim new file mode 100644 index 00000000..b93d8d1a --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/ruby/rubocop.vim @@ -0,0 +1,55 @@ +"============================================================================ +"File: rubocop.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Recai Oktaş +"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. +" +"============================================================================ +" +" In order to use rubocop with the default ruby checker (mri): +" let g:syntastic_ruby_checkers = ['mri', 'rubocop'] + +if exists("g:loaded_syntastic_ruby_rubocop_checker") + finish +endif +let g:loaded_syntastic_ruby_rubocop_checker=1 + +function! SyntaxCheckers_ruby_rubocop_IsAvailable() + return + \ executable('rubocop') && + \ syntastic#util#versionIsAtLeast(syntastic#util#parseVersion('rubocop --version'), [0,9,0]) +endfunction + +function! SyntaxCheckers_ruby_rubocop_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'rubocop', + \ 'args': '--format emacs --silent', + \ 'filetype': 'ruby', + \ 'subchecker': 'rubocop' }) + + let errorformat = '%f:%l:%c: %t: %m' + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'subtype': 'Style'}) + + " convert rubocop severities to error types recognized by syntastic + for n in range(len(loclist)) + if loclist[n]['type'] == 'F' + let loclist[n]['type'] = 'E' + elseif loclist[n]['type'] != 'W' && loclist[n]['type'] != 'E' + let loclist[n]['type'] = 'W' + endif + endfor + + return loclist +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'ruby', + \ 'name': 'rubocop'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/rust/rustc.vim b/sources_non_forked/syntastic/syntax_checkers/rust/rustc.vim new file mode 100644 index 00000000..e88b4cf9 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/rust/rustc.vim @@ -0,0 +1,42 @@ +"============================================================================ +"File: rust.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Chad Jablonski +"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_rust_rustc_checker") + finish +endif +let g:loaded_syntastic_rust_rustc_checker=1 + +function! SyntaxCheckers_rust_rustc_IsAvailable() + return executable("rustc") +endfunction + +function! SyntaxCheckers_rust_rustc_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'rustc', + \ 'args': '--parse-only', + \ 'filetype': 'rust', + \ 'subchecker': 'rustc' }) + + let errorformat = + \ '%E%f:%l:%c: \\d%#:\\d%# %.%\{-}error:%.%\{-} %m,' . + \ '%W%f:%l:%c: \\d%#:\\d%# %.%\{-}warning:%.%\{-} %m,' . + \ '%C%f:%l %m,' . + \ '%-Z%.%#' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'rust', + \ 'name': 'rustc'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/sass/sass.vim b/sources_non_forked/syntastic/syntax_checkers/sass/sass.vim new file mode 100644 index 00000000..4b8d4863 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/sass/sass.vim @@ -0,0 +1,78 @@ +"============================================================================ +"File: sass.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Martin Grenfell +"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_sass_sass_checker") + finish +endif +let g:loaded_syntastic_sass_sass_checker=1 + +function! SyntaxCheckers_sass_sass_IsAvailable() + return executable("sass") +endfunction + +"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() + +"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 +endif + +"use compass imports if available +let s:imports = "" +if executable("compass") + let s:imports = "--compass" +endif + +function! SyntaxCheckers_sass_sass_GetLocList() + if !g:syntastic_sass_check_partials && expand('%:t')[0] == '_' + return [] + endif + + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'sass', + \ 'args': '--cache-location ' . s:sass_cache_location . ' ' . s:imports . ' --check', + \ 'filetype': 'sass', + \ 'subchecker': 'sass' }) + + let errorformat = + \ '%ESyntax %trror: %m,' . + \ '%+C %.%#,' . + \ '%C on line %l of %f\, %.%#,' . + \ '%C on line %l of %f,' . + \ '%-G %\+from line %.%#,' . + \ '%-G %\+Use --trace for backtrace.,' . + \ '%W%>DEPRECATION WARNING on line %l of %f:,' . + \ '%+C%> %.%#,' . + \ '%W%>WARNING: on line %l of %f:,' . + \ '%+C%> %.%#,' . + \ '%W%>WARNING on line %l of %f: %m,' . + \ '%+C%> %.%#,' . + \ '%W%>WARNING on line %l of %f:,' . + \ '%Z%m,' . + \ '%W%>WARNING: %m,' . + \ '%C on line %l of %f\, %.%#,' . + \ '%C on line %l of %f,' . + \ '%-G %\+from line %.%#,' . + \ 'Syntax %trror on line %l: %m,' . + \ '%-G%.%#' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'postprocess': ['compressWhitespace'] }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'sass', + \ 'name': 'sass'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/scala/fsc.vim b/sources_non_forked/syntastic/syntax_checkers/scala/fsc.vim new file mode 100644 index 00000000..d0e95a7d --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/scala/fsc.vim @@ -0,0 +1,46 @@ +"============================================================================ +"File: fsc.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Gregor Uhlenheuer +"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_scala_fsc_checker') + finish +endif +let g:loaded_syntastic_scala_fsc_checker = 1 + +function! SyntaxCheckers_scala_fsc_IsAvailable() + return executable('fsc') +endfunction + +if !exists('g:syntastic_scala_options') + let g:syntastic_scala_options = '' +endif + +function! SyntaxCheckers_scala_fsc_GetLocList() + " fsc has some serious problems with the + " working directory changing after being started + " that's why we better pass an absolute path + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'fsc', + \ 'args': '-Ystop-after:parser ' . g:syntastic_scala_options, + \ 'fname': syntastic#util#shexpand('%:p'), + \ 'filetype': 'scala', + \ 'subchecker': 'fsc' }) + + let errorformat = '%f:%l: %trror: %m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'scala', + \ 'name': 'fsc'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/scala/scalac.vim b/sources_non_forked/syntastic/syntax_checkers/scala/scalac.vim new file mode 100644 index 00000000..d6319c16 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/scala/scalac.vim @@ -0,0 +1,43 @@ +"============================================================================ +"File: scala.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Rickey Visinski +"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_scala_scalac_checker") + finish +endif +let g:loaded_syntastic_scala_scalac_checker=1 + +function! SyntaxCheckers_scala_scalac_IsAvailable() + return executable("scalac") +endfunction + +if !exists('g:syntastic_scala_options') + let g:syntastic_scala_options = '' +endif + + +function! SyntaxCheckers_scala_scalac_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'scalac', + \ 'args': '-Ystop-after:parser ' . g:syntastic_scala_options, + \ 'filetype': 'scala', + \ 'subchecker': 'scalac' }) + + let errorformat = '%f:%l: %trror: %m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'scala', + \ 'name': 'scalac'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/scss/sass.vim b/sources_non_forked/syntastic/syntax_checkers/scss/sass.vim new file mode 100644 index 00000000..604bb41d --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/scss/sass.vim @@ -0,0 +1,31 @@ + +"============================================================================ +"File: scss.vim +"Description: scss syntax checking plugin for syntastic +"Maintainer: Martin Grenfell +"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_scss_sass_checker") + finish +endif +let g:loaded_syntastic_scss_sass_checker=1 + +function! SyntaxCheckers_scss_sass_IsAvailable() + return SyntaxCheckers_sass_sass_IsAvailable() +endfunction + +function! SyntaxCheckers_scss_sass_GetLocList() + return SyntaxCheckers_sass_sass_GetLocList() +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'scss', + \ 'name': 'sass'}) + +runtime! syntax_checkers/sass/*.vim diff --git a/sources_non_forked/syntastic/syntax_checkers/sh/checkbashisms.vim b/sources_non_forked/syntastic/syntax_checkers/sh/checkbashisms.vim new file mode 100644 index 00000000..9fb1f7ae --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/sh/checkbashisms.vim @@ -0,0 +1,45 @@ +"============================================================================ +"File: checkbashisms.vim +"Description: Shell script syntax/style checking plugin for syntastic.vim +"Notes: checkbashisms.pl can be downloaded from +" http://debian.inode.at/debian/pool/main/d/devscripts/ +" as part of the devscripts package. +"============================================================================ + +if exists("g:loaded_syntastic_sh_checkbashisms_checker") + finish +endif +let g:loaded_syntastic_sh_checkbashisms_checker=1 + + +function! SyntaxCheckers_sh_checkbashisms_IsAvailable() + return executable('checkbashisms') +endfunction + + +function! SyntaxCheckers_sh_checkbashisms_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'checkbashisms', + \ 'args': '-fx', + \ 'filetype': 'sh', + \ 'subchecker': 'checkbashisms'}) + + let errorformat = + \ '%-Gscript %f is already a bash script; skipping,' . + \ '%Eerror: %f: %m\, opened in line %l,' . + \ '%Eerror: %f: %m,' . + \ '%Ecannot open script %f for reading: %m,' . + \ '%Wscript %f %m,%C%.# lines,' . + \ '%Wpossible bashism in %f line %l (%m):,%C%.%#,%Z.%#,' . + \ '%-G%.%#' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'subtype': 'Style'}) +endfunction + + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'sh', + \ 'name': 'checkbashisms'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/sh/sh.vim b/sources_non_forked/syntastic/syntax_checkers/sh/sh.vim new file mode 100644 index 00000000..8c44960b --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/sh/sh.vim @@ -0,0 +1,83 @@ +"============================================================================ +"File: sh.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Gregor Uhlenheuer +"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_sh_sh_checker") + finish +endif +let g:loaded_syntastic_sh_sh_checker=1 + +function! s:GetShell() + if !exists('b:shell') || b:shell == '' + let b:shell = '' + let shebang = getbufline(bufnr('%'), 1)[0] + if len(shebang) > 0 + if match(shebang, 'bash') >= 0 + let b:shell = 'bash' + elseif match(shebang, 'zsh') >= 0 + let b:shell = 'zsh' + elseif match(shebang, 'sh') >= 0 + let b:shell = 'sh' + endif + endif + " try to use env variable in case no shebang could be found + if b:shell == '' + let b:shell = fnamemodify(expand('$SHELL'), ':t') + endif + endif + return b:shell +endfunction + +function! s:ForwardToZshChecker() + let registry = g:SyntasticRegistry.Instance() + if registry.checkable('zsh') + return SyntaxCheckers_zsh_zsh_GetLocList() + else + return [] + endif + +endfunction + + +function! s:IsShellValid() + return len(s:GetShell()) > 0 && executable(s:GetShell()) +endfunction + + +function! SyntaxCheckers_sh_sh_IsAvailable() + return s:IsShellValid() +endfunction + +function! SyntaxCheckers_sh_sh_GetLocList() + if s:GetShell() == 'zsh' + return s:ForwardToZshChecker() + endif + + if !s:IsShellValid() + return [] + endif + + let makeprg = syntastic#makeprg#build({ + \ 'exe': s:GetShell(), + \ 'args': '-n', + \ 'filetype': 'sh', + \ 'subchecker': 'sh'}) + + let errorformat = '%f: line %l: %m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat}) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'sh', + \ 'name': 'sh'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/slim/slimrb.vim b/sources_non_forked/syntastic/syntax_checkers/slim/slimrb.vim new file mode 100644 index 00000000..2644decf --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/slim/slimrb.vim @@ -0,0 +1,57 @@ +"============================================================================ +"File: slim.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Martin Grenfell +"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_slim_slimrb_checker") + finish +endif +let g:loaded_syntastic_slim_slimrb_checker=1 + +function! SyntaxCheckers_slim_slimrb_IsAvailable() + return executable("slimrb") +endfunction + +function! s:SlimrbVersion() + if !exists('s:slimrb_version') + let s:slimrb_version = syntastic#util#parseVersion('slimrb --version 2>' . syntastic#util#DevNull()) + end + return s:slimrb_version +endfunction + +function! SyntaxCheckers_slim_slimrb_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'slimrb', + \ 'args': '-c', + \ 'filetype': 'slim', + \ 'subchecker': 'slimrb' }) + + if syntastic#util#versionIsAtLeast(s:SlimrbVersion(), [1,3,1]) + let errorformat = + \ '%C\ %#%f\, Line %l\, Column %c,'. + \ '%-G\ %.%#,'. + \ '%ESlim::Parser::SyntaxError: %m,'. + \ '%+C%.%#' + else + let errorformat = + \ '%C\ %#%f\, Line %l,'. + \ '%-G\ %.%#,'. + \ '%ESlim::Parser::SyntaxError: %m,'. + \ '%+C%.%#' + endif + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'slim', + \ 'name': 'slimrb'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/tcl/nagelfar.vim b/sources_non_forked/syntastic/syntax_checkers/tcl/nagelfar.vim new file mode 100644 index 00000000..b93b17b9 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/tcl/nagelfar.vim @@ -0,0 +1,42 @@ +"============================================================================ +"File: nagelfar.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: James Pickard +"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. +"Notes: Requires nagelfar v1.1.12 or later with support for -H option. +" See nagelfar homepage http://nagelfar.berlios.de/. +" +"============================================================================ +if exists("g:loaded_syntastic_tcl_nagelfar_checker") + finish +endif +let g:loaded_syntastic_tcl_nagelfar_checker=1 + +function! SyntaxCheckers_tcl_nagelfar_IsAvailable() + return executable('nagelfar') +endfunction + +function! SyntaxCheckers_tcl_nagelfar_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'nagelfar', + \ 'args': '-H ' . g:syntastic_tcl_nagelfar_conf, + \ 'filetype': 'tcl', + \ 'subchecker': 'nagelfar' }) + + let errorformat = + \ '%I%f: %l: N %m,'. + \ '%f: %l: %t %m,'. + \ '%-GChecking file %f' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'tcl', + \ 'name': 'nagelfar'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/tex/chktex.vim b/sources_non_forked/syntastic/syntax_checkers/tex/chktex.vim new file mode 100644 index 00000000..d7a55e0f --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/tex/chktex.vim @@ -0,0 +1,62 @@ +"============================================================================ +"File: chktex.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: LCD 47 +"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. +" +"============================================================================ +" +" 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 +endif +let g:loaded_syntastic_tex_chktex_checker = 1 + +if !exists('g:syntastic_tex_chktex_showmsgs') + let g:syntastic_tex_chktex_showmsgs = 1 +endif + +function! SyntaxCheckers_tex_chktex_IsAvailable() + return executable("chktex") +endfunction + +function! SyntaxCheckers_tex_chktex_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'chktex', + \ 'post_args': '-q -v1', + \ 'filetype': 'tex', + \ 'subchecker': 'chktex' }) + + let errorformat = + \ '%EError\ %\\d%\\+\ in\ %f\ line\ %l:\ %m,' . + \ '%WWarning\ %\\d%\\+\ in\ %f\ line\ %l:\ %m,' . + \ (g:syntastic_tex_chktex_showmsgs ? '%WMessage\ %\\d%\\+\ in\ %f\ line %l:\ %m,' : '') . + \ '%+Z%p^,' . + \ '%-G%.%#' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'subtype': 'Style', + \ 'postprocess': ['sort'] }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'tex', + \ 'name': 'chktex'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/tex/lacheck.vim b/sources_non_forked/syntastic/syntax_checkers/tex/lacheck.vim new file mode 100644 index 00000000..38510e85 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/tex/lacheck.vim @@ -0,0 +1,37 @@ +"============================================================================ +"File: tex.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Martin Grenfell +"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_tex_lacheck_checker") + finish +endif +let g:loaded_syntastic_tex_lacheck_checker=1 + +function! SyntaxCheckers_tex_lacheck_IsAvailable() + return executable("lacheck") +endfunction + +function! SyntaxCheckers_tex_lacheck_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'lacheck', + \ 'filetype': 'tex', + \ 'subchecker': 'lacheck' }) + + let errorformat = '%-G** %f:,%E"%f"\, line %l: %m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'tex', + \ 'name': 'lacheck'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/text/atdtool.vim b/sources_non_forked/syntastic/syntax_checkers/text/atdtool.vim new file mode 100644 index 00000000..9f5061b8 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/text/atdtool.vim @@ -0,0 +1,57 @@ +"============================================================================ +"File: atdtool.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: LCD 47 +"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_atdtool_checker") + finish +endif +let g:loaded_syntastic_text_atdtool_checker = 1 + +function! SyntaxCheckers_text_atdtool_IsAvailable() + return executable('atdtool') +endfunction + +function! SyntaxCheckers_text_atdtool_GetHighlightRegex(item) + let term = matchstr(a:item['text'], '\m "\zs[^"]\+\ze"\($\| | suggestions:\)') + if term != '' + let col = get(a:item, 'col', 0) + let term = (col != 0 ? '\%' . col . 'c' : '') . '\V' . term + endif + return term +endfunction + +function! SyntaxCheckers_text_atdtool_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'atdtool', + \ 'tail': '2>' . syntastic#util#DevNull(), + \ 'filetype': 'text', + \ 'subchecker': 'atdtool' }) + + let errorformat = + \ '%W%f:%l:%c: %m,'. + \ '%+C suggestions:%.%#' + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'returns': [0], + \ 'subtype': 'Style' }) + + for n in range(len(loclist)) + let loclist[n]['text'] = substitute(loclist[n]['text'], '\n\s\+', ' | ', 'g') + endfor + + return loclist +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'text', + \ 'name': 'atdtool'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/twig/twiglint.vim b/sources_non_forked/syntastic/syntax_checkers/twig/twiglint.vim new file mode 100644 index 00000000..7cbba5f4 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/twig/twiglint.vim @@ -0,0 +1,43 @@ +"============================================================================ +"File: twig.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Alexander +"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_twig_twiglint_checker") + finish +endif +let g:loaded_syntastic_twig_twiglint_checker=1 + +function! SyntaxCheckers_twig_twiglint_GetHighlightRegex(item) + " Let's match the full line for now + return '\V' +endfunction + +function! SyntaxCheckers_twig_twiglint_IsAvailable() + return executable('twig-lint') +endfunction + +function! SyntaxCheckers_twig_twiglint_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'twig-lint', + \ 'args': 'lint --format=csv', + \ 'filetype': 'twig', + \ 'subchecker': 'twiglint' }) + + let errorformat = '"%f"\,%l\,%m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat}) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'twig', + \ 'name': 'twiglint'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/typescript/tsc.vim b/sources_non_forked/syntastic/syntax_checkers/typescript/tsc.vim new file mode 100644 index 00000000..78469822 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/typescript/tsc.vim @@ -0,0 +1,33 @@ +"============================================================================ +"File: typescript.vim +"Description: TypeScript syntax checker. For TypeScript v0.8.0 +"Maintainer: Bill Casarin +"============================================================================ + +if exists("g:loaded_syntastic_typescript_tsc_checker") + finish +endif +let g:loaded_syntastic_typescript_tsc_checker=1 + +function! SyntaxCheckers_typescript_tsc_IsAvailable() + return executable("tsc") +endfunction + + +function! SyntaxCheckers_typescript_tsc_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'tsc', + \ 'post_args': '--out ' . syntastic#util#DevNull(), + \ 'filetype': 'typescript', + \ 'subchecker': 'tsc' }) + + let errorformat = '%f %#(%l\,%c): %m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'typescript', + \ 'name': 'tsc'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/vala/valac.vim b/sources_non_forked/syntastic/syntax_checkers/vala/valac.vim new file mode 100644 index 00000000..09b6c28b --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/vala/valac.vim @@ -0,0 +1,74 @@ +"============================================================================ +"File: vala.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Konstantin Stepanov (me@kstep.me) +"Notes: Add special comment line into your vala file starting with +" "// modules: " and containing space delimited list of vala +" modules, used by the file, so this script can build correct +" --pkg arguments. +" Alternatively you can set g:syntastic_vala_modules array +" in your .vimrc or .lvimrc with localvimrc plugin +" (http://www.vim.org/scripts/script.php?script_id=441). +" Valac compiler is not the fastest thing in the world, so you +" may want to disable this plugin with +" let g:syntastic_vala_check_disabled = 1 command in your .vimrc or +" command line. Unlet this variable to set it to 0 to reenable +" this checker. +"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_vala_valac_checker") + finish +endif +let g:loaded_syntastic_vala_valac_checker = 1 + +function! SyntaxCheckers_vala_valac_IsAvailable() + return executable('valac') +endfunction + +function! SyntaxCheckers_vala_valac_GetHighlightRegex(pos) + let strlength = strlen(matchstr(a:pos['text'], '\^\+$')) + return '\%>'.(a:pos.col-1).'c.*\%<'.(a:pos.col+strlength+1).'c' +endfunction + +function! s:GetValaModules() + if exists('g:syntastic_vala_modules') + if type(g:syntastic_vala_modules) == type('') + return split(g:syntastic_vala_modules, '\s\+') + elseif type(g:syntastic_vala_modules) == type([]) + return copy(g:syntastic_vala_modules) + else + echoerr 'g:syntastic_vala_modules must be either list or string: fallback to in file modules string' + endif + endif + + let modules_line = search('^// modules: ', 'n') + let modules_str = getline(modules_line) + return split(strpart(modules_str, 12), '\s\+') +endfunction + +function! SyntaxCheckers_vala_valac_GetLocList() + let vala_pkg_args = join(map(s:GetValaModules(), '"--pkg ".v:val'), ' ') + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'valac', + \ 'args': '-C ' . vala_pkg_args, + \ 'filetype': 'vala', + \ 'subchecker': 'valac' }) + let errorformat = + \ '%A%f:%l.%c-%\d%\+.%\d%\+: %t%[a-z]%\+: %m,'. + \ '%C%m,'. + \ '%Z%m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'vala', + \ 'name': 'valac'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/vhdl/ghdl.vim b/sources_non_forked/syntastic/syntax_checkers/vhdl/ghdl.vim new file mode 100644 index 00000000..7158cd78 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/vhdl/ghdl.vim @@ -0,0 +1,37 @@ +"============================================================================ +"File: ghdl.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Jan Wagner +"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_vhdl_ghdl_checker") + finish +endif +let g:loaded_syntastic_vhdl_ghdl_checker = 1 + +function! SyntaxCheckers_vhdl_ghdl_IsAvailable() + return executable("ghdl") +endfunction + +function! SyntaxCheckers_vhdl_ghdl_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'ghdl', + \ 'args': '-s', + \ 'filetype': 'vhdl', + \ 'subchecker': 'ghdl' }) + + let errorformat = '%f:%l:%c: %m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'vhdl', + \ 'name': 'ghdl'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/xhtml/tidy.vim b/sources_non_forked/syntastic/syntax_checkers/xhtml/tidy.vim new file mode 100644 index 00000000..e0c22fbb --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/xhtml/tidy.vim @@ -0,0 +1,89 @@ +"============================================================================ +"File: xhtml.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Martin Grenfell +"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. +" +"============================================================================ +" +" Checker option: +" +" - g:syntastic_xhtml_tidy_ignore_errors (list; default: []) +" list of errors to ignore + +if exists("g:loaded_syntastic_xhtml_tidy_checker") + finish +endif +let g:loaded_syntastic_xhtml_tidy_checker=1 + +if !exists('g:syntastic_xhtml_tidy_ignore_errors') + let g:syntastic_xhtml_tidy_ignore_errors = [] +endif + +function! SyntaxCheckers_xhtml_tidy_IsAvailable() + return executable("tidy") +endfunction + +" TODO: join this with html.vim 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', + \'cp932' : '-shiftjis', + \'sjis' : '-shiftjis', + \'cp850' : '-ibm858', + \} + return get(tidy_opts, &fileencoding, '-utf8') +endfunction + +function! s:IgnoreError(text) + for i in g:syntastic_xhtml_tidy_ignore_errors + if stridx(a:text, i) != -1 + return 1 + endif + endfor + return 0 +endfunction + +function! SyntaxCheckers_xhtml_tidy_GetLocList() + let encopt = s:TidyEncOptByFenc() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'tidy', + \ 'args': encopt . ' -xml -e', + \ 'filetype': 'xhtml', + \ 'subchecker': 'tidy' }) + + let errorformat= + \ '%Wline %l column %v - Warning: %m,' . + \ '%Eline %l column %v - Error: %m,' . + \ '%-G%.%#' + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'defaults': {'bufnr': bufnr("")}, + \ 'returns': [0, 1, 2] }) + + for n in range(len(loclist)) + if loclist[n]['valid'] && s:IgnoreError(loclist[n]['text']) == 1 + let loclist[n]['valid'] = 0 + endif + endfor + + return loclist +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'xhtml', + \ 'name': 'tidy'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/xml/xmllint.vim b/sources_non_forked/syntastic/syntax_checkers/xml/xmllint.vim new file mode 100644 index 00000000..5a6e1db7 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/xml/xmllint.vim @@ -0,0 +1,52 @@ +"============================================================================ +"File: xml.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Sebastian Kusnier +"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_xml_xmllint_checker") + finish +endif +let g:loaded_syntastic_xml_xmllint_checker=1 + +" You can use a local installation of DTDs to significantly speed up validation +" and allow you to validate XML data without network access, see xmlcatalog(1) +" and http://www.xmlsoft.org/catalog.html for more information. + +function! SyntaxCheckers_xml_xmllint_IsAvailable() + return executable('xmllint') +endfunction + +function! SyntaxCheckers_xml_xmllint_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'xmllint', + \ 'args': '--xinclude --noout --postvalid', + \ 'filetype': 'xml', + \ 'subchecker': 'xmllint' }) + + let errorformat= + \ '%E%f:%l: error : %m,' . + \ '%-G%f:%l: validity error : Validation failed: no DTD found %m,' . + \ '%W%f:%l: warning : %m,' . + \ '%W%f:%l: validity warning : %m,' . + \ '%E%f:%l: validity error : %m,' . + \ '%E%f:%l: parser error : %m,' . + \ '%E%f:%l: %m,' . + \ '%-Z%p^,' . + \ '%-G%.%#' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'returns': [0, 1, 2, 3, 4, 5] }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'xml', + \ 'name': 'xmllint'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/xslt/xmllint.vim b/sources_non_forked/syntastic/syntax_checkers/xslt/xmllint.vim new file mode 100644 index 00000000..db397ed8 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/xslt/xmllint.vim @@ -0,0 +1,30 @@ +"============================================================================ +"File: xslt.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Sebastian Kusnier +"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_xslt_xmllint_checker") + finish +endif +let g:loaded_syntastic_xslt_xmllint_checker=1 + +function! SyntaxCheckers_xslt_xmllint_IsAvailable() + return SyntaxCheckers_xml_xmllint_IsAvailable() +endfunction + +function! SyntaxCheckers_xslt_xmllint_GetLocList() + return SyntaxCheckers_xml_xmllint_GetLocList() +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'xslt', + \ 'name': 'xmllint'}) + +runtime! syntax_checkers/xml/*.vim diff --git a/sources_non_forked/syntastic/syntax_checkers/yaml/jsyaml.vim b/sources_non_forked/syntastic/syntax_checkers/yaml/jsyaml.vim new file mode 100644 index 00000000..9ffdc658 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/yaml/jsyaml.vim @@ -0,0 +1,42 @@ +"============================================================================ +"File: yaml.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Martin Grenfell +"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. +" +" +"Installation: $ npm install -g js-yaml +" +"============================================================================ + +if exists("g:loaded_syntastic_yaml_jsyaml_checker") + finish +endif +let g:loaded_syntastic_yaml_jsyaml_checker=1 + +function! SyntaxCheckers_yaml_jsyaml_IsAvailable() + return executable("js-yaml") +endfunction + +function! SyntaxCheckers_yaml_jsyaml_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'js-yaml', + \ 'args': '--compact', + \ 'filetype': 'yaml', + \ 'subchecker': 'jsyaml' }) + + let errorformat='Error on line %l\, col %c:%m,%-G%.%#' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'defaults': {'bufnr': bufnr("")} }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'yaml', + \ 'name': 'jsyaml'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/z80/z80syntaxchecker.vim b/sources_non_forked/syntastic/syntax_checkers/z80/z80syntaxchecker.vim new file mode 100644 index 00000000..b68acf13 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/z80/z80syntaxchecker.vim @@ -0,0 +1,41 @@ +"============================================================================ +"File: z80.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Romain Giot +"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_z80_z80syntaxchecker_checker") + finish +endif +let g:loaded_syntastic_z80_z80syntaxchecker_checker=1 + +"bail if the user doesnt have z80_syntax_checker.py installed +"To obtain this application there are two solutions: +" - Install this python package: https://github.com/rgiot/pycpcdemotools +" - Copy/paste this script in your search path: https://raw.github.com/rgiot/pycpcdemotools/master/cpcdemotools/source_checker/z80_syntax_checker.py +function! SyntaxCheckers_z80_z80syntaxchecker_IsAvailable() + return executable("z80_syntax_checker.py") +endfunction + +function! SyntaxCheckers_z80_z80syntaxchecker_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'z80_syntax_checker.py', + \ 'filetype': 'z80', + \ 'subchecker': 'z80syntaxchecker' }) + + let errorformat = '%f:%l %m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'z80', + \ 'name': 'z80syntaxchecker'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/zpt/zptlint.vim b/sources_non_forked/syntastic/syntax_checkers/zpt/zptlint.vim new file mode 100644 index 00000000..ae6ab8a3 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/zpt/zptlint.vim @@ -0,0 +1,50 @@ +"============================================================================ +"File: zpt.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: claytron +"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_zpt_zptlint_checker") + finish +endif +let g:loaded_syntastic_zpt_zptlint_checker=1 + +" In order for this plugin to be useful, you will need to set up the +" zpt filetype in your vimrc +" +" " set up zope page templates as the zpt filetype +" au BufNewFile,BufRead *.pt,*.cpt,*.zpt set filetype=zpt syntax=xml +" +" Then install the zptlint program, found on pypi: +" http://pypi.python.org/pypi/zptlint + +function! SyntaxCheckers_zpt_zptlint_IsAvailable() + return executable("zptlint") +endfunction + +function! SyntaxCheckers_zpt_zptlint_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'zptlint', + \ 'filetype': 'zpt', + \ 'subchecker': 'zptlint' }) + + let errorformat= + \ '%-P*** Error in: %f,'. + \ '%Z%*\s\, at line %l\, column %c,'. + \ '%E%*\s%m,'. + \ '%-Q' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'zpt', + \ 'name': 'zptlint'}) diff --git a/sources_non_forked/syntastic/syntax_checkers/zsh/zsh.vim b/sources_non_forked/syntastic/syntax_checkers/zsh/zsh.vim new file mode 100644 index 00000000..5e339a9c --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/zsh/zsh.vim @@ -0,0 +1,38 @@ +"============================================================================ +"File: zsh.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Martin Grenfell +"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_zsh_zsh_checker") + finish +endif +let g:loaded_syntastic_zsh_zsh_checker=1 + +function! SyntaxCheckers_zsh_zsh_IsAvailable() + return executable("zsh") +endfunction + +function! SyntaxCheckers_zsh_zsh_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'zsh', + \ 'args': '-n', + \ 'filetype': 'zsh', + \ 'subchecker': 'zsh' }) + + let errorformat = '%f:%l: %m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat}) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'zsh', + \ 'name': 'zsh'}) diff --git a/sources_non_forked/vim-easymotion/.gitignore b/sources_non_forked/vim-easymotion/.gitignore new file mode 100644 index 00000000..926ccaaf --- /dev/null +++ b/sources_non_forked/vim-easymotion/.gitignore @@ -0,0 +1 @@ +doc/tags diff --git a/sources_non_forked/vim-easymotion/README.md b/sources_non_forked/vim-easymotion/README.md new file mode 100644 index 00000000..7c0caf9d --- /dev/null +++ b/sources_non_forked/vim-easymotion/README.md @@ -0,0 +1,52 @@ +# Introduction + +EasyMotion provides a much simpler way to use some motions in vim. It +takes the `` out of `w` or `f{char}` by +highlighting all possible choices and allowing you to press one key to +jump directly to the target. + +When one of the available motions is triggered, all visible text +preceding or following the cursor is faded, and motion targets are +highlighted. + +EasyMotion is triggered by one of the provided mappings. + +# Important notes about the default bindings + +**The default leader has been changed to `` to avoid +conflicts with other plugins you may have installed.** This can easily be +changed back to pre-1.3 behavior by rebinding the leader in your vimrc: + + let g:EasyMotion_leader_key = '' + +All motions are now triggered with `` by default, e.g. +`t`, `gE`. + +## Usage example + +Type `w` to trigger the word motion `w`. When the motion is +triggered, the text is updated (no braces are actually added, the text +is highlighted in red by default): + + Lorem {a}psum {b}olor {c}it {d}met. + +Press `c` to jump to the beginning of the word "sit": + + Lorem ipsum dolor sit amet. + +Similarly, if you're looking for an "o", you can use the `f` motion. +Type `fo`, and all "o" characters are highlighted: + + L{a}rem ipsum d{b}l{c}r sit amet. + +Press `b` to jump to the second "o": + + Lorem ipsum dolor sit amet. + +Jeffrey Way of Nettuts+ has also [written +a tutorial](http://net.tutsplus.com/tutorials/other/vim-essential-plugin-easymotion/) +about EasyMotion. + +## Animated demonstration + +![Animated demonstration](http://oi54.tinypic.com/2yysefm.jpg) diff --git a/sources_non_forked/vim-easymotion/autoload/EasyMotion.vim b/sources_non_forked/vim-easymotion/autoload/EasyMotion.vim new file mode 100644 index 00000000..7c79dd81 --- /dev/null +++ b/sources_non_forked/vim-easymotion/autoload/EasyMotion.vim @@ -0,0 +1,573 @@ +" EasyMotion - Vim motions on speed! +" +" Author: Kim Silkebækken +" Source repository: https://github.com/Lokaltog/vim-easymotion + +" Default configuration functions {{{ + function! EasyMotion#InitOptions(options) " {{{ + for [key, value] in items(a:options) + if ! exists('g:EasyMotion_' . key) + exec 'let g:EasyMotion_' . key . ' = ' . string(value) + endif + endfor + endfunction " }}} + function! EasyMotion#InitHL(group, colors) " {{{ + let group_default = a:group . 'Default' + + " Prepare highlighting variables + let guihl = printf('guibg=%s guifg=%s gui=%s', a:colors.gui[0], a:colors.gui[1], a:colors.gui[2]) + if !exists('g:CSApprox_loaded') + let ctermhl = &t_Co == 256 + \ ? printf('ctermbg=%s ctermfg=%s cterm=%s', a:colors.cterm256[0], a:colors.cterm256[1], a:colors.cterm256[2]) + \ : printf('ctermbg=%s ctermfg=%s cterm=%s', a:colors.cterm[0], a:colors.cterm[1], a:colors.cterm[2]) + else + let ctermhl = '' + endif + + " Create default highlighting group + execute printf('hi default %s %s %s', group_default, guihl, ctermhl) + + " Check if the hl group exists + if hlexists(a:group) + redir => hlstatus | exec 'silent hi ' . a:group | redir END + + " Return if the group isn't cleared + if hlstatus !~ 'cleared' + return + endif + endif + + " No colors are defined for this group, link to defaults + execute printf('hi default link %s %s', a:group, group_default) + endfunction " }}} + function! EasyMotion#InitMappings(motions) "{{{ + for motion in keys(a:motions) + call EasyMotion#InitOptions({ 'mapping_' . motion : g:EasyMotion_leader_key . motion }) + endfor + + if g:EasyMotion_do_mapping + for [motion, fn] in items(a:motions) + if empty(g:EasyMotion_mapping_{motion}) + continue + endif + + silent exec 'nnoremap ' . g:EasyMotion_mapping_{motion} . ' :call EasyMotion#' . fn.name . '(0, ' . fn.dir . ')' + silent exec 'onoremap ' . g:EasyMotion_mapping_{motion} . ' :call EasyMotion#' . fn.name . '(0, ' . fn.dir . ')' + silent exec 'vnoremap ' . g:EasyMotion_mapping_{motion} . ' :call EasyMotion#' . fn.name . '(1, ' . fn.dir . ')' + endfor + endif + endfunction "}}} +" }}} +" Motion functions {{{ + function! EasyMotion#F(visualmode, direction) " {{{ + let char = s:GetSearchChar(a:visualmode) + + if empty(char) + return + endif + + let re = '\C' . escape(char, '.$^~') + + call s:EasyMotion(re, a:direction, a:visualmode ? visualmode() : '', mode(1)) + endfunction " }}} + function! EasyMotion#T(visualmode, direction) " {{{ + let char = s:GetSearchChar(a:visualmode) + + if empty(char) + return + endif + + if a:direction == 1 + let re = '\C' . escape(char, '.$^~') . '\zs.' + else + let re = '\C.' . escape(char, '.$^~') + endif + + call s:EasyMotion(re, a:direction, a:visualmode ? visualmode() : '', mode(1)) + endfunction " }}} + function! EasyMotion#WB(visualmode, direction) " {{{ + call s:EasyMotion('\(\<.\|^$\)', a:direction, a:visualmode ? visualmode() : '', '') + endfunction " }}} + function! EasyMotion#WBW(visualmode, direction) " {{{ + call s:EasyMotion('\(\(^\|\s\)\@<=\S\|^$\)', a:direction, a:visualmode ? visualmode() : '', '') + endfunction " }}} + function! EasyMotion#E(visualmode, direction) " {{{ + call s:EasyMotion('\(.\>\|^$\)', a:direction, a:visualmode ? visualmode() : '', mode(1)) + endfunction " }}} + function! EasyMotion#EW(visualmode, direction) " {{{ + call s:EasyMotion('\(\S\(\s\|$\)\|^$\)', a:direction, a:visualmode ? visualmode() : '', mode(1)) + endfunction " }}} + function! EasyMotion#JK(visualmode, direction) " {{{ + call s:EasyMotion('^\(\w\|\s*\zs\|$\)', a:direction, a:visualmode ? visualmode() : '', '') + endfunction " }}} + function! EasyMotion#Search(visualmode, direction) " {{{ + call s:EasyMotion(@/, a:direction, a:visualmode ? visualmode() : '', '') + endfunction " }}} +" }}} +" Helper functions {{{ + function! s:Message(message) " {{{ + echo 'EasyMotion: ' . a:message + endfunction " }}} + function! s:Prompt(message) " {{{ + echohl Question + echo a:message . ': ' + echohl None + endfunction " }}} + function! s:VarReset(var, ...) " {{{ + if ! exists('s:var_reset') + let s:var_reset = {} + endif + + let buf = bufname("") + + if a:0 == 0 && has_key(s:var_reset, a:var) + " Reset var to original value + call setbufvar(buf, a:var, s:var_reset[a:var]) + elseif a:0 == 1 + let new_value = a:0 == 1 ? a:1 : '' + + " Store original value + let s:var_reset[a:var] = getbufvar(buf, a:var) + + " Set new var value + call setbufvar(buf, a:var, new_value) + endif + endfunction " }}} + function! s:SetLines(lines, key) " {{{ + try + " Try to join changes with previous undo block + undojoin + catch + endtry + + for [line_num, line] in a:lines + call setline(line_num, line[a:key]) + endfor + endfunction " }}} + function! s:GetChar() " {{{ + let char = getchar() + + if char == 27 + " Escape key pressed + redraw + + call s:Message('Cancelled') + + return '' + endif + + return nr2char(char) + endfunction " }}} + function! s:GetSearchChar(visualmode) " {{{ + call s:Prompt('Search for character') + + let char = s:GetChar() + + " Check that we have an input char + if empty(char) + " Restore selection + if ! empty(a:visualmode) + silent exec 'normal! gv' + endif + + return '' + endif + + return char + endfunction " }}} +" }}} +" Grouping algorithms {{{ + let s:grouping_algorithms = { + \ 1: 'SCTree' + \ , 2: 'Original' + \ } + " Single-key/closest target priority tree {{{ + " This algorithm tries to assign one-key jumps to all the targets closest to the cursor. + " It works recursively and will work correctly with as few keys as two. + function! s:GroupingAlgorithmSCTree(targets, keys) + " Prepare variables for working + let targets_len = len(a:targets) + let keys_len = len(a:keys) + + let groups = {} + + let keys = reverse(copy(a:keys)) + + " Semi-recursively count targets {{{ + " We need to know exactly how many child nodes (targets) this branch will have + " in order to pass the correct amount of targets to the recursive function. + + " Prepare sorted target count list {{{ + " This is horrible, I know. But dicts aren't sorted in vim, so we need to + " work around that. That is done by having one sorted list with key counts, + " and a dict which connects the key with the keys_count list. + + let keys_count = [] + let keys_count_keys = {} + + let i = 0 + for key in keys + call add(keys_count, 0) + + let keys_count_keys[key] = i + + let i += 1 + endfor + " }}} + + let targets_left = targets_len + let level = 0 + let i = 0 + + while targets_left > 0 + " Calculate the amount of child nodes based on the current level + let childs_len = (level == 0 ? 1 : (keys_len - 1) ) + + for key in keys + " Add child node count to the keys_count array + let keys_count[keys_count_keys[key]] += childs_len + + " Subtract the child node count + let targets_left -= childs_len + + if targets_left <= 0 + " Subtract the targets left if we added too many too + " many child nodes to the key count + let keys_count[keys_count_keys[key]] += targets_left + + break + endif + + let i += 1 + endfor + + let level += 1 + endwhile + " }}} + " Create group tree {{{ + let i = 0 + let key = 0 + + call reverse(keys_count) + + for key_count in keys_count + if key_count > 1 + " We need to create a subgroup + " Recurse one level deeper + let groups[a:keys[key]] = s:GroupingAlgorithmSCTree(a:targets[i : i + key_count - 1], a:keys) + elseif key_count == 1 + " Assign single target key + let groups[a:keys[key]] = a:targets[i] + else + " No target + continue + endif + + let key += 1 + let i += key_count + endfor + " }}} + + " Finally! + return groups + endfunction + " }}} + " Original {{{ + function! s:GroupingAlgorithmOriginal(targets, keys) + " Split targets into groups (1 level) + let targets_len = len(a:targets) + let keys_len = len(a:keys) + + let groups = {} + + let i = 0 + let root_group = 0 + try + while root_group < targets_len + let groups[a:keys[root_group]] = {} + + for key in a:keys + let groups[a:keys[root_group]][key] = a:targets[i] + + let i += 1 + endfor + + let root_group += 1 + endwhile + catch | endtry + + " Flatten the group array + if len(groups) == 1 + let groups = groups[a:keys[0]] + endif + + return groups + endfunction + " }}} + " Coord/key dictionary creation {{{ + function! s:CreateCoordKeyDict(groups, ...) + " Dict structure: + " 1,2 : a + " 2,3 : b + let sort_list = [] + let coord_keys = {} + let group_key = a:0 == 1 ? a:1 : '' + + for [key, item] in items(a:groups) + let key = ( ! empty(group_key) ? group_key : key) + + if type(item) == 3 + " Destination coords + + " The key needs to be zero-padded in order to + " sort correctly + let dict_key = printf('%05d,%05d', item[0], item[1]) + let coord_keys[dict_key] = key + + " We need a sorting list to loop correctly in + " PromptUser, dicts are unsorted + call add(sort_list, dict_key) + else + " Item is a dict (has children) + let coord_key_dict = s:CreateCoordKeyDict(item, key) + + " Make sure to extend both the sort list and the + " coord key dict + call extend(sort_list, coord_key_dict[0]) + call extend(coord_keys, coord_key_dict[1]) + endif + + unlet item + endfor + + return [sort_list, coord_keys] + endfunction + " }}} +" }}} +" Core functions {{{ + function! s:PromptUser(groups) "{{{ + " If only one possible match, jump directly to it {{{ + let group_values = values(a:groups) + + if len(group_values) == 1 + redraw + + return group_values[0] + endif + " }}} + " Prepare marker lines {{{ + let lines = {} + let hl_coords = [] + let coord_key_dict = s:CreateCoordKeyDict(a:groups) + + for dict_key in sort(coord_key_dict[0]) + let target_key = coord_key_dict[1][dict_key] + let [line_num, col_num] = split(dict_key, ',') + + let line_num = str2nr(line_num) + let col_num = str2nr(col_num) + + " Add original line and marker line + if ! has_key(lines, line_num) + let current_line = getline(line_num) + + let lines[line_num] = { 'orig': current_line, 'marker': current_line, 'mb_compensation': 0 } + endif + + " Compensate for byte difference between marker + " character and target character + " + " This has to be done in order to match the correct + " column; \%c matches the byte column and not display + " column. + let target_char_len = strlen(matchstr(lines[line_num]['marker'], '\%' . col_num . 'c.')) + let target_key_len = strlen(target_key) + + " Solve multibyte issues by matching the byte column + " number instead of the visual column + let col_num -= lines[line_num]['mb_compensation'] + + if strlen(lines[line_num]['marker']) > 0 + " Substitute marker character if line length > 0 + let lines[line_num]['marker'] = substitute(lines[line_num]['marker'], '\%' . col_num . 'c.', target_key, '') + else + " Set the line to the marker character if the line is empty + let lines[line_num]['marker'] = target_key + endif + + " Add highlighting coordinates + call add(hl_coords, '\%' . line_num . 'l\%' . col_num . 'c') + + " Add marker/target lenght difference for multibyte + " compensation + let lines[line_num]['mb_compensation'] += (target_char_len - target_key_len) + endfor + + let lines_items = items(lines) + " }}} + " Highlight targets {{{ + let target_hl_id = matchadd(g:EasyMotion_hl_group_target, join(hl_coords, '\|'), 1) + " }}} + + try + " Set lines with markers + call s:SetLines(lines_items, 'marker') + + redraw + + " Get target character {{{ + call s:Prompt('Target key') + + let char = s:GetChar() + " }}} + finally + " Restore original lines + call s:SetLines(lines_items, 'orig') + + " Un-highlight targets {{{ + if exists('target_hl_id') + call matchdelete(target_hl_id) + endif + " }}} + + redraw + endtry + + " Check if we have an input char {{{ + if empty(char) + throw 'Cancelled' + endif + " }}} + " Check if the input char is valid {{{ + if ! has_key(a:groups, char) + throw 'Invalid target' + endif + " }}} + + let target = a:groups[char] + + if type(target) == 3 + " Return target coordinates + return target + else + " Prompt for new target character + return s:PromptUser(target) + endif + endfunction "}}} + function! s:EasyMotion(regexp, direction, visualmode, mode) " {{{ + let orig_pos = [line('.'), col('.')] + let targets = [] + + try + " Reset properties {{{ + call s:VarReset('&scrolloff', 0) + call s:VarReset('&modified', 0) + call s:VarReset('&modifiable', 1) + call s:VarReset('&readonly', 0) + call s:VarReset('&spell', 0) + call s:VarReset('&virtualedit', '') + " }}} + " Find motion targets {{{ + let search_direction = (a:direction == 1 ? 'b' : '') + let search_stopline = line(a:direction == 1 ? 'w0' : 'w$') + + while 1 + let pos = searchpos(a:regexp, search_direction, search_stopline) + + " Reached end of search range + if pos == [0, 0] + break + endif + + " Skip folded lines + if foldclosed(pos[0]) != -1 + continue + endif + + call add(targets, pos) + endwhile + + let targets_len = len(targets) + if targets_len == 0 + throw 'No matches' + endif + " }}} + + let GroupingFn = function('s:GroupingAlgorithm' . s:grouping_algorithms[g:EasyMotion_grouping]) + let groups = GroupingFn(targets, split(g:EasyMotion_keys, '\zs')) + + " Shade inactive source {{{ + if g:EasyMotion_do_shade + let shade_hl_pos = '\%' . orig_pos[0] . 'l\%'. orig_pos[1] .'c' + + if a:direction == 1 + " Backward + let shade_hl_re = '\%'. line('w0') .'l\_.*' . shade_hl_pos + else + " Forward + let shade_hl_re = shade_hl_pos . '\_.*\%'. line('w$') .'l' + endif + + let shade_hl_id = matchadd(g:EasyMotion_hl_group_shade, shade_hl_re, 0) + endif + " }}} + + " Prompt user for target group/character + let coords = s:PromptUser(groups) + + " Update selection {{{ + if ! empty(a:visualmode) + keepjumps call cursor(orig_pos[0], orig_pos[1]) + + exec 'normal! ' . a:visualmode + endif + " }}} + " Handle operator-pending mode {{{ + if a:mode == 'no' + " This mode requires that we eat one more + " character to the right if we're using + " a forward motion + if a:direction != 1 + let coords[1] += 1 + endif + endif + " }}} + + " Update cursor position + call cursor(orig_pos[0], orig_pos[1]) + mark ' + call cursor(coords[0], coords[1]) + + call s:Message('Jumping to [' . coords[0] . ', ' . coords[1] . ']') + catch + redraw + + " Show exception message + call s:Message(v:exception) + + " Restore original cursor position/selection {{{ + if ! empty(a:visualmode) + silent exec 'normal! gv' + else + keepjumps call cursor(orig_pos[0], orig_pos[1]) + endif + " }}} + finally + " Restore properties {{{ + call s:VarReset('&scrolloff') + call s:VarReset('&modified') + call s:VarReset('&modifiable') + call s:VarReset('&readonly') + call s:VarReset('&spell') + call s:VarReset('&virtualedit') + " }}} + " Remove shading {{{ + if g:EasyMotion_do_shade && exists('shade_hl_id') + call matchdelete(shade_hl_id) + endif + " }}} + endtry + endfunction " }}} +" }}} + +" vim: fdm=marker:noet:ts=4:sw=4:sts=4 diff --git a/sources_non_forked/vim-easymotion/doc/easymotion.txt b/sources_non_forked/vim-easymotion/doc/easymotion.txt new file mode 100644 index 00000000..c91a9595 --- /dev/null +++ b/sources_non_forked/vim-easymotion/doc/easymotion.txt @@ -0,0 +1,319 @@ +*easymotion.txt* Version 1.3. Last change: 2011 Nov 7 + + + ______ __ ___ __ _ + / ____/____ ________ __/ |/ /____ / /_(_)____ ____ + / __/ / __ `/ ___/ / / / /|_/ // __ \/ __/ // __ \/ __ \ + / /___ / /_/ (__ ) /_/ / / / // /_/ / /_/ // /_/ / / / / + /_____/ \__,_/____/\__, /_/ /_/ \____/\__/_/ \____/_/ /_/ + /____/ + - Vim motions on speed! + + +============================================================================== +CONTENTS *easymotion-contents* + + 1. Introduction ....................... |easymotion-introduction| + 2. Usage .............................. |easymotion-usage| + 2.1 Default mappings ............... |easymotion-default-mappings| + 3. Requirements ....................... |easymotion-requirements| + 4. Configuration ...................... |easymotion-configuration| + 4.1 EasyMotion_keys ................ |EasyMotion_keys| + 4.2 EasyMotion_do_shade ............ |EasyMotion_do_shade| + 4.3 EasyMotion_do_mapping .......... |EasyMotion_do_mapping| + 4.4 EasyMotion_grouping ............ |EasyMotion_grouping| + 4.5 Custom highlighting ............ |easymotion-custom-hl| + 4.6 Custom mappings ................ |easymotion-custom-mappings| + 4.6.1 Leader key ............... |easymotion-leader-key| + 4.6.2 Custom keys .............. |easymotion-custom-keys| + 5. License ............................ |easymotion-license| + 6. Known bugs ......................... |easymotion-known-bugs| + 7. Contributing ....................... |easymotion-contributing| + 8. Credits ............................ |easymotion-credits| + +============================================================================== +1. Introduction *easymotion* *easymotion-introduction* + +EasyMotion provides a much simpler way to use some motions in vim. It takes +the out of w or f{char} by highlighting all possible +choices and allowing you to press one key to jump directly to the target. + +When one of the available motions is triggered, all visible text preceding or +following the cursor is faded, and motion targets are highlighted. + +============================================================================== +2. Usage *easymotion-usage* + +EasyMotion is triggered by one of the provided mappings (see +|easymotion-default-mappings| for details). + +Example: > + + Lorem ipsum dolor sit amet. + +Type w to trigger the word motion |w|. See +|easymotion-leader-key| for details about the leader key. When the +motion is triggered, the text is updated (no braces are actually added, +the text is highlighted in red by default): > + + Lorem {a}psum {b}olor {c}it {d}met. + +Press "c" to jump to the beginning of the word "sit": > + + Lorem ipsum dolor sit amet. + +Similarly, if you're looking for an "o", you can use the |f| motion. +Type fo, and all "o" characters are highlighted: > + + L{a}rem ipsum d{b}l{c}r sit amet. + +Press "b" to jump to the second "o": > + + Lorem ipsum dolor sit amet. + +And that's it! + +------------------------------------------------------------------------------ +2.1 Default mappings *easymotion-default-mappings* + +The default configuration defines the following mappings in normal, +visual and operator-pending mode: + + Mapping | Details + ------------------|---------------------------------------------- + f{char} | Find {char} to the right. See |f|. + F{char} | Find {char} to the left. See |F|. + t{char} | Till before the {char} to the right. See |t|. + T{char} | Till after the {char} to the left. See |T|. + w | Beginning of word forward. See |w|. + W | Beginning of WORD forward. See |W|. + b | Beginning of word backward. See |b|. + B | Beginning of WORD backward. See |B|. + e | End of word forward. See |e|. + E | End of WORD forward. See |E|. + ge | End of word backward. See |ge|. + gE | End of WORD backward. See |gE|. + j | Line downward. See |j|. + k | Line upward. See |k|. + n | Jump to latest "/" or "?" forward. See |n|. + N | Jump to latest "/" or "?" backward. See |N|. + +See |easymotion-leader-key| and |mapleader| for details about the leader key. +See |easymotion-custom-mappings| for customizing the default mappings. + +============================================================================== +3. Requirements *easymotion-requirements* + +EasyMotion has been developed and tested in vim 7.3, but it should run without +any problems in vim 7.2. + +Vi-compatible mode must be disabled. + +============================================================================== +4. Configuration *easymotion-configuration* + +EasyMotion will work fine without any configuration, but you can override the +default behavior by setting configuration variables globally in your |vimrc| +file. + +Example (this will change the target keys and disable shading): > + + let g:EasyMotion_keys = '1234567890' + let g:EasyMotion_do_shade = 0 + +------------------------------------------------------------------------------ +4.1 EasyMotion_keys *EasyMotion_keys* + +Set the keys which will be used for motion targets. Add as many keys as you +want. There's a lower chance that the motion targets will be grouped if many +keys are available. + +Default: 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' + +------------------------------------------------------------------------------ +4.2 EasyMotion_do_shade *EasyMotion_do_shade* + +The default behavior is to shade the text following the cursor (forward +motions) or preceding the cursor (backward motions) to make the motion targets +more visible. Set this option to 0 if you want to disable text shading. + +Default: 1 + +------------------------------------------------------------------------------ +4.3 EasyMotion_do_mapping *EasyMotion_do_mapping* + +Set this option to 0 if you want to disable the default mappings. See +|easymotion-default-mappings| for details about the default mappings. + +Note: If you disable this option, you'll have to map the motions yourself. See +the plugin source code for mapping details. You usually shouldn't need to do +this, see |easymotion-custom-mappings| for customizing the default mappings. + +Default: 1 + +------------------------------------------------------------------------------ +4.4 EasyMotion_grouping *EasyMotion_grouping* + +When there are too many possible targets on the screen, the results have to be +grouped. This configuration option lets you change which grouping algorithm +you want to use. There are two grouping algorithms available: + + * Single-key priority (value: 1) + ------------------- + + This algorithm prioritizes single-key jumps for the targets closest to + the cursor and only groups the last jump targets to maximize the amount + of single-key jumps. + + This algorithm works recursively and will work with as few keys as two. + + Example (with |EasyMotion_keys| = "abcdef"): > + + x x x x x x x x x +< + The |w| motion is triggered: > + + a b c d e f f f f + ^ ^ ^ ^ ^ Direct jump to target + ^ ^ ^ ^ Enter group "f" +< + * Original (value: 2) + -------- + + This is the original algorithm which always groups all targets if there + are too many possible motion targets. + + Example (with |EasyMotion_keys| = "abcdef"): > + + x x x x x x x x x +< + The |w| motion is triggered: > + + a a a a a a b b b + ^ ^ ^ ^ ^ ^ Enter group "a" + ^ ^ ^ Enter group "b" + +Default: 1 + +------------------------------------------------------------------------------ +4.5 Custom highlighting *easymotion-custom-hl* + +The default EasyMotion configuration uses two highlighting groups that link +to groups with default values. The highlighting groups are: + + * EasyMotionTarget + + Highlights motion targets, the default value is bold red + + * EasyMotionShade + + Highlights shaded text, the default value is dark gray + +There are two ways to override the default colors: + + 1) Set the highlighting in your color scheme + + This will only affect a single color scheme. The default red/gray colors + will be used if you change the color scheme to one that doesn't assign + any EasyMotion colors. + + Example: > + + hi EasyMotionTarget ctermbg=none ctermfg=green + hi EasyMotionShade ctermbg=none ctermfg=blue +< + 2) Set the highlighting in your vimrc + + This is ideal if you want to link the colors to highlighting groups that + are available in almost every color scheme, e.g. |ErrorMsg| (usually + bright red) and Comment (usually faded). You can be sure that the + color scheme's colors will be used instead of the default red/gray + if you choose this option. + + Example: > + + hi link EasyMotionTarget ErrorMsg + hi link EasyMotionShade Comment +< +------------------------------------------------------------------------------ +4.6 Custom mappings *easymotion-custom-mappings* + +EasyMotion allows you to customize all default mappings to avoid conflicts +with existing mappings. It is possible to change the default leader key +of all mappings to another key or sequence. It is also possible to fine +tune the plugin to your need by changing every single sequence. + +4.6.1 Leader key *EasyMotion_leader_key* *easymotion-leader-key* + +The default leader key can be changed with the configuration option +|EasyMotion_leader_key|. + +Set this option to the key sequence to use as the prefix of the mappings +described in |easymotion-default-mappings|. + +Note: The default leader key has been changed to '' to +avoid conflicts with other plugins. You can revert to the original +leader by setting this option in your vimrc: > + + let g:EasyMotion_leader_key = '' +< +Default: '' + +4.6.2 Custom Keys *easymotion-custom-keys* + +All custom mappings follow the same variable format: > + + EasyMotion_mapping_{motion} = {mapping} +< +Example: > + + let g:EasyMotion_mapping_f = '_f' + let g:EasyMotion_mapping_T = '' +< +See |easymotion-default-mappings| for a table of motions that can be mapped +and their default values. + +Note: The leader key defined by |EasyMotion_leader_key| is not prepended to +your customized mappings! You have to provide full key sequences when setting +these options. + +============================================================================== +5. License *easymotion-license* + +Creative Commons Attribution-ShareAlike 3.0 Unported + +http://creativecommons.org/licenses/by-sa/3.0/ + +============================================================================== +6. Known bugs *easymotion-known-bugs* + +None. + +============================================================================== +7. Contributing *easymotion-contributing* + +If you experience any bugs or have feature requests, please open an issue on +GitHub. Fork the source repository on GitHub and send a pull request if you +have any code improvements. + +Author: Kim Silkebækken +Source repository: https://github.com/Lokaltog/vim-easymotion + +============================================================================== +8. Credits *easymotion-credits* + +- Ben Boeckel: ge and WORD motions +- Drew Neil: operator-pending mappings +- Rob O'Dwyer: customizable mappings without giving up all defaults +- Michel D'Hooge: customizable leader +- Maxime Bourget: search motion, improved JK motion behavior +- Kearn Holliday: fix jumplist issues +- Shougo Matsushita: fix CSApprox issue + +EasyMotion is based on Bartlomiej Podolak's great PreciseJump script, which +can be downloaded here: + +http://www.vim.org/scripts/script.php?script_id=3437 + +============================================================================== +vim:tw=78:sw=4:ts=8:ft=help:norl: diff --git a/sources_non_forked/vim-easymotion/plugin/EasyMotion.vim b/sources_non_forked/vim-easymotion/plugin/EasyMotion.vim new file mode 100644 index 00000000..fff29dca --- /dev/null +++ b/sources_non_forked/vim-easymotion/plugin/EasyMotion.vim @@ -0,0 +1,73 @@ +" EasyMotion - Vim motions on speed! +" +" Author: Kim Silkebækken +" Source repository: https://github.com/Lokaltog/vim-easymotion + +" Script initialization {{{ + if exists('g:EasyMotion_loaded') || &compatible || version < 702 + finish + endif + + let g:EasyMotion_loaded = 1 +" }}} +" Default configuration {{{ + " Default options {{{ + call EasyMotion#InitOptions({ + \ 'leader_key' : '' + \ , 'keys' : 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' + \ , 'do_shade' : 1 + \ , 'do_mapping' : 1 + \ , 'grouping' : 1 + \ + \ , 'hl_group_target' : 'EasyMotionTarget' + \ , 'hl_group_shade' : 'EasyMotionShade' + \ }) + " }}} + " Default highlighting {{{ + let s:target_hl_defaults = { + \ 'gui' : ['NONE', '#ff0000' , 'bold'] + \ , 'cterm256': ['NONE', '196' , 'bold'] + \ , 'cterm' : ['NONE', 'red' , 'bold'] + \ } + + let s:shade_hl_defaults = { + \ 'gui' : ['NONE', '#777777' , 'NONE'] + \ , 'cterm256': ['NONE', '242' , 'NONE'] + \ , 'cterm' : ['NONE', 'grey' , 'NONE'] + \ } + + call EasyMotion#InitHL(g:EasyMotion_hl_group_target, s:target_hl_defaults) + call EasyMotion#InitHL(g:EasyMotion_hl_group_shade, s:shade_hl_defaults) + + " Reset highlighting after loading a new color scheme {{{ + augroup EasyMotionInitHL + autocmd! + + autocmd ColorScheme * call EasyMotion#InitHL(g:EasyMotion_hl_group_target, s:target_hl_defaults) + autocmd ColorScheme * call EasyMotion#InitHL(g:EasyMotion_hl_group_shade, s:shade_hl_defaults) + augroup end + " }}} + " }}} + " Default key mapping {{{ + call EasyMotion#InitMappings({ + \ 'f' : { 'name': 'F' , 'dir': 0 } + \ , 'F' : { 'name': 'F' , 'dir': 1 } + \ , 't' : { 'name': 'T' , 'dir': 0 } + \ , 'T' : { 'name': 'T' , 'dir': 1 } + \ , 'w' : { 'name': 'WB' , 'dir': 0 } + \ , 'W' : { 'name': 'WBW', 'dir': 0 } + \ , 'b' : { 'name': 'WB' , 'dir': 1 } + \ , 'B' : { 'name': 'WBW', 'dir': 1 } + \ , 'e' : { 'name': 'E' , 'dir': 0 } + \ , 'E' : { 'name': 'EW' , 'dir': 0 } + \ , 'ge': { 'name': 'E' , 'dir': 1 } + \ , 'gE': { 'name': 'EW' , 'dir': 1 } + \ , 'j' : { 'name': 'JK' , 'dir': 0 } + \ , 'k' : { 'name': 'JK' , 'dir': 1 } + \ , 'n' : { 'name': 'Search' , 'dir': 0 } + \ , 'N' : { 'name': 'Search' , 'dir': 1 } + \ }) + " }}} +" }}} + +" vim: fdm=marker:noet:ts=4:sw=4:sts=4 diff --git a/sources_non_forked/vim-indent-object/doc/indent-object.txt b/sources_non_forked/vim-indent-object/doc/indent-object.txt index bcb02299..5b581020 100644 --- a/sources_non_forked/vim-indent-object/doc/indent-object.txt +++ b/sources_non_forked/vim-indent-object/doc/indent-object.txt @@ -1,120 +1,120 @@ -*indent-object.txt* Text objects based on indent levels. - - Copyright (c) 2010 Michael Smith - -Indent Text Objects - -INTRODUCTION |idntobj-introduction| -TEXT OBJECTS |idntobj-objects| -BLANK LINES |idntobj-blanklines| -ABOUT |idntobj-about| - - -============================================================================== -INTRODUCTION *idntobj-introduction* - -Vim text objects provide a convenient way to select and operate on various -types of objects. These objects include regions surrounded by various types of -brackets and various parts of language (ie sentences, paragraphs, etc). - -This plugin defines a new text object, based on indentation levels. This is -very useful in languages such as Python, in which the syntax defines scope in -terms of indentation. Using the objects defined in this plugin, an entire if -structure can be quickly selected, for example. - - -============================================================================== -TEXT OBJECTS *ai* *ii* *aI* *iI* *idntobj-objects* - -This plugin defines two new text objects. These are very similar - they differ -only in whether they include the line below the block or not. - - Key Mapping Description ~ -> - ai (A)n (I)ndentation level and line above. - ii (I)nner (I)ndentation level (no line above). - aI (A)n (I)ndentation level and lines above/below. - iI (I)nner (I)ndentation level (no lines above/below). -< - -Note that the iI mapping is mostly included simply for completeness, it is -effectively a synonym for ii. - -Just like regular text objects, these mappings can be used either with -operators expecting a motion, such as 'd' or 'c', as well as in visual mode. -In visual mode the mapping can be repeated, which has the effect of -iteratively increasing the scope of indentation block selected. Specifying a -count can be used to achieve the same effect. - -The difference between |ai| and |aI| is that |ai| includes the line -immediately above the indentation block, whereas aI includes not only that, -but also the line below. Which of these is most useful largely depends on the -structure of the language being edited. - -For example, when editing the Python code, |ai| is generally more useful, as -the line above the indentation block is usually related to it. For example, in -the following code (* is used to indicate the cursor position): -> - if foo > 3: - log("foo is big") * - foo = 3 - do_something_else() -< -the if clause is logically related to the code block, whereas the function -call below is not. It is unlikely we would want to select the line below when -we are interested in the if block. - -However, in other languages, such as Vim scripts, control structures are -usually terminated with something like 'endif'. Therefore, in this example: -> - if foo > 3 - echo "foo is big" * - let foo = 3 - endif - call do_something_else() -< -we would more likely want to include the endif when we select the if -structure. - - -============================================================================== -BLANK LINES *idntobj-blanklines* - -When scanning code blocks, the plugin usually ignores blank lines. There is an -exception to this, however, when the block being selected is not indented. In -this case if blank lines are ignored, then the entire file would be selected. -Instead when code at the top level is being indented blank lines are -considered to delimit the block. - - -============================================================================== -ABOUT *idntobj-about* - -vim-indent-object was written by Michael Smith . The -project repository is kept at: - -http://github.com/michaeljsmith/vim-indent-object - -Any feedback or criticism is welcome, and can be mailed to the author at the -above email address. Alternatively issues can be raised on the project -website. - -Licence: - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -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. +*indent-object.txt* Text objects based on indent levels. + + Copyright (c) 2010 Michael Smith + +Indent Text Objects + +INTRODUCTION |idntobj-introduction| +TEXT OBJECTS |idntobj-objects| +BLANK LINES |idntobj-blanklines| +ABOUT |idntobj-about| + + +============================================================================== +INTRODUCTION *idntobj-introduction* + +Vim text objects provide a convenient way to select and operate on various +types of objects. These objects include regions surrounded by various types of +brackets and various parts of language (ie sentences, paragraphs, etc). + +This plugin defines a new text object, based on indentation levels. This is +very useful in languages such as Python, in which the syntax defines scope in +terms of indentation. Using the objects defined in this plugin, an entire if +structure can be quickly selected, for example. + + +============================================================================== +TEXT OBJECTS *ai* *ii* *aI* *iI* *idntobj-objects* + +This plugin defines two new text objects. These are very similar - they differ +only in whether they include the line below the block or not. + + Key Mapping Description ~ +> + ai (A)n (I)ndentation level and line above. + ii (I)nner (I)ndentation level (no line above). + aI (A)n (I)ndentation level and lines above/below. + iI (I)nner (I)ndentation level (no lines above/below). +< + +Note that the iI mapping is mostly included simply for completeness, it is +effectively a synonym for ii. + +Just like regular text objects, these mappings can be used either with +operators expecting a motion, such as 'd' or 'c', as well as in visual mode. +In visual mode the mapping can be repeated, which has the effect of +iteratively increasing the scope of indentation block selected. Specifying a +count can be used to achieve the same effect. + +The difference between |ai| and |aI| is that |ai| includes the line +immediately above the indentation block, whereas aI includes not only that, +but also the line below. Which of these is most useful largely depends on the +structure of the language being edited. + +For example, when editing the Python code, |ai| is generally more useful, as +the line above the indentation block is usually related to it. For example, in +the following code (* is used to indicate the cursor position): +> + if foo > 3: + log("foo is big") * + foo = 3 + do_something_else() +< +the if clause is logically related to the code block, whereas the function +call below is not. It is unlikely we would want to select the line below when +we are interested in the if block. + +However, in other languages, such as Vim scripts, control structures are +usually terminated with something like 'endif'. Therefore, in this example: +> + if foo > 3 + echo "foo is big" * + let foo = 3 + endif + call do_something_else() +< +we would more likely want to include the endif when we select the if +structure. + + +============================================================================== +BLANK LINES *idntobj-blanklines* + +When scanning code blocks, the plugin usually ignores blank lines. There is an +exception to this, however, when the block being selected is not indented. In +this case if blank lines are ignored, then the entire file would be selected. +Instead when code at the top level is being indented blank lines are +considered to delimit the block. + + +============================================================================== +ABOUT *idntobj-about* + +vim-indent-object was written by Michael Smith . The +project repository is kept at: + +http://github.com/michaeljsmith/vim-indent-object + +Any feedback or criticism is welcome, and can be mailed to the author at the +above email address. Alternatively issues can be raised on the project +website. + +Licence: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +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. diff --git a/sources_non_forked/vim-marked b/sources_non_forked/vim-marked new file mode 160000 index 00000000..a7c1cba2 --- /dev/null +++ b/sources_non_forked/vim-marked @@ -0,0 +1 @@ +Subproject commit a7c1cba232cabd96af800f82aad21cc180a09764 diff --git a/sources_non_forked/vim-misc b/sources_non_forked/vim-misc new file mode 160000 index 00000000..8551f2b9 --- /dev/null +++ b/sources_non_forked/vim-misc @@ -0,0 +1 @@ +Subproject commit 8551f2b9dec7fd17dd5c3476d7869957185d692d diff --git a/sources_non_forked/vim-notes b/sources_non_forked/vim-notes new file mode 160000 index 00000000..14838be7 --- /dev/null +++ b/sources_non_forked/vim-notes @@ -0,0 +1 @@ +Subproject commit 14838be7c5330592578346ef6e69d7a198b48dbe diff --git a/sources_non_forked/vim-ruby b/sources_non_forked/vim-ruby new file mode 160000 index 00000000..b60da6c6 --- /dev/null +++ b/sources_non_forked/vim-ruby @@ -0,0 +1 @@ +Subproject commit b60da6c63bba329aa0327a2859639f9a02afc3ed diff --git a/sources_non_forked/vim-trailing-whitespace b/sources_non_forked/vim-trailing-whitespace new file mode 160000 index 00000000..6bfea000 --- /dev/null +++ b/sources_non_forked/vim-trailing-whitespace @@ -0,0 +1 @@ +Subproject commit 6bfea0006a364c60e5e7e0daecb9a3899312cb58 From 1386102faaabc97e63388067a46608c382e70361 Mon Sep 17 00:00:00 2001 From: Maksim Pecherskiy Date: Sat, 19 Apr 2014 14:06:42 -0700 Subject: [PATCH 04/23] Adding vim-jade. --- sources_non_forked/vim-jade/README.markdown | 19 ++++ sources_non_forked/vim-jade/ftdetect/jade.vim | 2 + sources_non_forked/vim-jade/ftplugin/jade.vim | 55 ++++++++++++ sources_non_forked/vim-jade/indent/jade.vim | 70 +++++++++++++++ sources_non_forked/vim-jade/syntax/jade.vim | 89 +++++++++++++++++++ vimrcs/basic.vim | 32 +++---- 6 files changed, 251 insertions(+), 16 deletions(-) create mode 100644 sources_non_forked/vim-jade/README.markdown create mode 100644 sources_non_forked/vim-jade/ftdetect/jade.vim create mode 100644 sources_non_forked/vim-jade/ftplugin/jade.vim create mode 100644 sources_non_forked/vim-jade/indent/jade.vim create mode 100644 sources_non_forked/vim-jade/syntax/jade.vim diff --git a/sources_non_forked/vim-jade/README.markdown b/sources_non_forked/vim-jade/README.markdown new file mode 100644 index 00000000..2c2222ed --- /dev/null +++ b/sources_non_forked/vim-jade/README.markdown @@ -0,0 +1,19 @@ +# vim-jade # + +Vim syntax highlighting for Jade templates. + +Installation +------------ + +I prefer to install plugins using Tim Pope's +[pathogen.vim](https://github.com/tpope/vim-pathogen). Installation using +pathogen is quite simple. + + cd ~/.vim/bundle + git clone git://github.com/digitaltoad/vim-jade.git + +If you do not want to use pathogen. You can always install vim-jade in the +normal manner by copying each directory to your ~/.vim directory. Make sure +not to overwrite any existing directory of the same name and instead copy only +the contents of the source directory to the directory of the same name in your +~/.vim directory. diff --git a/sources_non_forked/vim-jade/ftdetect/jade.vim b/sources_non_forked/vim-jade/ftdetect/jade.vim new file mode 100644 index 00000000..c21dcff7 --- /dev/null +++ b/sources_non_forked/vim-jade/ftdetect/jade.vim @@ -0,0 +1,2 @@ +" Jade +autocmd BufNewFile,BufReadPost *.jade set filetype=jade diff --git a/sources_non_forked/vim-jade/ftplugin/jade.vim b/sources_non_forked/vim-jade/ftplugin/jade.vim new file mode 100644 index 00000000..235770d0 --- /dev/null +++ b/sources_non_forked/vim-jade/ftplugin/jade.vim @@ -0,0 +1,55 @@ +" Vim filetype plugin +" Language: Jade +" Maintainer: Joshua Borton +" Credits: Tim Pope + +" Only do this when not done yet for this buffer +if exists("b:did_ftplugin") + finish +endif + +let s:save_cpo = &cpo +set cpo-=C + +" Define some defaults in case the included ftplugins don't set them. +let s:undo_ftplugin = "" +let s:browsefilter = "All Files (*.*)\t*.*\n" +let s:match_words = "" + +runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim +unlet! b:did_ftplugin + +" Override our defaults if these were set by an included ftplugin. +if exists("b:undo_ftplugin") + let s:undo_ftplugin = b:undo_ftplugin + unlet b:undo_ftplugin +endif +if exists("b:browsefilter") + let s:browsefilter = b:browsefilter + unlet b:browsefilter +endif +if exists("b:match_words") + let s:match_words = b:match_words + unlet b:match_words +endif + +" Change the browse dialog on Win32 to show mainly Haml-related files +if has("gui_win32") + let b:browsefilter="Jade Files (*.jade)\t*.jade\n" . s:browsefilter +endif + +" Load the combined list of match_words for matchit.vim +if exists("loaded_matchit") + let b:match_words = s:match_words +endif + +setlocal comments=://-,:// commentstring=//\ %s + +setlocal suffixesadd+=.jade + +let b:undo_ftplugin = "setl cms< com< " + \ " | unlet! b:browsefilter b:match_words | " . s:undo_ftplugin + +let &cpo = s:save_cpo + +" vim:set sw=2: diff --git a/sources_non_forked/vim-jade/indent/jade.vim b/sources_non_forked/vim-jade/indent/jade.vim new file mode 100644 index 00000000..12b9e2ed --- /dev/null +++ b/sources_non_forked/vim-jade/indent/jade.vim @@ -0,0 +1,70 @@ +" Vim indent file +" Language: Jade +" Maintainer: Joshua Borton +" Credits: Tim Pope (vim-jade) +" Last Change: 2010 Sep 22 + +if exists("b:did_indent") + finish +endif + +unlet! b:did_indent +let b:did_indent = 1 + +setlocal autoindent +setlocal indentexpr=GetJadeIndent() +setlocal indentkeys=o,O,*,},],0),!^F + +" Only define the function once. +if exists("*GetJadeIndent") + finish +endif + +let s:attributes = '\%((.\{-\})\)' +let s:tag = '\([%.#][[:alnum:]_-]\+\|'.s:attributes.'\)*[<>]*' + +if !exists('g:jade_self_closing_tags') + let g:jade_self_closing_tags = 'meta|link|img|hr|br|input' +endif + +setlocal formatoptions+=r +setlocal comments+=n:\| + +function! GetJadeIndent() + let lnum = prevnonblank(v:lnum-1) + if lnum == 0 + return 0 + endif + let line = substitute(getline(lnum),'\s\+$','','') + let cline = substitute(substitute(getline(v:lnum),'\s\+$','',''),'^\s\+','','') + let lastcol = strlen(line) + let line = substitute(line,'^\s\+','','') + let indent = indent(lnum) + let cindent = indent(v:lnum) + let increase = indent + &sw + if indent == indent(lnum) + let indent = cindent <= indent ? -1 : increase + endif + + let group = synIDattr(synID(lnum,lastcol,1),'name') + + if line =~ '^!!!' + return indent + elseif line =~ '^/\%(\[[^]]*\]\)\=$' + return increase + elseif line =~ '^\%(if\|else\|unless\|for\|each\|block\|mixin\|append\|case\|when\)' + return increase + elseif line =~ '^'.s:tag.'[&!]\=[=~-].*,\s*$' + return increase + elseif line == '-#' + return increase + elseif line =~? '^\v%('.g:jade_self_closing_tags.')>' + return indent + elseif group =~? '\v^%(jadeAttributesDelimiter|jadeClass|jadeId|htmlTagName|htmlSpecialTagName|jadeFilter)$' + return increase + else + return indent + endif +endfunction + +" vim:set sw=2: diff --git a/sources_non_forked/vim-jade/syntax/jade.vim b/sources_non_forked/vim-jade/syntax/jade.vim new file mode 100644 index 00000000..d61e4f01 --- /dev/null +++ b/sources_non_forked/vim-jade/syntax/jade.vim @@ -0,0 +1,89 @@ +" Vim syntax file +" Language: Jade +" Maintainer: Joshua Borton +" Credits: Tim Pope +" Filenames: *.jade + +if exists("b:current_syntax") + finish +endif + +if !exists("main_syntax") + let main_syntax = 'jade' +endif + +runtime! syntax/html.vim +runtime! syntax/html/html5.vim +silent! syntax include @htmlCoffeescript syntax/coffee.vim +unlet! b:current_syntax +silent! syntax include @htmlStylus syntax/stylus.vim +unlet! b:current_syntax +silent! syntax include @htmlMarkdown syntax/markdown.vim +unlet! b:current_syntax + +syn case match + +syn region javascriptParenthesisBlock start="(" end=")" contains=@htmlJavascript contained keepend +syn cluster htmlJavascript add=javascriptParenthesisBlock + +syn region jadeJavascript matchgroup=jadeJavascriptOutputChar start="[!&]\==\|\~" skip=",\s*$" end="$" contained contains=@htmlJavascript keepend +syn region jadeJavascript matchgroup=jadeJavascriptChar start="-" skip=",\s*$" end="$" contained contains=@htmlJavascript keepend +syn cluster jadeTop contains=jadeBegin,jadeComment,jadeHtmlComment,jadeJavascript +syn match jadeBegin "^\s*\%([<>]\|&[^=~ ]\)\@!" nextgroup=jadeTag,jadeClassChar,jadeIdChar,jadePlainChar,jadeJavascript,jadeScriptConditional,jadeScriptStatement +syn match jadeTag "+\?\w\+\%(:\w\+\)\=" contained contains=htmlTagName,htmlSpecialTagName nextgroup=@jadeComponent +syn cluster jadeComponent contains=jadeAttributes,jadeIdChar,jadeBlockExpansionChar,jadeClassChar,jadePlainChar,jadeJavascript +syn match jadeComment '\s*\/\/.*$' +syn region jadeHtmlComment start="^\z(\s*\)/" end="^\%(\z1\s\|\s*$\)\@!" +syn region jadeAttributes matchgroup=jadeAttributesDelimiter start="(" end=")" contained contains=@htmlJavascript,jadeHtmlArg,htmlArg,htmlEvent,htmlCssDefinition nextgroup=@jadeComponent +syn match jadeClassChar "\." contained nextgroup=jadeClass +syn match jadeBlockExpansionChar ":\s" contained nextgroup=jadeTag +syn match jadeIdChar "#{\@!" contained nextgroup=jadeId +syn match jadeClass "\%(\w\|-\)\+" contained nextgroup=@jadeComponent +syn match jadeId "\%(\w\|-\)\+" contained nextgroup=@jadeComponent +syn region jadeDocType start="^\s*\(!!!\|doctype\)" end="$" +" Unless I'm mistaken, syntax/html.vim requires +" that the = sign be present for these matches. +" This adds the matches back for jade. +syn keyword jadeHtmlArg contained href title + +syn match jadePlainChar "\\" contained +syn region jadeInterpolation matchgroup=jadeInterpolationDelimiter start="#{" end="}" contains=@htmlJavascript +syn match jadeInterpolationEscape "\\\@[?!]\@!" +syn match jadeScriptStatement "\<\%(each\|block\|prepend\|append\|mixin\|extends\|include\)\>[?!]\@!" + +syn region jadeJavascript start="^\z(\s*\)script\%(:\w\+\)\=" end="^\%(\z1\s\|\s*$\)\@!" contains=@htmlJavascript,jadeJavascriptTag keepend +syn region jadeJavascriptTag contained start="^\z(\s*\)script\%(:\w\+\)\=" end="$" contains=jadeBegin,jadeTag +syn region jadeCssBlock start="^\z(\s*\)style" nextgroup=@jadeComponent,jadeError end="^\%(\z1\s\|\s*$\)\@!" contains=@jadeTop,@htmlCss keepend + +syn match jadeError "\$" contained + +hi def link jadePlainChar Special +hi def link jadeScriptConditional PreProc +hi def link jadeScriptStatement PreProc +hi def link jadeHtmlArg htmlArg +hi def link jadeAttributeString String +hi def link jadeAttributesDelimiter Identifier +hi def link jadeIdChar Special +hi def link jadeClassChar Special +hi def link jadeBlockExpansionChar Special +hi def link jadeId Identifier +hi def link jadeClass Type +hi def link jadeInterpolationDelimiter Delimiter +hi def link jadeFilter PreProc +hi def link jadeDocType PreProc +hi def link jadeComment Comment +hi def link jadeHtmlComment jadeComment + +let b:current_syntax = "jade" + +if main_syntax == "jade" + unlet main_syntax +endif diff --git a/vimrcs/basic.vim b/vimrcs/basic.vim index 2e31754d..c97c082f 100644 --- a/vimrcs/basic.vim +++ b/vimrcs/basic.vim @@ -1,12 +1,12 @@ """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" Maintainer: +" Maintainer: " Amir Salihefendic " http://amix.dk - amix@amix.dk " -" Version: +" Version: " 5.0 - 29/05/12 15:43:36 " -" Blog_post: +" Blog_post: " http://amix.dk/blog/post/19691#The-ultimate-Vim-configuration-on-Github " " Awesome_version: @@ -19,7 +19,7 @@ " Syntax_highlighted: " http://amix.dk/vim/vimrc.html " -" Raw_version: +" Raw_version: " http://amix.dk/vim/vimrc.txt " " Sections: @@ -61,7 +61,7 @@ let g:mapleader = "," " Fast saving nmap w :w! -" :W sudo saves the file +" :W sudo saves the file " (useful for handling the permission-denied error) command W w !sudo tee % > /dev/null @@ -99,23 +99,23 @@ set whichwrap+=<,>,h,l " Ignore case when searching set ignorecase -" When searching try to be smart about cases +" When searching try to be smart about cases set smartcase " Highlight search results set hlsearch " Makes search act like search in modern browsers -set incsearch +set incsearch " Don't redraw while executing macros (good performance config) -set lazyredraw +set lazyredraw " For regular expressions turn magic on set magic " Show matching brackets when text indicator is over them -set showmatch +set showmatch " How many tenths of a second to blink when matching brackets set mat=2 @@ -133,7 +133,7 @@ set foldcolumn=1 " => Colors and Fonts """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Enable syntax highlighting -syntax enable +syntax enable try colorscheme desert @@ -176,8 +176,8 @@ set expandtab set smarttab " 1 tab == 4 spaces -set shiftwidth=4 -set tabstop=4 +set shiftwidth=2 +set tabstop=2 " Linebreak on 500 characters set lbr @@ -227,8 +227,8 @@ map ba :1,1000 bd! map tn :tabnew map to :tabonly map tc :tabclose -map tm :tabmove -map t :tabnext +map tm :tabmove +map t :tabnext " Opens a new tab with the current buffer's path " Super useful when editing files in the same directory @@ -237,7 +237,7 @@ map te :tabedit =expand("%:p:h")/ " Switch CWD to the directory of the open buffer map cd :cd %:p:h:pwd -" Specify the behavior when switching between buffers +" Specify the behavior when switching between buffers try set switchbuf=useopen,usetab,newtab set stal=2 @@ -358,7 +358,7 @@ function! CmdLine(str) exe "menu Foo.Bar :" . a:str emenu Foo.Bar unmenu Foo -endfunction +endfunction function! VisualSelection(direction, extra_filter) range let l:saved_reg = @" From a1561315cbbc3acdbed70c7ee670022b4d1e9d20 Mon Sep 17 00:00:00 2001 From: Maksim Pecherskiy Date: Sat, 19 Apr 2014 14:17:48 -0700 Subject: [PATCH 05/23] Adding molokai straight no submodule. --- sources_forked/molokai | 1 - sources_forked/molokai/README.md | 24 ++ sources_forked/molokai/colors/molokai.vim | 270 ++++++++++++++++++++++ 3 files changed, 294 insertions(+), 1 deletion(-) delete mode 160000 sources_forked/molokai create mode 100644 sources_forked/molokai/README.md create mode 100644 sources_forked/molokai/colors/molokai.vim diff --git a/sources_forked/molokai b/sources_forked/molokai deleted file mode 160000 index fd2e0b6a..00000000 --- a/sources_forked/molokai +++ /dev/null @@ -1 +0,0 @@ -Subproject commit fd2e0b6a0ee4561c457bbd9db7f72e1ecc6a5a19 diff --git a/sources_forked/molokai/README.md b/sources_forked/molokai/README.md new file mode 100644 index 00000000..320508df --- /dev/null +++ b/sources_forked/molokai/README.md @@ -0,0 +1,24 @@ +# Molokai Color Scheme for Vim + +Molokai is a Vim port of the monokai theme for TextMate originally created by Wimer Hazenberg. + +By default, it has a dark gray background based on the version created by Hamish Stuart Macpherson for the E editor. + +![Gray Background](http://www.winterdom.com/weblog/content/binary/WindowsLiveWriter/MolokaiforVim_8602/molokai_normal_small_3.png) + +![Molokai Original](http://www.winterdom.com/weblog/content/binary/WindowsLiveWriter/MolokaiforVim_8602/molokai_original_small_3.png) + +256-Color terminals are also supported, though there are some differences with the Gui version. Only the dark gray background style is supported on terminal vim at this time. + +## Installation + +Copy the file on your .vim/colors folder. + +If you prefer the scheme to match the original monokai background color, put this in your .vimrc file: + let g:molokai_original = 1 + +There is also an alternative sheme under development for color terminals which attempts to bring the 256 color version as close as possible to the the default (dark) GUI version. To access, add this to your .vimrc: + let g:rehash256 = 1 + +Note: when using the console version, add this command after enabling the colorscheme in your .vimrc: + set background=dark diff --git a/sources_forked/molokai/colors/molokai.vim b/sources_forked/molokai/colors/molokai.vim new file mode 100644 index 00000000..2e4ba739 --- /dev/null +++ b/sources_forked/molokai/colors/molokai.vim @@ -0,0 +1,270 @@ + +" Vim color file +" +" Author: Tomas Restrepo +" +" Note: Based on the monokai theme for textmate +" by Wimer Hazenberg and its darker variant +" by Hamish Stuart Macpherson +" + +hi clear + +set background=dark +if version > 580 + " no guarantees for version 5.8 and below, but this makes it stop + " complaining + hi clear + if exists("syntax_on") + syntax reset + endif +endif +let g:colors_name="molokai" + +if exists("g:molokai_original") + let s:molokai_original = g:molokai_original +else + let s:molokai_original = 0 +endif + + +hi Boolean guifg=#AE81FF +hi Character guifg=#E6DB74 +hi Number guifg=#AE81FF +hi String guifg=#E6DB74 +hi Conditional guifg=#F92672 gui=bold +hi Constant guifg=#AE81FF gui=bold +hi Cursor guifg=#000000 guibg=#F8F8F0 +hi iCursor guifg=#000000 guibg=#F8F8F0 +hi Debug guifg=#BCA3A3 gui=bold +hi Define guifg=#66D9EF +hi Delimiter guifg=#8F8F8F +hi DiffAdd guibg=#13354A +hi DiffChange guifg=#89807D guibg=#4C4745 +hi DiffDelete guifg=#960050 guibg=#1E0010 +hi DiffText guibg=#4C4745 gui=italic,bold + +hi Directory guifg=#A6E22E gui=bold +hi Error guifg=#960050 guibg=#1E0010 +hi ErrorMsg guifg=#F92672 guibg=#232526 gui=bold +hi Exception guifg=#A6E22E gui=bold +hi Float guifg=#AE81FF +hi FoldColumn guifg=#465457 guibg=#000000 +hi Folded guifg=#465457 guibg=#000000 +hi Function guifg=#A6E22E +hi Identifier guifg=#FD971F +hi Ignore guifg=#808080 guibg=bg +hi IncSearch guifg=#C4BE89 guibg=#000000 + +hi Keyword guifg=#F92672 gui=bold +hi Label guifg=#E6DB74 gui=none +hi Macro guifg=#C4BE89 gui=italic +hi SpecialKey guifg=#66D9EF gui=italic + +hi MatchParen guifg=#000000 guibg=#FD971F gui=bold +hi ModeMsg guifg=#E6DB74 +hi MoreMsg guifg=#E6DB74 +hi Operator guifg=#F92672 + +" complete menu +hi Pmenu guifg=#66D9EF guibg=#000000 +hi PmenuSel guibg=#808080 +hi PmenuSbar guibg=#080808 +hi PmenuThumb guifg=#66D9EF + +hi PreCondit guifg=#A6E22E gui=bold +hi PreProc guifg=#A6E22E +hi Question guifg=#66D9EF +hi Repeat guifg=#F92672 gui=bold +hi Search guifg=#FFFFFF guibg=#455354 +" marks +hi SignColumn guifg=#A6E22E guibg=#232526 +hi SpecialChar guifg=#F92672 gui=bold +hi SpecialComment guifg=#7E8E91 gui=bold +hi Special guifg=#66D9EF guibg=bg gui=italic +if has("spell") + hi SpellBad guisp=#FF0000 gui=undercurl + hi SpellCap guisp=#7070F0 gui=undercurl + hi SpellLocal guisp=#70F0F0 gui=undercurl + hi SpellRare guisp=#FFFFFF gui=undercurl +endif +hi Statement guifg=#F92672 gui=bold +hi StatusLine guifg=#455354 guibg=fg +hi StatusLineNC guifg=#808080 guibg=#080808 +hi StorageClass guifg=#FD971F gui=italic +hi Structure guifg=#66D9EF +hi Tag guifg=#F92672 gui=italic +hi Title guifg=#ef5939 +hi Todo guifg=#FFFFFF guibg=bg gui=bold + +hi Typedef guifg=#66D9EF +hi Type guifg=#66D9EF gui=none +hi Underlined guifg=#808080 gui=underline + +hi VertSplit guifg=#808080 guibg=#080808 gui=bold +hi VisualNOS guibg=#403D3D +hi Visual guibg=#403D3D +hi WarningMsg guifg=#FFFFFF guibg=#333333 gui=bold +hi WildMenu guifg=#66D9EF guibg=#000000 + +if s:molokai_original == 1 + hi Normal guifg=#F8F8F2 guibg=#272822 + hi Comment guifg=#75715E + hi CursorLine guibg=#3E3D32 + hi CursorLineNr guifg=#FD971F gui=none + hi CursorColumn guibg=#3E3D32 + hi ColorColumn guibg=#3B3A32 + hi LineNr guifg=#BCBCBC guibg=#3B3A32 + hi NonText guifg=#75715E + hi SpecialKey guifg=#75715E +else + hi Normal guifg=#F8F8F2 guibg=#1B1D1E + hi Comment guifg=#7E8E91 + hi CursorLine guibg=#293739 + hi CursorLineNr guifg=#FD971F gui=none + hi CursorColumn guibg=#293739 + hi ColorColumn guibg=#232526 + hi LineNr guifg=#465457 guibg=#232526 + hi NonText guifg=#465457 + hi SpecialKey guifg=#465457 +end + +" +" Support for 256-color terminal +" +if &t_Co > 255 + if s:molokai_original == 1 + hi Normal ctermbg=234 + hi CursorLine ctermbg=235 cterm=none + hi CursorLineNr ctermfg=208 cterm=none + else + hi Normal ctermfg=252 ctermbg=233 + hi CursorLine ctermbg=234 cterm=none + hi CursorLineNr ctermfg=208 cterm=none + endif + hi Boolean ctermfg=135 + hi Character ctermfg=144 + hi Number ctermfg=135 + hi String ctermfg=144 + hi Conditional ctermfg=161 cterm=bold + hi Constant ctermfg=135 cterm=bold + hi Cursor ctermfg=16 ctermbg=253 + hi Debug ctermfg=225 cterm=bold + hi Define ctermfg=81 + hi Delimiter ctermfg=241 + + hi DiffAdd ctermbg=24 + hi DiffChange ctermfg=181 ctermbg=239 + hi DiffDelete ctermfg=162 ctermbg=53 + hi DiffText ctermbg=102 cterm=bold + + hi Directory ctermfg=118 cterm=bold + hi Error ctermfg=219 ctermbg=89 + hi ErrorMsg ctermfg=199 ctermbg=16 cterm=bold + hi Exception ctermfg=118 cterm=bold + hi Float ctermfg=135 + hi FoldColumn ctermfg=67 ctermbg=16 + hi Folded ctermfg=67 ctermbg=16 + hi Function ctermfg=118 + hi Identifier ctermfg=208 cterm=none + hi Ignore ctermfg=244 ctermbg=232 + hi IncSearch ctermfg=193 ctermbg=16 + + hi keyword ctermfg=161 cterm=bold + hi Label ctermfg=229 cterm=none + hi Macro ctermfg=193 + hi SpecialKey ctermfg=81 + + hi MatchParen ctermfg=16 ctermbg=208 cterm=bold + hi ModeMsg ctermfg=229 + hi MoreMsg ctermfg=229 + hi Operator ctermfg=161 + + " complete menu + hi Pmenu ctermfg=81 ctermbg=16 + hi PmenuSel ctermfg=253 ctermbg=244 + hi PmenuSbar ctermbg=232 + hi PmenuThumb ctermfg=81 + + hi PreCondit ctermfg=118 cterm=bold + hi PreProc ctermfg=118 + hi Question ctermfg=81 + hi Repeat ctermfg=161 cterm=bold + hi Search ctermfg=253 ctermbg=66 + + " marks column + hi SignColumn ctermfg=118 ctermbg=235 + hi SpecialChar ctermfg=161 cterm=bold + hi SpecialComment ctermfg=245 cterm=bold + hi Special ctermfg=81 + if has("spell") + hi SpellBad ctermbg=52 + hi SpellCap ctermbg=17 + hi SpellLocal ctermbg=17 + hi SpellRare ctermfg=none ctermbg=none cterm=reverse + endif + hi Statement ctermfg=161 cterm=bold + hi StatusLine ctermfg=238 ctermbg=253 + hi StatusLineNC ctermfg=244 ctermbg=232 + hi StorageClass ctermfg=208 + hi Structure ctermfg=81 + hi Tag ctermfg=161 + hi Title ctermfg=166 + hi Todo ctermfg=231 ctermbg=232 cterm=bold + + hi Typedef ctermfg=81 + hi Type ctermfg=81 cterm=none + hi Underlined ctermfg=244 cterm=underline + + hi VertSplit ctermfg=244 ctermbg=232 cterm=bold + hi VisualNOS ctermbg=238 + hi Visual ctermbg=235 + hi WarningMsg ctermfg=231 ctermbg=238 cterm=bold + hi WildMenu ctermfg=81 ctermbg=16 + + hi Comment ctermfg=59 + hi CursorColumn ctermbg=234 + hi ColorColumn ctermbg=234 + hi LineNr ctermfg=250 ctermbg=234 + hi NonText ctermfg=59 + + hi SpecialKey ctermfg=59 + + if exists("g:rehash256") && g:rehash256 == 1 + hi Normal ctermfg=252 ctermbg=234 + hi CursorLine ctermbg=236 cterm=none + hi CursorLineNr ctermfg=208 cterm=none + + hi Boolean ctermfg=141 + hi Character ctermfg=222 + hi Number ctermfg=141 + hi String ctermfg=222 + hi Conditional ctermfg=197 cterm=bold + hi Constant ctermfg=141 cterm=bold + + hi DiffDelete ctermfg=125 ctermbg=233 + + hi Directory ctermfg=154 cterm=bold + hi Error ctermfg=125 ctermbg=233 + hi Exception ctermfg=154 cterm=bold + hi Float ctermfg=141 + hi Function ctermfg=154 + hi Identifier ctermfg=208 + + hi Keyword ctermfg=197 cterm=bold + hi Operator ctermfg=197 + hi PreCondit ctermfg=154 cterm=bold + hi PreProc ctermfg=154 + hi Repeat ctermfg=197 cterm=bold + + hi Statement ctermfg=197 cterm=bold + hi Tag ctermfg=197 + hi Title ctermfg=203 + hi Visual ctermbg=238 + + hi Comment ctermfg=244 + hi LineNr ctermfg=239 ctermbg=235 + hi NonText ctermfg=239 + hi SpecialKey ctermfg=239 + endif +end From 03a762fb74f0b69c1e9f30740f3ccacea63a2689 Mon Sep 17 00:00:00 2001 From: Maksim Pecherskiy Date: Sat, 19 Apr 2014 14:18:51 -0700 Subject: [PATCH 06/23] Adding vim-marked. --- sources_non_forked/vim-marked | 1 - sources_non_forked/vim-marked/README.markdown | 22 ++++++++ .../vim-marked/plugin/marked.vim | 55 +++++++++++++++++++ 3 files changed, 77 insertions(+), 1 deletion(-) delete mode 160000 sources_non_forked/vim-marked create mode 100644 sources_non_forked/vim-marked/README.markdown create mode 100644 sources_non_forked/vim-marked/plugin/marked.vim diff --git a/sources_non_forked/vim-marked b/sources_non_forked/vim-marked deleted file mode 160000 index a7c1cba2..00000000 --- a/sources_non_forked/vim-marked +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a7c1cba232cabd96af800f82aad21cc180a09764 diff --git a/sources_non_forked/vim-marked/README.markdown b/sources_non_forked/vim-marked/README.markdown new file mode 100644 index 00000000..2ce98952 --- /dev/null +++ b/sources_non_forked/vim-marked/README.markdown @@ -0,0 +1,22 @@ +# marked.vim + +Open the current Markdown buffer in [Marked.app](http://markedapp.com/). + +## Usage + +This plugin adds the following commands to Markdown buffers: + + :MarkedOpen[!] Open the current Markdown buffer in Marked.app. + Call with a bang to prevent Marked.app from stealing + focus from Vim. + + :MarkedQuit Close the current Markdown buffer in Marked.app. + Quit Marked.app if no other documents are open. + +If you run `:MarkedOpen`, the document in Marked.app will be automatically +closed when Vim exists, and Marked.app will quit if no other documents are +open. + +## License + +Same as Vim itself, see `:help license`. diff --git a/sources_non_forked/vim-marked/plugin/marked.vim b/sources_non_forked/vim-marked/plugin/marked.vim new file mode 100644 index 00000000..1009d513 --- /dev/null +++ b/sources_non_forked/vim-marked/plugin/marked.vim @@ -0,0 +1,55 @@ +" marked.vim +" Author: Joshua Priddle +" URL: https://github.com/itspriddle/vim-marked +" Version: 0.4.0 +" License: Same as Vim itself (see :help license) + +if &cp || exists("g:marked_loaded") && g:marked_loaded + finish +endif +let g:marked_loaded = 1 +let s:save_cpo = &cpo +set cpo&vim + +function s:OpenMarked(background) + let l:filename = expand("%:p") + silent exe "!open -a Marked.app ".(a:background ? '-g' : '')." '".l:filename."'" + + silent exe "augroup marked_autoclose_".l:filename + autocmd! + silent exe 'autocmd VimLeavePre * call s:QuitMarked("'.l:filename.'")' + augroup END + redraw! +endfunction + +function s:QuitMarked(path) + silent exe "augroup marked_autoclose_".a:path + autocmd! + augroup END + silent exe "augroup! marked_autoclose_".a:path + + let cmd = " -e 'try'" + let cmd .= " -e 'if application \"Marked\" is running then'" + let cmd .= " -e 'tell application \"Marked\"'" + let cmd .= " -e 'close (first document whose path is equal to \"".a:path."\")'" + let cmd .= " -e 'if count of every window is equal to 0 then'" + let cmd .= " -e 'quit'" + let cmd .= " -e 'end if'" + let cmd .= " -e 'end tell'" + let cmd .= " -e 'end if'" + let cmd .= " -e 'end try'" + + silent exe "!osascript ".cmd + redraw! +endfunction + +augroup marked_commands + autocmd! + autocmd FileType markdown,mkd command! -buffer -bang MarkedOpen :call s:OpenMarked(0) + autocmd FileType markdown,mkd command! -buffer MarkedQuit :call s:QuitMarked(expand('%:p')) +augroup END + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim:ft=vim:fdm=marker:ts=2:sw=2:sts=2:et From 6bdb09c87e57472596228b80cd452d052357ef67 Mon Sep 17 00:00:00 2001 From: Maksim Pecherskiy Date: Sat, 19 Apr 2014 14:19:26 -0700 Subject: [PATCH 07/23] Fixing submodule shits. --- sources_non_forked/vim-jade | 1 + sources_non_forked/vim-jade/README.markdown | 19 ---- sources_non_forked/vim-jade/ftdetect/jade.vim | 2 - sources_non_forked/vim-jade/ftplugin/jade.vim | 55 ------------ sources_non_forked/vim-jade/indent/jade.vim | 70 --------------- sources_non_forked/vim-jade/syntax/jade.vim | 89 ------------------- sources_non_forked/vim-marked | 1 + sources_non_forked/vim-marked/README.markdown | 22 ----- .../vim-marked/plugin/marked.vim | 55 ------------ 9 files changed, 2 insertions(+), 312 deletions(-) create mode 160000 sources_non_forked/vim-jade delete mode 100644 sources_non_forked/vim-jade/README.markdown delete mode 100644 sources_non_forked/vim-jade/ftdetect/jade.vim delete mode 100644 sources_non_forked/vim-jade/ftplugin/jade.vim delete mode 100644 sources_non_forked/vim-jade/indent/jade.vim delete mode 100644 sources_non_forked/vim-jade/syntax/jade.vim create mode 160000 sources_non_forked/vim-marked delete mode 100644 sources_non_forked/vim-marked/README.markdown delete mode 100644 sources_non_forked/vim-marked/plugin/marked.vim diff --git a/sources_non_forked/vim-jade b/sources_non_forked/vim-jade new file mode 160000 index 00000000..57635898 --- /dev/null +++ b/sources_non_forked/vim-jade @@ -0,0 +1 @@ +Subproject commit 57635898548d0a5cbf014764e3d9ba1c1fb0a5c8 diff --git a/sources_non_forked/vim-jade/README.markdown b/sources_non_forked/vim-jade/README.markdown deleted file mode 100644 index 2c2222ed..00000000 --- a/sources_non_forked/vim-jade/README.markdown +++ /dev/null @@ -1,19 +0,0 @@ -# vim-jade # - -Vim syntax highlighting for Jade templates. - -Installation ------------- - -I prefer to install plugins using Tim Pope's -[pathogen.vim](https://github.com/tpope/vim-pathogen). Installation using -pathogen is quite simple. - - cd ~/.vim/bundle - git clone git://github.com/digitaltoad/vim-jade.git - -If you do not want to use pathogen. You can always install vim-jade in the -normal manner by copying each directory to your ~/.vim directory. Make sure -not to overwrite any existing directory of the same name and instead copy only -the contents of the source directory to the directory of the same name in your -~/.vim directory. diff --git a/sources_non_forked/vim-jade/ftdetect/jade.vim b/sources_non_forked/vim-jade/ftdetect/jade.vim deleted file mode 100644 index c21dcff7..00000000 --- a/sources_non_forked/vim-jade/ftdetect/jade.vim +++ /dev/null @@ -1,2 +0,0 @@ -" Jade -autocmd BufNewFile,BufReadPost *.jade set filetype=jade diff --git a/sources_non_forked/vim-jade/ftplugin/jade.vim b/sources_non_forked/vim-jade/ftplugin/jade.vim deleted file mode 100644 index 235770d0..00000000 --- a/sources_non_forked/vim-jade/ftplugin/jade.vim +++ /dev/null @@ -1,55 +0,0 @@ -" Vim filetype plugin -" Language: Jade -" Maintainer: Joshua Borton -" Credits: Tim Pope - -" Only do this when not done yet for this buffer -if exists("b:did_ftplugin") - finish -endif - -let s:save_cpo = &cpo -set cpo-=C - -" Define some defaults in case the included ftplugins don't set them. -let s:undo_ftplugin = "" -let s:browsefilter = "All Files (*.*)\t*.*\n" -let s:match_words = "" - -runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim -unlet! b:did_ftplugin - -" Override our defaults if these were set by an included ftplugin. -if exists("b:undo_ftplugin") - let s:undo_ftplugin = b:undo_ftplugin - unlet b:undo_ftplugin -endif -if exists("b:browsefilter") - let s:browsefilter = b:browsefilter - unlet b:browsefilter -endif -if exists("b:match_words") - let s:match_words = b:match_words - unlet b:match_words -endif - -" Change the browse dialog on Win32 to show mainly Haml-related files -if has("gui_win32") - let b:browsefilter="Jade Files (*.jade)\t*.jade\n" . s:browsefilter -endif - -" Load the combined list of match_words for matchit.vim -if exists("loaded_matchit") - let b:match_words = s:match_words -endif - -setlocal comments=://-,:// commentstring=//\ %s - -setlocal suffixesadd+=.jade - -let b:undo_ftplugin = "setl cms< com< " - \ " | unlet! b:browsefilter b:match_words | " . s:undo_ftplugin - -let &cpo = s:save_cpo - -" vim:set sw=2: diff --git a/sources_non_forked/vim-jade/indent/jade.vim b/sources_non_forked/vim-jade/indent/jade.vim deleted file mode 100644 index 12b9e2ed..00000000 --- a/sources_non_forked/vim-jade/indent/jade.vim +++ /dev/null @@ -1,70 +0,0 @@ -" Vim indent file -" Language: Jade -" Maintainer: Joshua Borton -" Credits: Tim Pope (vim-jade) -" Last Change: 2010 Sep 22 - -if exists("b:did_indent") - finish -endif - -unlet! b:did_indent -let b:did_indent = 1 - -setlocal autoindent -setlocal indentexpr=GetJadeIndent() -setlocal indentkeys=o,O,*,},],0),!^F - -" Only define the function once. -if exists("*GetJadeIndent") - finish -endif - -let s:attributes = '\%((.\{-\})\)' -let s:tag = '\([%.#][[:alnum:]_-]\+\|'.s:attributes.'\)*[<>]*' - -if !exists('g:jade_self_closing_tags') - let g:jade_self_closing_tags = 'meta|link|img|hr|br|input' -endif - -setlocal formatoptions+=r -setlocal comments+=n:\| - -function! GetJadeIndent() - let lnum = prevnonblank(v:lnum-1) - if lnum == 0 - return 0 - endif - let line = substitute(getline(lnum),'\s\+$','','') - let cline = substitute(substitute(getline(v:lnum),'\s\+$','',''),'^\s\+','','') - let lastcol = strlen(line) - let line = substitute(line,'^\s\+','','') - let indent = indent(lnum) - let cindent = indent(v:lnum) - let increase = indent + &sw - if indent == indent(lnum) - let indent = cindent <= indent ? -1 : increase - endif - - let group = synIDattr(synID(lnum,lastcol,1),'name') - - if line =~ '^!!!' - return indent - elseif line =~ '^/\%(\[[^]]*\]\)\=$' - return increase - elseif line =~ '^\%(if\|else\|unless\|for\|each\|block\|mixin\|append\|case\|when\)' - return increase - elseif line =~ '^'.s:tag.'[&!]\=[=~-].*,\s*$' - return increase - elseif line == '-#' - return increase - elseif line =~? '^\v%('.g:jade_self_closing_tags.')>' - return indent - elseif group =~? '\v^%(jadeAttributesDelimiter|jadeClass|jadeId|htmlTagName|htmlSpecialTagName|jadeFilter)$' - return increase - else - return indent - endif -endfunction - -" vim:set sw=2: diff --git a/sources_non_forked/vim-jade/syntax/jade.vim b/sources_non_forked/vim-jade/syntax/jade.vim deleted file mode 100644 index d61e4f01..00000000 --- a/sources_non_forked/vim-jade/syntax/jade.vim +++ /dev/null @@ -1,89 +0,0 @@ -" Vim syntax file -" Language: Jade -" Maintainer: Joshua Borton -" Credits: Tim Pope -" Filenames: *.jade - -if exists("b:current_syntax") - finish -endif - -if !exists("main_syntax") - let main_syntax = 'jade' -endif - -runtime! syntax/html.vim -runtime! syntax/html/html5.vim -silent! syntax include @htmlCoffeescript syntax/coffee.vim -unlet! b:current_syntax -silent! syntax include @htmlStylus syntax/stylus.vim -unlet! b:current_syntax -silent! syntax include @htmlMarkdown syntax/markdown.vim -unlet! b:current_syntax - -syn case match - -syn region javascriptParenthesisBlock start="(" end=")" contains=@htmlJavascript contained keepend -syn cluster htmlJavascript add=javascriptParenthesisBlock - -syn region jadeJavascript matchgroup=jadeJavascriptOutputChar start="[!&]\==\|\~" skip=",\s*$" end="$" contained contains=@htmlJavascript keepend -syn region jadeJavascript matchgroup=jadeJavascriptChar start="-" skip=",\s*$" end="$" contained contains=@htmlJavascript keepend -syn cluster jadeTop contains=jadeBegin,jadeComment,jadeHtmlComment,jadeJavascript -syn match jadeBegin "^\s*\%([<>]\|&[^=~ ]\)\@!" nextgroup=jadeTag,jadeClassChar,jadeIdChar,jadePlainChar,jadeJavascript,jadeScriptConditional,jadeScriptStatement -syn match jadeTag "+\?\w\+\%(:\w\+\)\=" contained contains=htmlTagName,htmlSpecialTagName nextgroup=@jadeComponent -syn cluster jadeComponent contains=jadeAttributes,jadeIdChar,jadeBlockExpansionChar,jadeClassChar,jadePlainChar,jadeJavascript -syn match jadeComment '\s*\/\/.*$' -syn region jadeHtmlComment start="^\z(\s*\)/" end="^\%(\z1\s\|\s*$\)\@!" -syn region jadeAttributes matchgroup=jadeAttributesDelimiter start="(" end=")" contained contains=@htmlJavascript,jadeHtmlArg,htmlArg,htmlEvent,htmlCssDefinition nextgroup=@jadeComponent -syn match jadeClassChar "\." contained nextgroup=jadeClass -syn match jadeBlockExpansionChar ":\s" contained nextgroup=jadeTag -syn match jadeIdChar "#{\@!" contained nextgroup=jadeId -syn match jadeClass "\%(\w\|-\)\+" contained nextgroup=@jadeComponent -syn match jadeId "\%(\w\|-\)\+" contained nextgroup=@jadeComponent -syn region jadeDocType start="^\s*\(!!!\|doctype\)" end="$" -" Unless I'm mistaken, syntax/html.vim requires -" that the = sign be present for these matches. -" This adds the matches back for jade. -syn keyword jadeHtmlArg contained href title - -syn match jadePlainChar "\\" contained -syn region jadeInterpolation matchgroup=jadeInterpolationDelimiter start="#{" end="}" contains=@htmlJavascript -syn match jadeInterpolationEscape "\\\@[?!]\@!" -syn match jadeScriptStatement "\<\%(each\|block\|prepend\|append\|mixin\|extends\|include\)\>[?!]\@!" - -syn region jadeJavascript start="^\z(\s*\)script\%(:\w\+\)\=" end="^\%(\z1\s\|\s*$\)\@!" contains=@htmlJavascript,jadeJavascriptTag keepend -syn region jadeJavascriptTag contained start="^\z(\s*\)script\%(:\w\+\)\=" end="$" contains=jadeBegin,jadeTag -syn region jadeCssBlock start="^\z(\s*\)style" nextgroup=@jadeComponent,jadeError end="^\%(\z1\s\|\s*$\)\@!" contains=@jadeTop,@htmlCss keepend - -syn match jadeError "\$" contained - -hi def link jadePlainChar Special -hi def link jadeScriptConditional PreProc -hi def link jadeScriptStatement PreProc -hi def link jadeHtmlArg htmlArg -hi def link jadeAttributeString String -hi def link jadeAttributesDelimiter Identifier -hi def link jadeIdChar Special -hi def link jadeClassChar Special -hi def link jadeBlockExpansionChar Special -hi def link jadeId Identifier -hi def link jadeClass Type -hi def link jadeInterpolationDelimiter Delimiter -hi def link jadeFilter PreProc -hi def link jadeDocType PreProc -hi def link jadeComment Comment -hi def link jadeHtmlComment jadeComment - -let b:current_syntax = "jade" - -if main_syntax == "jade" - unlet main_syntax -endif diff --git a/sources_non_forked/vim-marked b/sources_non_forked/vim-marked new file mode 160000 index 00000000..a7c1cba2 --- /dev/null +++ b/sources_non_forked/vim-marked @@ -0,0 +1 @@ +Subproject commit a7c1cba232cabd96af800f82aad21cc180a09764 diff --git a/sources_non_forked/vim-marked/README.markdown b/sources_non_forked/vim-marked/README.markdown deleted file mode 100644 index 2ce98952..00000000 --- a/sources_non_forked/vim-marked/README.markdown +++ /dev/null @@ -1,22 +0,0 @@ -# marked.vim - -Open the current Markdown buffer in [Marked.app](http://markedapp.com/). - -## Usage - -This plugin adds the following commands to Markdown buffers: - - :MarkedOpen[!] Open the current Markdown buffer in Marked.app. - Call with a bang to prevent Marked.app from stealing - focus from Vim. - - :MarkedQuit Close the current Markdown buffer in Marked.app. - Quit Marked.app if no other documents are open. - -If you run `:MarkedOpen`, the document in Marked.app will be automatically -closed when Vim exists, and Marked.app will quit if no other documents are -open. - -## License - -Same as Vim itself, see `:help license`. diff --git a/sources_non_forked/vim-marked/plugin/marked.vim b/sources_non_forked/vim-marked/plugin/marked.vim deleted file mode 100644 index 1009d513..00000000 --- a/sources_non_forked/vim-marked/plugin/marked.vim +++ /dev/null @@ -1,55 +0,0 @@ -" marked.vim -" Author: Joshua Priddle -" URL: https://github.com/itspriddle/vim-marked -" Version: 0.4.0 -" License: Same as Vim itself (see :help license) - -if &cp || exists("g:marked_loaded") && g:marked_loaded - finish -endif -let g:marked_loaded = 1 -let s:save_cpo = &cpo -set cpo&vim - -function s:OpenMarked(background) - let l:filename = expand("%:p") - silent exe "!open -a Marked.app ".(a:background ? '-g' : '')." '".l:filename."'" - - silent exe "augroup marked_autoclose_".l:filename - autocmd! - silent exe 'autocmd VimLeavePre * call s:QuitMarked("'.l:filename.'")' - augroup END - redraw! -endfunction - -function s:QuitMarked(path) - silent exe "augroup marked_autoclose_".a:path - autocmd! - augroup END - silent exe "augroup! marked_autoclose_".a:path - - let cmd = " -e 'try'" - let cmd .= " -e 'if application \"Marked\" is running then'" - let cmd .= " -e 'tell application \"Marked\"'" - let cmd .= " -e 'close (first document whose path is equal to \"".a:path."\")'" - let cmd .= " -e 'if count of every window is equal to 0 then'" - let cmd .= " -e 'quit'" - let cmd .= " -e 'end if'" - let cmd .= " -e 'end tell'" - let cmd .= " -e 'end if'" - let cmd .= " -e 'end try'" - - silent exe "!osascript ".cmd - redraw! -endfunction - -augroup marked_commands - autocmd! - autocmd FileType markdown,mkd command! -buffer -bang MarkedOpen :call s:OpenMarked(0) - autocmd FileType markdown,mkd command! -buffer MarkedQuit :call s:QuitMarked(expand('%:p')) -augroup END - -let &cpo = s:save_cpo -unlet s:save_cpo - -" vim:ft=vim:fdm=marker:ts=2:sw=2:sts=2:et From 75efc211743a7a8f1da23f46763c2cd4c405f6a2 Mon Sep 17 00:00:00 2001 From: Maksim Pecherskiy Date: Sat, 19 Apr 2014 14:26:49 -0700 Subject: [PATCH 08/23] Adding my overrides. --- .gitignore | 1 - my_configs.vim | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 my_configs.vim diff --git a/.gitignore b/.gitignore index 8d66da36..5fb7daf6 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,3 @@ sources_non_forked/ack.vim/.netrwhist temp_dirs/yankring_history_v2.txt sources_forked/yankring/doc/tags sources_non_forked/tlib/doc/tags -my_configs.vim diff --git a/my_configs.vim b/my_configs.vim new file mode 100644 index 00000000..9f39af4f --- /dev/null +++ b/my_configs.vim @@ -0,0 +1,91 @@ +set mouse=a +colorscheme molokai +set background=dark +let g:airline_theme = 'molokai' +let g:molokai_original = 1 +set smartindent +autocmd BufWritePre * :FixWhitespace +set timeoutlen=2000 +set pastetoggle= +inoremap jk +nnoremap ; : +#set colorcolumn=80 +" Open Vim, be able to undo +set undodir=$HOME/.vim/undo +set undolevels=1000 +set undoreload=10000 + +" System wide copy paste +set clipboard=unnamedplus + +" Make Y behave like other capitals +map Y y$ +" +" " Start scrolling 3 lines before the border +set scrolloff=3 +" +" " Automatically reread files that have been changed externally +set autoread +" +" " Make ^e and ^y scroll 3 lines instead of 1 +nnoremap 3 +nnoremap 3 +" +" " don't move the cursor after pasting +" " (by jumping to back start of previously changed text) +noremap p p`[ +noremap P P`[ +" +" " Reselect visual block after indent/outdent +vnoremap < >gv + +" Turn off the christmas lights +nnoremap :nohlsearch +" Allow saving as root by w!! +cmap w!! %!sudo tee > /dev/null % + +" Finde merge conflict markers +nmap cf /\v^[<=>]{7}( .*\|$) + +" Use Marked.app to preview Markdown files... +function! s:setupMarkup() + nnoremap p :silent !open -a Marked.app '%:p' +endfunction + +" Navigate splits more easily +map h +map j +map k +map l + +" " These makes j/k move up/down a screen line instead of a physical file line (for wrapped lines) +nmap k gk +nmap j gj + +" autocmd BufEnter * if &modifiable | NERDTreeFind | wincmd p | endif + +" Easymotion {{{ +let g:EasyMotion_do_mapping = 0 + +nnoremap f :call EasyMotion#F(0, 0) +onoremap f :call EasyMotion#F(0, 0) +vnoremap f :call EasyMotion#F(1, 0) + +nnoremap F :call EasyMotion#F(0, 1) +onoremap F :call EasyMotion#F(0, 1) +vnoremap F :call EasyMotion#F(1, 1) + +onoremap t :call EasyMotion#T(0, 0) +onoremap T :call EasyMotion#T(0, 1) +" }}} + + +source ~/.vim_runtime/maximum_awesome_vimrc + + +set tabstop=2 +set shiftwidth=2 +set expandtab +set smartindent +set autoindent From e16cdac24bf133ae3b47c1c0c98a8b7c5832971c Mon Sep 17 00:00:00 2001 From: Maksim Pecherskiy Date: Wed, 30 Apr 2014 12:52:43 -0700 Subject: [PATCH 09/23] Remove traiing white space. --- sources_non_forked/vim-trailing-whitespace | 1 - 1 file changed, 1 deletion(-) delete mode 160000 sources_non_forked/vim-trailing-whitespace diff --git a/sources_non_forked/vim-trailing-whitespace b/sources_non_forked/vim-trailing-whitespace deleted file mode 160000 index 6bfea000..00000000 --- a/sources_non_forked/vim-trailing-whitespace +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6bfea0006a364c60e5e7e0daecb9a3899312cb58 From 40480dde6812a0632a9999d70ee8c789bd532235 Mon Sep 17 00:00:00 2001 From: Maksim Pecherskiy Date: Wed, 30 Apr 2014 12:53:36 -0700 Subject: [PATCH 10/23] Adding as not submodule. --- .../vim-trailing-whitespace/.gitignore | 1 + .../vim-trailing-whitespace/README | 9 +++++++++ .../doc/trailing-whitespace.txt | 16 +++++++++++++++ .../plugin/trailing-whitespace.vim | 20 +++++++++++++++++++ 4 files changed, 46 insertions(+) create mode 100644 sources_non_forked/vim-trailing-whitespace/.gitignore create mode 100644 sources_non_forked/vim-trailing-whitespace/README create mode 100644 sources_non_forked/vim-trailing-whitespace/doc/trailing-whitespace.txt create mode 100644 sources_non_forked/vim-trailing-whitespace/plugin/trailing-whitespace.vim diff --git a/sources_non_forked/vim-trailing-whitespace/.gitignore b/sources_non_forked/vim-trailing-whitespace/.gitignore new file mode 100644 index 00000000..926ccaaf --- /dev/null +++ b/sources_non_forked/vim-trailing-whitespace/.gitignore @@ -0,0 +1 @@ +doc/tags diff --git a/sources_non_forked/vim-trailing-whitespace/README b/sources_non_forked/vim-trailing-whitespace/README new file mode 100644 index 00000000..9fd024b6 --- /dev/null +++ b/sources_non_forked/vim-trailing-whitespace/README @@ -0,0 +1,9 @@ +This plugin causes all trailing whitespace to be highlighted in red. + +To fix the whitespace errors, just call :FixWhitespace. By default it +operates on the entire file. Pass a range (or use V to select some lines) +to restrict the portion of the file that gets fixed. + +The repo is at http://github.com/bronson/vim-trailing-whitespace + +Originally based on http://vim.wikia.com/wiki/Highlight_unwanted_spaces diff --git a/sources_non_forked/vim-trailing-whitespace/doc/trailing-whitespace.txt b/sources_non_forked/vim-trailing-whitespace/doc/trailing-whitespace.txt new file mode 100644 index 00000000..8974e980 --- /dev/null +++ b/sources_non_forked/vim-trailing-whitespace/doc/trailing-whitespace.txt @@ -0,0 +1,16 @@ +*trailing-whitespace.txt* trailing-whitespace + + +This plugin causes all trailing whitespace to be highlighted in red. + + + *FixWhitespace* + +To fix the whitespace errors, just call :FixWhitespace. By default it +operates on the entire file. Pass a range (or use V to select some lines) +to restrict the portion of the file that gets fixed. + +The repo is at http://github.com/bronson/vim-trailing-whitespace + +Originally based on http://vim.wikia.com/wiki/Highlight_unwanted_spaces + diff --git a/sources_non_forked/vim-trailing-whitespace/plugin/trailing-whitespace.vim b/sources_non_forked/vim-trailing-whitespace/plugin/trailing-whitespace.vim new file mode 100644 index 00000000..5edc29b9 --- /dev/null +++ b/sources_non_forked/vim-trailing-whitespace/plugin/trailing-whitespace.vim @@ -0,0 +1,20 @@ +if exists('loaded_trailing_whitespace_plugin') | finish | endif +let loaded_trailing_whitespace_plugin = 1 + +" Highlight EOL whitespace, http://vim.wikia.com/wiki/Highlight_unwanted_spaces +highlight ExtraWhitespace ctermbg=darkred guibg=#382424 +autocmd ColorScheme * highlight ExtraWhitespace ctermbg=red guibg=red +autocmd BufWinEnter * match ExtraWhitespace /\s\+$/ + +" The above flashes annoyingly while typing, be calmer in insert mode +autocmd InsertLeave * match ExtraWhitespace /\s\+$/ +autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@FixWhitespace(,) From 893c9ae4a994ab4b6dda6773c4cc13d9131beaac Mon Sep 17 00:00:00 2001 From: Maksim Pecherskiy Date: Sat, 3 May 2014 11:29:01 -0700 Subject: [PATCH 11/23] Removing vim-jade. --- sources_non_forked/vim-jade | 1 - 1 file changed, 1 deletion(-) delete mode 160000 sources_non_forked/vim-jade diff --git a/sources_non_forked/vim-jade b/sources_non_forked/vim-jade deleted file mode 160000 index 57635898..00000000 --- a/sources_non_forked/vim-jade +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 57635898548d0a5cbf014764e3d9ba1c1fb0a5c8 From c32459731b9887ba5252bfb9628d9692cdf6da25 Mon Sep 17 00:00:00 2001 From: Maksim Pecherskiy Date: Sat, 3 May 2014 11:29:12 -0700 Subject: [PATCH 12/23] Adding proper vim-jade. --- sources_non_forked/vim-jade/README.markdown | 19 ++++ sources_non_forked/vim-jade/ftdetect/jade.vim | 2 + sources_non_forked/vim-jade/ftplugin/jade.vim | 55 ++++++++++++ sources_non_forked/vim-jade/indent/jade.vim | 70 +++++++++++++++ sources_non_forked/vim-jade/syntax/jade.vim | 87 +++++++++++++++++++ 5 files changed, 233 insertions(+) create mode 100644 sources_non_forked/vim-jade/README.markdown create mode 100644 sources_non_forked/vim-jade/ftdetect/jade.vim create mode 100644 sources_non_forked/vim-jade/ftplugin/jade.vim create mode 100644 sources_non_forked/vim-jade/indent/jade.vim create mode 100644 sources_non_forked/vim-jade/syntax/jade.vim diff --git a/sources_non_forked/vim-jade/README.markdown b/sources_non_forked/vim-jade/README.markdown new file mode 100644 index 00000000..2c2222ed --- /dev/null +++ b/sources_non_forked/vim-jade/README.markdown @@ -0,0 +1,19 @@ +# vim-jade # + +Vim syntax highlighting for Jade templates. + +Installation +------------ + +I prefer to install plugins using Tim Pope's +[pathogen.vim](https://github.com/tpope/vim-pathogen). Installation using +pathogen is quite simple. + + cd ~/.vim/bundle + git clone git://github.com/digitaltoad/vim-jade.git + +If you do not want to use pathogen. You can always install vim-jade in the +normal manner by copying each directory to your ~/.vim directory. Make sure +not to overwrite any existing directory of the same name and instead copy only +the contents of the source directory to the directory of the same name in your +~/.vim directory. diff --git a/sources_non_forked/vim-jade/ftdetect/jade.vim b/sources_non_forked/vim-jade/ftdetect/jade.vim new file mode 100644 index 00000000..c21dcff7 --- /dev/null +++ b/sources_non_forked/vim-jade/ftdetect/jade.vim @@ -0,0 +1,2 @@ +" Jade +autocmd BufNewFile,BufReadPost *.jade set filetype=jade diff --git a/sources_non_forked/vim-jade/ftplugin/jade.vim b/sources_non_forked/vim-jade/ftplugin/jade.vim new file mode 100644 index 00000000..235770d0 --- /dev/null +++ b/sources_non_forked/vim-jade/ftplugin/jade.vim @@ -0,0 +1,55 @@ +" Vim filetype plugin +" Language: Jade +" Maintainer: Joshua Borton +" Credits: Tim Pope + +" Only do this when not done yet for this buffer +if exists("b:did_ftplugin") + finish +endif + +let s:save_cpo = &cpo +set cpo-=C + +" Define some defaults in case the included ftplugins don't set them. +let s:undo_ftplugin = "" +let s:browsefilter = "All Files (*.*)\t*.*\n" +let s:match_words = "" + +runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim +unlet! b:did_ftplugin + +" Override our defaults if these were set by an included ftplugin. +if exists("b:undo_ftplugin") + let s:undo_ftplugin = b:undo_ftplugin + unlet b:undo_ftplugin +endif +if exists("b:browsefilter") + let s:browsefilter = b:browsefilter + unlet b:browsefilter +endif +if exists("b:match_words") + let s:match_words = b:match_words + unlet b:match_words +endif + +" Change the browse dialog on Win32 to show mainly Haml-related files +if has("gui_win32") + let b:browsefilter="Jade Files (*.jade)\t*.jade\n" . s:browsefilter +endif + +" Load the combined list of match_words for matchit.vim +if exists("loaded_matchit") + let b:match_words = s:match_words +endif + +setlocal comments=://-,:// commentstring=//\ %s + +setlocal suffixesadd+=.jade + +let b:undo_ftplugin = "setl cms< com< " + \ " | unlet! b:browsefilter b:match_words | " . s:undo_ftplugin + +let &cpo = s:save_cpo + +" vim:set sw=2: diff --git a/sources_non_forked/vim-jade/indent/jade.vim b/sources_non_forked/vim-jade/indent/jade.vim new file mode 100644 index 00000000..12b9e2ed --- /dev/null +++ b/sources_non_forked/vim-jade/indent/jade.vim @@ -0,0 +1,70 @@ +" Vim indent file +" Language: Jade +" Maintainer: Joshua Borton +" Credits: Tim Pope (vim-jade) +" Last Change: 2010 Sep 22 + +if exists("b:did_indent") + finish +endif + +unlet! b:did_indent +let b:did_indent = 1 + +setlocal autoindent +setlocal indentexpr=GetJadeIndent() +setlocal indentkeys=o,O,*,},],0),!^F + +" Only define the function once. +if exists("*GetJadeIndent") + finish +endif + +let s:attributes = '\%((.\{-\})\)' +let s:tag = '\([%.#][[:alnum:]_-]\+\|'.s:attributes.'\)*[<>]*' + +if !exists('g:jade_self_closing_tags') + let g:jade_self_closing_tags = 'meta|link|img|hr|br|input' +endif + +setlocal formatoptions+=r +setlocal comments+=n:\| + +function! GetJadeIndent() + let lnum = prevnonblank(v:lnum-1) + if lnum == 0 + return 0 + endif + let line = substitute(getline(lnum),'\s\+$','','') + let cline = substitute(substitute(getline(v:lnum),'\s\+$','',''),'^\s\+','','') + let lastcol = strlen(line) + let line = substitute(line,'^\s\+','','') + let indent = indent(lnum) + let cindent = indent(v:lnum) + let increase = indent + &sw + if indent == indent(lnum) + let indent = cindent <= indent ? -1 : increase + endif + + let group = synIDattr(synID(lnum,lastcol,1),'name') + + if line =~ '^!!!' + return indent + elseif line =~ '^/\%(\[[^]]*\]\)\=$' + return increase + elseif line =~ '^\%(if\|else\|unless\|for\|each\|block\|mixin\|append\|case\|when\)' + return increase + elseif line =~ '^'.s:tag.'[&!]\=[=~-].*,\s*$' + return increase + elseif line == '-#' + return increase + elseif line =~? '^\v%('.g:jade_self_closing_tags.')>' + return indent + elseif group =~? '\v^%(jadeAttributesDelimiter|jadeClass|jadeId|htmlTagName|htmlSpecialTagName|jadeFilter)$' + return increase + else + return indent + endif +endfunction + +" vim:set sw=2: diff --git a/sources_non_forked/vim-jade/syntax/jade.vim b/sources_non_forked/vim-jade/syntax/jade.vim new file mode 100644 index 00000000..88a67653 --- /dev/null +++ b/sources_non_forked/vim-jade/syntax/jade.vim @@ -0,0 +1,87 @@ +" Vim syntax file +" Language: Jade +" Maintainer: Joshua Borton +" Credits: Tim Pope +" Filenames: *.jade + +if exists("b:current_syntax") + finish +endif + +if !exists("main_syntax") + let main_syntax = 'jade' +endif + +silent! syntax include @htmlCoffeescript syntax/coffee.vim +unlet! b:current_syntax +silent! syntax include @htmlStylus syntax/stylus.vim +unlet! b:current_syntax +silent! syntax include @htmlMarkdown syntax/markdown.vim +unlet! b:current_syntax + +syn case match + +syn region javascriptParenthesisBlock start="(" end=")" contains=@htmlJavascript contained keepend +syn cluster htmlJavascript add=javascriptParenthesisBlock + +syn region jadeJavascript matchgroup=jadeJavascriptOutputChar start="[!&]\==\|\~" skip=",\s*$" end="$" contained contains=@htmlJavascript keepend +syn region jadeJavascript matchgroup=jadeJavascriptChar start="-" skip=",\s*$" end="$" contained contains=@htmlJavascript keepend +syn cluster jadeTop contains=jadeBegin,jadeComment,jadeHtmlComment,jadeJavascript +syn match jadeBegin "^\s*\%([<>]\|&[^=~ ]\)\@!" nextgroup=jadeTag,jadeClassChar,jadeIdChar,jadePlainChar,jadeJavascript,jadeScriptConditional,jadeScriptStatement +syn match jadeTag "+\?\w\+\%(:\w\+\)\=" contained contains=htmlTagName,htmlSpecialTagName nextgroup=@jadeComponent +syn cluster jadeComponent contains=jadeAttributes,jadeIdChar,jadeBlockExpansionChar,jadeClassChar,jadePlainChar,jadeJavascript +syn match jadeComment '\s*\/\/.*$' +syn region jadeHtmlComment start="^\z(\s*\)/" end="^\%(\z1\s\|\s*$\)\@!" +syn region jadeAttributes matchgroup=jadeAttributesDelimiter start="(" end=")" contained contains=@htmlJavascript,jadeHtmlArg,htmlArg,htmlEvent,htmlCssDefinition nextgroup=@jadeComponent +syn match jadeClassChar "\." contained nextgroup=jadeClass +syn match jadeBlockExpansionChar ":\s" contained nextgroup=jadeTag +syn match jadeIdChar "#{\@!" contained nextgroup=jadeId +syn match jadeClass "\%(\w\|-\)\+" contained nextgroup=@jadeComponent +syn match jadeId "\%(\w\|-\)\+" contained nextgroup=@jadeComponent +syn region jadeDocType start="^\s*\(!!!\|doctype\)" end="$" +" Unless I'm mistaken, syntax/html.vim requires +" that the = sign be present for these matches. +" This adds the matches back for jade. +syn keyword jadeHtmlArg contained href title + +syn match jadePlainChar "\\" contained +syn region jadeInterpolation matchgroup=jadeInterpolationDelimiter start="#{" end="}" contains=@htmlJavascript +syn match jadeInterpolationEscape "\\\@[?!]\@!" +syn match jadeScriptStatement "\<\%(each\|block\|prepend\|append\|mixin\|extends\|include\)\>[?!]\@!" + +syn region jadeJavascript start="^\z(\s*\)script\%(:\w\+\)\=" end="^\%(\z1\s\|\s*$\)\@!" contains=@htmlJavascript,jadeJavascriptTag keepend +syn region jadeJavascriptTag contained start="^\z(\s*\)script\%(:\w\+\)\=" end="$" contains=jadeBegin,jadeTag +syn region jadeCssBlock start="^\z(\s*\)style" nextgroup=@jadeComponent,jadeError end="^\%(\z1\s\|\s*$\)\@!" contains=@jadeTop,@htmlCss keepend + +syn match jadeError "\$" contained + +hi def link jadePlainChar Special +hi def link jadeScriptConditional PreProc +hi def link jadeScriptStatement PreProc +hi def link jadeHtmlArg htmlArg +hi def link jadeAttributeString String +hi def link jadeAttributesDelimiter Identifier +hi def link jadeIdChar Special +hi def link jadeClassChar Special +hi def link jadeBlockExpansionChar Special +hi def link jadeId Identifier +hi def link jadeClass Type +hi def link jadeInterpolationDelimiter Delimiter +hi def link jadeFilter PreProc +hi def link jadeDocType PreProc +hi def link jadeComment Comment +hi def link jadeHtmlComment jadeComment + +let b:current_syntax = "jade" + +if main_syntax == "jade" + unlet main_syntax +endif From bff94dc74a108625c059261e987a68fa1b20ede4 Mon Sep 17 00:00:00 2001 From: Maksim Pecherskiy Date: Mon, 5 May 2014 08:45:16 -0700 Subject: [PATCH 13/23] Update reamde. --- README.md | 56 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 77b710d0..5a6f068c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # The Ultimate vimrc +## Important -- set iterm profile -> terminal -> report terminal type: xterm-256 + Over the last 8 years I have used and tweaked Vim. This is my Ultimate vimrc. There are two versions: @@ -100,13 +102,13 @@ After you have installed the setup you can create **~/.vim_runtime/my_configs.vi ~/.vim_runtime (master)> cat my_configs.vim map ct :cd ~/Desktop/Todoist/todoist - map cw :cd ~/Desktop/Wedoist/wedoist + map cw :cd ~/Desktop/Wedoist/wedoist You can also install your own plugins, for instance, via pathogen we can install [vim-rails](https://github.com/tpope/vim-rails): cd ~/.vim_runtime git clone git://github.com/tpope/vim-rails.git sources_non_forked/vim-rails - + Now you have vim-rails installed ;-) @@ -115,7 +117,7 @@ Now you have vim-rails installed ;-) ### Plugin related mappings Open [bufexplorer](https://github.com/vim-scripts/bufexplorer.zip) and see and manage the current buffers: - + map o :BufExplorer Open [MRU.vim](https://github.com/vim-scripts/mru.vim) and see the recently open files: @@ -123,7 +125,7 @@ Open [MRU.vim](https://github.com/vim-scripts/mru.vim) and see the recently open map f :MRU Open [ctrlp.vim](https://github.com/kien/ctrlp.vim) plugin: - + let g:ctrlp_map = '' Open [PeepOpen](https://peepcode.com/products/peepopen) plugin: @@ -133,7 +135,7 @@ Open [PeepOpen](https://peepcode.com/products/peepopen) plugin: Managing the [NERD Tree](https://github.com/scrooloose/nerdtree) plugin: map nn :NERDTreeToggle - map nb :NERDTreeFromBookmark + map nb :NERDTreeFromBookmark map nf :NERDTreeFind ### Normal mode mappings @@ -146,65 +148,65 @@ Treat long lines as break lines (useful when moving around in them): map j gj map k gk - + Map `` to `/` (search) and `+` to `?` (backwards search): - + map / map ? map :noh Disable highlight when `` is pressed: - + map :noh Smart way to move between windows: - + map j map k map h map l Closing of current buffer(s): - + " Close current buffer map bd :Bclose - + " Close all buffers map ba :1,1000 bd! - + Useful mappings for managing tabs: - + map tn :tabnew map to :tabonly map tc :tabclose - map tm :tabmove - + map tm :tabmove + " Opens a new tab with the current buffer's path " Super useful when editing files in the same directory map te :tabedit =expand("%:p:h")/ - + Switch CWD to the directory of the open buffer: - + map cd :cd %:p:h:pwd - + Open vimgrep and put the cursor in the right position: - + map g :vimgrep // **/*. Vimgreps in the current file: - + map :vimgrep // % Remove the Windows ^M - when the encodings gets messed up: - + noremap m mmHmt:%s///ge'tzt'm - + Quickly open a buffer for scripbble: - + map q :e ~/buffer Toggle paste mode on and off: - + map pp :setlocal paste! @@ -248,7 +250,7 @@ Surround the visual selection in parenthesis/brackets/etc.: vnoremap $$ `>a"` vnoremap $q `>a'` vnoremap $e `>a"` - + ### Command line mappings @@ -267,7 +269,7 @@ Bash like keys for the command line: Write the file as sudo (only on Unix). Super useful when you open a file and you don't have permissions to save your changes. [Vim tip](http://vim.wikia.com/wiki/Su-write): - :W + :W ### Spell checking @@ -282,7 +284,7 @@ Shortcuts using `` instead of special chars map sa zg map s? z= -### Cope +### Cope Do :help cope if you are unsure what cope is. It's super useful! When you search with vimgrep, display your results in cope by doing: From 2bdfc7b8d6b426f38dd77a17a142ba77d563bb1e Mon Sep 17 00:00:00 2001 From: Maksim Pecherskiy Date: Wed, 14 May 2014 11:15:17 -0700 Subject: [PATCH 14/23] Solarized theme switch. --- my_configs.vim | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/my_configs.vim b/my_configs.vim index 9f39af4f..a8267b64 100644 --- a/my_configs.vim +++ b/my_configs.vim @@ -1,8 +1,11 @@ set mouse=a -colorscheme molokai +"colorscheme molokai +"set background=dark +"let g:molokai_original = 1 +colorscheme solarized +syntax enable set background=dark let g:airline_theme = 'molokai' -let g:molokai_original = 1 set smartindent autocmd BufWritePre * :FixWhitespace set timeoutlen=2000 From 6353f696e51caa135589656012c132c44bbda239 Mon Sep 17 00:00:00 2001 From: Maksim Pecherskiy Date: Wed, 11 Jun 2014 09:54:26 -0700 Subject: [PATCH 15/23] Reorganizing. --- my_configs.vim | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/my_configs.vim b/my_configs.vim index a8267b64..1823396a 100644 --- a/my_configs.vim +++ b/my_configs.vim @@ -1,10 +1,10 @@ set mouse=a -"colorscheme molokai -"set background=dark -"let g:molokai_original = 1 -colorscheme solarized -syntax enable +colorscheme molokai set background=dark +let g:molokai_original = 1 +"colorscheme solarized +"syntax enable +"set background=dark let g:airline_theme = 'molokai' set smartindent autocmd BufWritePre * :FixWhitespace From 2deb03525483fc1fbb2b8fafe0fc20eb6036e780 Mon Sep 17 00:00:00 2001 From: Maksim Pecherskiy Date: Thu, 7 Aug 2014 19:42:41 -0400 Subject: [PATCH 16/23] Cleaning deps. --- sources_non_forked/syntastic/.gitignore | 4 + sources_non_forked/syntastic/CONTRIBUTING.md | 105 ++ sources_non_forked/syntastic/LICENCE | 13 + sources_non_forked/syntastic/README.markdown | 305 ++++ .../syntastic/_assets/screenshot_1.png | Bin 0 -> 92425 bytes .../syntastic/autoload/syntastic/c.vim | 332 ++++ .../syntastic/autoload/syntastic/log.vim | 178 ++ .../autoload/syntastic/postprocess.vim | 54 + .../autoload/syntastic/preprocess.vim | 142 ++ .../syntastic/autoload/syntastic/util.vim | 286 +++ .../syntastic/doc/syntastic.txt | 770 ++++++++ .../syntastic/plugin/syntastic.vim | 610 +++++++ .../plugin/syntastic/autoloclist.vim | 38 + .../syntastic/plugin/syntastic/balloons.vim | 67 + .../syntastic/plugin/syntastic/checker.vim | 179 ++ .../syntastic/plugin/syntastic/cursor.vim | 138 ++ .../plugin/syntastic/highlighting.vim | 104 ++ .../syntastic/plugin/syntastic/loclist.vim | 400 +++++ .../syntastic/plugin/syntastic/modemap.vim | 100 ++ .../syntastic/plugin/syntastic/notifiers.vim | 86 + .../syntastic/plugin/syntastic/registry.vim | 265 +++ .../syntastic/plugin/syntastic/signs.vim | 138 ++ .../syntax_checkers/actionscript/mxmlc.vim | 67 + .../syntastic/syntax_checkers/ada/gcc.vim | 47 + .../applescript/osacompile.vim | 49 + .../syntax_checkers/arduino/avrgcc.vim | 26 + .../syntax_checkers/asciidoc/asciidoc.vim | 47 + .../syntastic/syntax_checkers/asm/gcc.vim | 54 + .../syntax_checkers/bemhtml/bemhtmllint.vim | 35 + .../syntastic/syntax_checkers/bro/bro.vim | 45 + .../syntastic/syntax_checkers/c/avrgcc.vim | 57 + .../syntax_checkers/c/checkpatch.vim | 58 + .../syntastic/syntax_checkers/c/cppcheck.vim | 69 + .../syntastic/syntax_checkers/c/gcc.vim | 58 + .../syntastic/syntax_checkers/c/make.vim | 61 + .../syntastic/syntax_checkers/c/oclint.vim | 63 + .../syntastic/syntax_checkers/c/sparse.vim | 53 + .../syntastic/syntax_checkers/c/splint.vim | 62 + .../syntastic/syntax_checkers/cabal/cabal.vim | 55 + .../syntax_checkers/chef/foodcritic.vim | 39 + .../syntastic/syntax_checkers/co/coco.vim | 43 + .../syntastic/syntax_checkers/cobol/cobc.vim | 46 + .../syntax_checkers/coffee/coffee.vim | 56 + .../syntax_checkers/coffee/coffeelint.vim | 48 + .../syntastic/syntax_checkers/coq/coqtop.vim | 40 + .../syntax_checkers/cpp/cppcheck.vim | 31 + .../syntastic/syntax_checkers/cpp/cpplint.vim | 64 + .../syntastic/syntax_checkers/cpp/gcc.vim | 55 + .../syntastic/syntax_checkers/cpp/oclint.vim | 31 + .../syntastic/syntax_checkers/cs/mcs.vim | 39 + .../syntastic/syntax_checkers/css/csslint.vim | 52 + .../syntastic/syntax_checkers/css/phpcs.vim | 29 + .../syntax_checkers/css/prettycss.vim | 64 + .../syntastic/syntax_checkers/css/recess.vim | 26 + .../syntax_checkers/cucumber/cucumber.vim | 42 + .../syntastic/syntax_checkers/cuda/nvcc.vim | 78 + .../syntastic/syntax_checkers/d/dmd.vim | 59 + .../syntax_checkers/dart/dartanalyzer.vim | 76 + .../syntax_checkers/docbk/xmllint.vim | 25 + .../syntax_checkers/dustjs/swiffer.vim | 38 + .../syntax_checkers/elixir/elixir.vim | 56 + .../erlang/erlang_check_file.erl | 61 + .../syntax_checkers/erlang/escript.vim | 61 + .../syntax_checkers/erlang/syntaxerl.vim | 42 + .../syntastic/syntax_checkers/eruby/ruby.vim | 70 + .../syntax_checkers/fortran/gfortran.vim | 51 + .../syntastic/syntax_checkers/glsl/cgc.vim | 77 + .../syntastic/syntax_checkers/go/go.vim | 91 + .../syntastic/syntax_checkers/go/gofmt.vim | 44 + .../syntastic/syntax_checkers/go/golint.vim | 39 + .../syntastic/syntax_checkers/go/gotype.vim | 48 + .../syntastic/syntax_checkers/go/govet.vim | 49 + .../syntastic/syntax_checkers/haml/haml.vim | 46 + .../syntax_checkers/haml/haml_lint.vim | 37 + .../syntax_checkers/handlebars/handlebars.vim | 42 + .../syntax_checkers/haskell/ghc-mod.vim | 72 + .../syntax_checkers/haskell/hdevtools.vim | 56 + .../syntax_checkers/haskell/hlint.vim | 39 + .../syntax_checkers/haskell/scan.vim | 43 + .../syntastic/syntax_checkers/haxe/haxe.vim | 61 + .../syntastic/syntax_checkers/hss/hss.vim | 38 + .../syntastic/syntax_checkers/html/jshint.vim | 50 + .../syntastic/syntax_checkers/html/tidy.vim | 219 +++ .../syntax_checkers/html/validator.vim | 87 + .../syntastic/syntax_checkers/html/w3.vim | 69 + .../syntax_checkers/java/checkstyle.vim | 62 + .../syntastic/syntax_checkers/java/javac.vim | 435 +++++ .../javascript/closurecompiler.vim | 64 + .../syntax_checkers/javascript/eslint.vim | 56 + .../syntax_checkers/javascript/gjslint.vim | 45 + .../syntax_checkers/javascript/jscs.vim | 44 + .../syntax_checkers/javascript/jshint.vim | 59 + .../syntax_checkers/javascript/jsl.vim | 48 + .../syntax_checkers/javascript/jslint.vim | 51 + .../syntax_checkers/javascript/jsxhint.vim | 47 + .../syntax_checkers/json/jsonlint.vim | 43 + .../syntax_checkers/json/jsonval.vim | 41 + .../syntax_checkers/less/less-lint.coffee | 41 + .../syntax_checkers/less/less-lint.js | 57 + .../syntastic/syntax_checkers/less/lessc.vim | 71 + .../syntastic/syntax_checkers/less/recess.vim | 44 + .../syntastic/syntax_checkers/lex/flex.vim | 50 + .../syntastic/syntax_checkers/limbo/limbo.vim | 46 + .../syntastic/syntax_checkers/lisp/clisp.vim | 49 + .../syntastic/syntax_checkers/llvm/llvm.vim | 39 + .../syntastic/syntax_checkers/lua/luac.vim | 65 + .../syntax_checkers/matlab/mlint.vim | 41 + .../syntastic/syntax_checkers/nasm/nasm.vim | 41 + .../syntax_checkers/nroff/mandoc.vim | 41 + .../syntastic/syntax_checkers/objc/gcc.vim | 58 + .../syntastic/syntax_checkers/objc/oclint.vim | 31 + .../syntastic/syntax_checkers/objcpp/gcc.vim | 58 + .../syntax_checkers/objcpp/oclint.vim | 31 + .../syntax_checkers/ocaml/camlp4o.vim | 156 ++ .../syntastic/syntax_checkers/perl/perl.vim | 109 ++ .../syntax_checkers/perl/perlcritic.vim | 66 + .../syntax_checkers/perl/podchecker.vim | 25 + .../syntastic/syntax_checkers/php/php.vim | 51 + .../syntastic/syntax_checkers/php/phpcs.vim | 46 + .../syntastic/syntax_checkers/php/phpmd.vim | 80 + .../syntastic/syntax_checkers/po/msgfmt.vim | 50 + .../syntax_checkers/pod/podchecker.vim | 51 + .../syntax_checkers/puppet/puppet.vim | 50 + .../syntax_checkers/puppet/puppetlint.vim | 50 + .../syntax_checkers/python/compile.py | 13 + .../syntax_checkers/python/flake8.vim | 72 + .../syntax_checkers/python/frosted.vim | 63 + .../syntax_checkers/python/pep257.vim | 62 + .../syntastic/syntax_checkers/python/pep8.vim | 50 + .../syntax_checkers/python/py3kwarn.vim | 36 + .../syntax_checkers/python/pyflakes.vim | 74 + .../syntax_checkers/python/pylama.vim | 72 + .../syntax_checkers/python/pylint.vim | 90 + .../syntax_checkers/python/python.vim | 49 + .../syntastic/syntax_checkers/r/lint.vim | 81 + .../syntastic/syntax_checkers/r/svtools.vim | 78 + .../syntax_checkers/racket/code-ayatollah.vim | 60 + .../syntax_checkers/racket/racket.vim | 50 + .../syntax_checkers/rst/rst2pseudoxml.vim | 62 + .../syntax_checkers/rst/rstcheck.vim | 50 + .../syntastic/syntax_checkers/ruby/jruby.vim | 50 + .../syntax_checkers/ruby/macruby.vim | 47 + .../syntastic/syntax_checkers/ruby/mri.vim | 79 + .../syntax_checkers/ruby/rubocop.vim | 59 + .../syntax_checkers/ruby/rubylint.vim | 44 + .../syntastic/syntax_checkers/sass/sass.vim | 80 + .../syntastic/syntax_checkers/sass/sassc.vim | 38 + .../syntastic/syntax_checkers/scala/fsc.vim | 48 + .../syntax_checkers/scala/scalac.vim | 43 + .../syntastic/syntax_checkers/scss/sass.vim | 25 + .../syntastic/syntax_checkers/scss/sassc.vim | 25 + .../syntax_checkers/scss/scss_lint.vim | 45 + .../syntax_checkers/sh/checkbashisms.vim | 42 + .../syntastic/syntax_checkers/sh/sh.vim | 88 + .../syntax_checkers/sh/shellcheck.vim | 44 + .../syntastic/syntax_checkers/slim/slimrb.vim | 55 + .../syntax_checkers/tcl/nagelfar.vim | 43 + .../syntastic/syntax_checkers/tex/chktex.vim | 65 + .../syntastic/syntax_checkers/tex/lacheck.vim | 40 + .../syntax_checkers/texinfo/makeinfo.vim | 47 + .../syntax_checkers/text/atdtool.vim | 57 + .../syntax_checkers/text/language_check.vim | 37 + .../syntax_checkers/twig/twiglint.vim | 41 + .../syntax_checkers/typescript/tsc.vim | 43 + .../syntax_checkers/typescript/tslint.vim | 46 + .../syntastic/syntax_checkers/vala/valac.vim | 97 + .../syntax_checkers/verilog/verilator.vim | 41 + .../syntastic/syntax_checkers/vhdl/ghdl.vim | 38 + .../syntastic/syntax_checkers/vim/vimlint.vim | 99 ++ .../syntax_checkers/xhtml/jshint.vim | 25 + .../syntastic/syntax_checkers/xhtml/tidy.vim | 89 + .../syntastic/syntax_checkers/xml/plutil.vim | 42 + .../syntastic/syntax_checkers/xml/xmllint.vim | 52 + .../syntax_checkers/xslt/xmllint.vim | 25 + .../syntastic/syntax_checkers/yacc/bison.vim | 55 + .../syntastic/syntax_checkers/yaml/jsyaml.vim | 51 + .../syntastic/syntax_checkers/yaml/yamlxs.vim | 73 + .../syntax_checkers/z80/z80syntaxchecker.vim | 45 + .../syntastic/syntax_checkers/zpt/zptlint.vim | 51 + .../syntax_checkers/zsh/shellcheck.vim | 25 + .../syntastic/syntax_checkers/zsh/zsh.vim | 38 + .../vim-colors-solarized/doc/tags | 27 - sources_non_forked/vim-marked | 1 - sources_non_forked/vim-marked/README.markdown | 22 + .../vim-marked/plugin/marked.vim | 55 + sources_non_forked/vim-misc | 1 - sources_non_forked/vim-misc/.gitignore | 1 + sources_non_forked/vim-misc/README.md | 672 +++++++ sources_non_forked/vim-misc/addon-info.json | 1 + .../vim-misc/autoload/xolox/misc.vim | 7 + .../vim-misc/autoload/xolox/misc/buffer.vim | 80 + .../vim-misc/autoload/xolox/misc/complete.vim | 22 + .../vim-misc/autoload/xolox/misc/echo.exe | Bin 0 -> 7680 bytes .../vim-misc/autoload/xolox/misc/escape.vim | 56 + .../vim-misc/autoload/xolox/misc/format.vim | 46 + .../vim-misc/autoload/xolox/misc/list.vim | 42 + .../vim-misc/autoload/xolox/misc/msg.vim | 119 ++ .../vim-misc/autoload/xolox/misc/open.vim | 100 ++ .../vim-misc/autoload/xolox/misc/option.vim | 115 ++ .../vim-misc/autoload/xolox/misc/os.vim | 271 +++ .../vim-misc/autoload/xolox/misc/path.vim | 263 +++ .../vim-misc/autoload/xolox/misc/str.vim | 69 + .../vim-misc/autoload/xolox/misc/test.vim | 125 ++ .../vim-misc/autoload/xolox/misc/tests.vim | 301 ++++ .../vim-misc/autoload/xolox/misc/timer.vim | 62 + .../vim-misc/autoload/xolox/misc/version.vim | 34 + sources_non_forked/vim-misc/doc/misc.txt | 866 +++++++++ sources_non_forked/vim-notes | 1 - sources_non_forked/vim-notes/.gitignore | 5 + sources_non_forked/vim-notes/INSTALL.md | 13 + sources_non_forked/vim-notes/README.md | 360 ++++ sources_non_forked/vim-notes/TODO.md | 15 + sources_non_forked/vim-notes/addon-info.json | 1 + .../vim-notes/autoload/xolox/notes.vim | 1221 +++++++++++++ .../vim-notes/autoload/xolox/notes/html.vim | 84 + .../autoload/xolox/notes/markdown.vim | 94 + .../vim-notes/autoload/xolox/notes/parser.vim | 333 ++++ .../vim-notes/autoload/xolox/notes/recent.vim | 100 ++ .../vim-notes/autoload/xolox/notes/tags.vim | 201 +++ sources_non_forked/vim-notes/doc/notes.txt | 677 +++++++ .../vim-notes/ftplugin/notes.vim | 141 ++ .../vim-notes/misc/notes/search-notes.py | 312 ++++ .../vim-notes/misc/notes/shadow/New note | 13 + .../misc/notes/shadow/Note taking commands | 94 + .../misc/notes/shadow/Note taking syntax | 54 + .../vim-notes/misc/notes/template.html | 40 + sources_non_forked/vim-notes/plugin/notes.vim | 79 + sources_non_forked/vim-notes/syntax/notes.vim | 162 ++ sources_non_forked/vim-ruby | 1 - sources_non_forked/vim-ruby/.gitignore | 1 + sources_non_forked/vim-ruby/.rspec | 1 + sources_non_forked/vim-ruby/CONTRIBUTORS | 18 + sources_non_forked/vim-ruby/ChangeLog | 1579 +++++++++++++++++ sources_non_forked/vim-ruby/FAQ | 251 +++ sources_non_forked/vim-ruby/Gemfile | 4 + sources_non_forked/vim-ruby/Gemfile.lock | 20 + sources_non_forked/vim-ruby/INSTALL.markdown | 36 + sources_non_forked/vim-ruby/NEWS | 243 +++ sources_non_forked/vim-ruby/README | 74 + sources_non_forked/vim-ruby/Rakefile | 42 + .../vim-ruby/autoload/rubycomplete.vim | 805 +++++++++ .../vim-ruby/bin/vim-ruby-install.rb | 455 +++++ .../vim-ruby/compiler/eruby.vim | 39 + sources_non_forked/vim-ruby/compiler/rake.vim | 35 + .../vim-ruby/compiler/rspec.vim | 33 + sources_non_forked/vim-ruby/compiler/ruby.vim | 45 + .../vim-ruby/compiler/rubyunit.vim | 33 + .../vim-ruby/doc/ft-ruby-omni.txt | 40 + .../vim-ruby/doc/ft-ruby-syntax.txt | 64 + sources_non_forked/vim-ruby/doc/vim-ruby.txt | 61 + .../etc/examples/indent/closing_brackets.rb | 16 + sources_non_forked/vim-ruby/ftdetect/ruby.vim | 62 + .../vim-ruby/ftplugin/eruby.vim | 102 ++ sources_non_forked/vim-ruby/ftplugin/ruby.vim | 395 +++++ sources_non_forked/vim-ruby/indent/eruby.vim | 82 + sources_non_forked/vim-ruby/indent/ruby.vim | 537 ++++++ .../vim-ruby/spec/indent/arguments_spec.rb | 24 + .../vim-ruby/spec/indent/basic_spec.rb | 42 + .../vim-ruby/spec/indent/blocks_spec.rb | 69 + .../spec/indent/continuations_spec.rb | 142 ++ .../spec/indent/end_constructs_spec.rb | 31 + .../vim-ruby/spec/indent/nesting_spec.rb | 66 + .../vim-ruby/spec/indent/splat_spec.rb | 46 + .../vim-ruby/spec/spec_helper.rb | 44 + sources_non_forked/vim-ruby/syntax/eruby.vim | 74 + sources_non_forked/vim-ruby/syntax/ruby.vim | 369 ++++ 266 files changed, 26588 insertions(+), 31 deletions(-) create mode 100644 sources_non_forked/syntastic/.gitignore create mode 100644 sources_non_forked/syntastic/CONTRIBUTING.md create mode 100644 sources_non_forked/syntastic/LICENCE create mode 100644 sources_non_forked/syntastic/README.markdown create mode 100644 sources_non_forked/syntastic/_assets/screenshot_1.png create mode 100644 sources_non_forked/syntastic/autoload/syntastic/c.vim create mode 100644 sources_non_forked/syntastic/autoload/syntastic/log.vim create mode 100644 sources_non_forked/syntastic/autoload/syntastic/postprocess.vim create mode 100644 sources_non_forked/syntastic/autoload/syntastic/preprocess.vim create mode 100644 sources_non_forked/syntastic/autoload/syntastic/util.vim create mode 100644 sources_non_forked/syntastic/doc/syntastic.txt create mode 100644 sources_non_forked/syntastic/plugin/syntastic.vim create mode 100644 sources_non_forked/syntastic/plugin/syntastic/autoloclist.vim create mode 100644 sources_non_forked/syntastic/plugin/syntastic/balloons.vim create mode 100644 sources_non_forked/syntastic/plugin/syntastic/checker.vim create mode 100644 sources_non_forked/syntastic/plugin/syntastic/cursor.vim create mode 100644 sources_non_forked/syntastic/plugin/syntastic/highlighting.vim create mode 100644 sources_non_forked/syntastic/plugin/syntastic/loclist.vim create mode 100644 sources_non_forked/syntastic/plugin/syntastic/modemap.vim create mode 100644 sources_non_forked/syntastic/plugin/syntastic/notifiers.vim create mode 100644 sources_non_forked/syntastic/plugin/syntastic/registry.vim create mode 100644 sources_non_forked/syntastic/plugin/syntastic/signs.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/actionscript/mxmlc.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/ada/gcc.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/applescript/osacompile.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/arduino/avrgcc.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/asciidoc/asciidoc.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/asm/gcc.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/bemhtml/bemhtmllint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/bro/bro.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/c/avrgcc.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/c/checkpatch.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/c/cppcheck.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/c/gcc.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/c/make.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/c/oclint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/c/sparse.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/c/splint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/cabal/cabal.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/chef/foodcritic.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/co/coco.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/cobol/cobc.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/coffee/coffee.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/coffee/coffeelint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/coq/coqtop.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/cpp/cppcheck.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/cpp/cpplint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/cpp/gcc.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/cpp/oclint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/cs/mcs.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/css/csslint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/css/phpcs.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/css/prettycss.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/css/recess.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/cucumber/cucumber.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/cuda/nvcc.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/d/dmd.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/dart/dartanalyzer.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/docbk/xmllint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/dustjs/swiffer.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/elixir/elixir.vim create mode 100755 sources_non_forked/syntastic/syntax_checkers/erlang/erlang_check_file.erl create mode 100644 sources_non_forked/syntastic/syntax_checkers/erlang/escript.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/erlang/syntaxerl.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/eruby/ruby.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/fortran/gfortran.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/glsl/cgc.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/go/go.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/go/gofmt.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/go/golint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/go/gotype.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/go/govet.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/haml/haml.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/haml/haml_lint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/handlebars/handlebars.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/haskell/ghc-mod.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/haskell/hdevtools.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/haskell/hlint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/haskell/scan.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/haxe/haxe.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/hss/hss.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/html/jshint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/html/tidy.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/html/validator.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/html/w3.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/java/checkstyle.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/java/javac.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/javascript/closurecompiler.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/javascript/eslint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/javascript/gjslint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/javascript/jscs.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/javascript/jshint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/javascript/jsl.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/javascript/jslint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/javascript/jsxhint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/json/jsonlint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/json/jsonval.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/less/less-lint.coffee create mode 100644 sources_non_forked/syntastic/syntax_checkers/less/less-lint.js create mode 100644 sources_non_forked/syntastic/syntax_checkers/less/lessc.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/less/recess.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/lex/flex.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/limbo/limbo.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/lisp/clisp.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/llvm/llvm.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/lua/luac.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/matlab/mlint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/nasm/nasm.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/nroff/mandoc.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/objc/gcc.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/objc/oclint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/objcpp/gcc.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/objcpp/oclint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/ocaml/camlp4o.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/perl/perl.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/perl/perlcritic.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/perl/podchecker.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/php/php.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/php/phpcs.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/php/phpmd.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/po/msgfmt.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/pod/podchecker.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/puppet/puppet.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/puppet/puppetlint.vim create mode 100755 sources_non_forked/syntastic/syntax_checkers/python/compile.py create mode 100644 sources_non_forked/syntastic/syntax_checkers/python/flake8.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/python/frosted.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/python/pep257.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/python/pep8.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/python/py3kwarn.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/python/pyflakes.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/python/pylama.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/python/pylint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/python/python.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/r/lint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/r/svtools.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/racket/code-ayatollah.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/racket/racket.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/rst/rst2pseudoxml.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/rst/rstcheck.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/ruby/jruby.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/ruby/macruby.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/ruby/mri.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/ruby/rubocop.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/ruby/rubylint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/sass/sass.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/sass/sassc.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/scala/fsc.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/scala/scalac.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/scss/sass.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/scss/sassc.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/scss/scss_lint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/sh/checkbashisms.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/sh/sh.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/sh/shellcheck.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/slim/slimrb.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/tcl/nagelfar.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/tex/chktex.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/tex/lacheck.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/texinfo/makeinfo.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/text/atdtool.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/text/language_check.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/twig/twiglint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/typescript/tsc.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/typescript/tslint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/vala/valac.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/verilog/verilator.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/vhdl/ghdl.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/vim/vimlint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/xhtml/jshint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/xhtml/tidy.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/xml/plutil.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/xml/xmllint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/xslt/xmllint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/yacc/bison.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/yaml/jsyaml.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/yaml/yamlxs.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/z80/z80syntaxchecker.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/zpt/zptlint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/zsh/shellcheck.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/zsh/zsh.vim delete mode 100644 sources_non_forked/vim-colors-solarized/doc/tags delete mode 160000 sources_non_forked/vim-marked create mode 100644 sources_non_forked/vim-marked/README.markdown create mode 100644 sources_non_forked/vim-marked/plugin/marked.vim delete mode 160000 sources_non_forked/vim-misc create mode 100644 sources_non_forked/vim-misc/.gitignore create mode 100644 sources_non_forked/vim-misc/README.md create mode 100644 sources_non_forked/vim-misc/addon-info.json create mode 100644 sources_non_forked/vim-misc/autoload/xolox/misc.vim create mode 100644 sources_non_forked/vim-misc/autoload/xolox/misc/buffer.vim create mode 100644 sources_non_forked/vim-misc/autoload/xolox/misc/complete.vim create mode 100644 sources_non_forked/vim-misc/autoload/xolox/misc/echo.exe create mode 100644 sources_non_forked/vim-misc/autoload/xolox/misc/escape.vim create mode 100644 sources_non_forked/vim-misc/autoload/xolox/misc/format.vim create mode 100644 sources_non_forked/vim-misc/autoload/xolox/misc/list.vim create mode 100644 sources_non_forked/vim-misc/autoload/xolox/misc/msg.vim create mode 100644 sources_non_forked/vim-misc/autoload/xolox/misc/open.vim create mode 100644 sources_non_forked/vim-misc/autoload/xolox/misc/option.vim create mode 100644 sources_non_forked/vim-misc/autoload/xolox/misc/os.vim create mode 100644 sources_non_forked/vim-misc/autoload/xolox/misc/path.vim create mode 100644 sources_non_forked/vim-misc/autoload/xolox/misc/str.vim create mode 100644 sources_non_forked/vim-misc/autoload/xolox/misc/test.vim create mode 100644 sources_non_forked/vim-misc/autoload/xolox/misc/tests.vim create mode 100644 sources_non_forked/vim-misc/autoload/xolox/misc/timer.vim create mode 100644 sources_non_forked/vim-misc/autoload/xolox/misc/version.vim create mode 100644 sources_non_forked/vim-misc/doc/misc.txt delete mode 160000 sources_non_forked/vim-notes create mode 100644 sources_non_forked/vim-notes/.gitignore create mode 100644 sources_non_forked/vim-notes/INSTALL.md create mode 100644 sources_non_forked/vim-notes/README.md create mode 100644 sources_non_forked/vim-notes/TODO.md create mode 100644 sources_non_forked/vim-notes/addon-info.json create mode 100644 sources_non_forked/vim-notes/autoload/xolox/notes.vim create mode 100644 sources_non_forked/vim-notes/autoload/xolox/notes/html.vim create mode 100644 sources_non_forked/vim-notes/autoload/xolox/notes/markdown.vim create mode 100644 sources_non_forked/vim-notes/autoload/xolox/notes/parser.vim create mode 100644 sources_non_forked/vim-notes/autoload/xolox/notes/recent.vim create mode 100644 sources_non_forked/vim-notes/autoload/xolox/notes/tags.vim create mode 100644 sources_non_forked/vim-notes/doc/notes.txt create mode 100644 sources_non_forked/vim-notes/ftplugin/notes.vim create mode 100755 sources_non_forked/vim-notes/misc/notes/search-notes.py create mode 100644 sources_non_forked/vim-notes/misc/notes/shadow/New note create mode 100644 sources_non_forked/vim-notes/misc/notes/shadow/Note taking commands create mode 100644 sources_non_forked/vim-notes/misc/notes/shadow/Note taking syntax create mode 100644 sources_non_forked/vim-notes/misc/notes/template.html create mode 100644 sources_non_forked/vim-notes/plugin/notes.vim create mode 100644 sources_non_forked/vim-notes/syntax/notes.vim delete mode 160000 sources_non_forked/vim-ruby create mode 100644 sources_non_forked/vim-ruby/.gitignore create mode 100644 sources_non_forked/vim-ruby/.rspec create mode 100644 sources_non_forked/vim-ruby/CONTRIBUTORS create mode 100644 sources_non_forked/vim-ruby/ChangeLog create mode 100644 sources_non_forked/vim-ruby/FAQ create mode 100644 sources_non_forked/vim-ruby/Gemfile create mode 100644 sources_non_forked/vim-ruby/Gemfile.lock create mode 100644 sources_non_forked/vim-ruby/INSTALL.markdown create mode 100644 sources_non_forked/vim-ruby/NEWS create mode 100644 sources_non_forked/vim-ruby/README create mode 100644 sources_non_forked/vim-ruby/Rakefile create mode 100644 sources_non_forked/vim-ruby/autoload/rubycomplete.vim create mode 100755 sources_non_forked/vim-ruby/bin/vim-ruby-install.rb create mode 100644 sources_non_forked/vim-ruby/compiler/eruby.vim create mode 100644 sources_non_forked/vim-ruby/compiler/rake.vim create mode 100644 sources_non_forked/vim-ruby/compiler/rspec.vim create mode 100644 sources_non_forked/vim-ruby/compiler/ruby.vim create mode 100644 sources_non_forked/vim-ruby/compiler/rubyunit.vim create mode 100644 sources_non_forked/vim-ruby/doc/ft-ruby-omni.txt create mode 100644 sources_non_forked/vim-ruby/doc/ft-ruby-syntax.txt create mode 100644 sources_non_forked/vim-ruby/doc/vim-ruby.txt create mode 100644 sources_non_forked/vim-ruby/etc/examples/indent/closing_brackets.rb create mode 100644 sources_non_forked/vim-ruby/ftdetect/ruby.vim create mode 100644 sources_non_forked/vim-ruby/ftplugin/eruby.vim create mode 100644 sources_non_forked/vim-ruby/ftplugin/ruby.vim create mode 100644 sources_non_forked/vim-ruby/indent/eruby.vim create mode 100644 sources_non_forked/vim-ruby/indent/ruby.vim create mode 100644 sources_non_forked/vim-ruby/spec/indent/arguments_spec.rb create mode 100644 sources_non_forked/vim-ruby/spec/indent/basic_spec.rb create mode 100644 sources_non_forked/vim-ruby/spec/indent/blocks_spec.rb create mode 100644 sources_non_forked/vim-ruby/spec/indent/continuations_spec.rb create mode 100644 sources_non_forked/vim-ruby/spec/indent/end_constructs_spec.rb create mode 100644 sources_non_forked/vim-ruby/spec/indent/nesting_spec.rb create mode 100644 sources_non_forked/vim-ruby/spec/indent/splat_spec.rb create mode 100644 sources_non_forked/vim-ruby/spec/spec_helper.rb create mode 100644 sources_non_forked/vim-ruby/syntax/eruby.vim create mode 100644 sources_non_forked/vim-ruby/syntax/ruby.vim diff --git a/sources_non_forked/syntastic/.gitignore b/sources_non_forked/syntastic/.gitignore new file mode 100644 index 00000000..cc07c931 --- /dev/null +++ b/sources_non_forked/syntastic/.gitignore @@ -0,0 +1,4 @@ +*~ +*.swp +tags +.DS_Store diff --git a/sources_non_forked/syntastic/CONTRIBUTING.md b/sources_non_forked/syntastic/CONTRIBUTING.md new file mode 100644 index 00000000..378b53b3 --- /dev/null +++ b/sources_non_forked/syntastic/CONTRIBUTING.md @@ -0,0 +1,105 @@ +# CONTRIBUTING +- - - +1\. [Bug reports / GitHub issues](#bugreps) +2\. [Submitting a patch](#patches) +3\. [General style notes](#generalstyle) +4\. [Syntax checker notes](#checkerstyle) +- - - + + + +## 1. Bug reports / GitHub issues + +Please note that the preferred channel for posting bug reports is the +[issue tracker at GitHub][0]. Reports posted elsewhere are less likely +to be seen by the core team. + +When reporting a bug make sure you search the existing GitHub issues +for the same/similar issues. If you find one, feel free to add a `+1` +comment with any additional information that may help us solve the +issue. + +When creating a new issue be sure to state the following: + +* steps to reproduce the bug; +* the version of Vim you are using (run `:ver` to find out); +* the version of syntastic you are using (see `:SyntasticInfo`). + +For syntax checker bugs also state the version of the checker executable +that you are using. Adding debugging information is typically useful +too: + +* open a file handled by your checker; +* set `g:syntastic_debug` to 1 or 3; +* run the checker; +* copy the output of `:mes`. + + + +## 2. Submitting a patch + +Before you consider adding features to syntastic, _please_ spend a few +minutes (re-)reading the latest version of the [manual][1]. Syntastic +is changing rapidly at times, and it's quite possible that some of the +features you want to add exist already. + +To submit a patch: + +* fork the [repo][2] on GitHub; +* make a [topic branch][3] and start hacking; +* submit a pull request based off your topic branch. + +Small, focused patches are preferred. + +Large changes to the code should be discussed with the core team first. +Create an issue and explain your plan and see what we say. + +Also make sure to update the manual whenever applicable. Nobody can use +features that aren't documented. + + + +## 3. General style notes + +Follow the coding conventions/styles used in the syntastic core: + +* use 4 space indents; +* don't use abbreviated keywords - e.g. use `endfunction`, not `endfun` +(there's always room for more fun!); +* don't use `l:` prefixes for variables unless actually required (i.e. +almost never); +* code for maintainability; we would rather a function be a couple of +lines longer and have (for example) some [explaining variables][4] to +aid readability. + + + +## 4. Syntax checker notes + +Make sure to read the [guide][5] if you plan to add new syntax checkers. + +Use the existing checkers as templates, rather than writing everything +from scratch. + +The preferred style for error format strings is one "clause" per line. +E.g. (from the `coffee` checker): + +```vim +let errorformat = + \ '%E%f:%l:%c: %trror: %m,' . + \ 'Syntax%trror: In %f\, %m on line %l,' . + \ '%EError: In %f\, Parse error on line %l: %m,' . + \ '%EError: In %f\, %m on line %l,' . + \ '%W%f(%l): lint warning: %m,' . + \ '%W%f(%l): warning: %m,' . + \ '%E%f(%l): SyntaxError: %m,' . + \ '%-Z%p^,' . + \ '%-G%.%#' +``` + +[0]: https://github.com/scrooloose/syntastic/issues +[1]: https://github.com/scrooloose/syntastic/blob/master/doc/syntastic.txt +[2]: https://github.com/scrooloose/syntastic +[3]: https://github.com/dchelimsky/rspec/wiki/Topic-Branches#using-topic-branches-when-contributing-patches +[4]: http://www.refactoring.com/catalog/extractVariable.html +[5]: https://github.com/scrooloose/syntastic/wiki/Syntax-Checker-Guide diff --git a/sources_non_forked/syntastic/LICENCE b/sources_non_forked/syntastic/LICENCE new file mode 100644 index 00000000..8b1a9d81 --- /dev/null +++ b/sources_non_forked/syntastic/LICENCE @@ -0,0 +1,13 @@ + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + +Copyright (C) 2004 Sam Hocevar + +Everyone is permitted to copy and distribute verbatim or modified +copies of this license document, and changing it is allowed as long +as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/sources_non_forked/syntastic/README.markdown b/sources_non_forked/syntastic/README.markdown new file mode 100644 index 00000000..d0eb41f2 --- /dev/null +++ b/sources_non_forked/syntastic/README.markdown @@ -0,0 +1,305 @@ + , + / \,,_ .'| + ,{{| /}}}}/_.' _____________________________________________ + }}}}` '{{' '. / \ + {{{{{ _ ;, \ / Ladies and Gentlemen, \ + ,}}}}}} /o`\ ` ;) | | + {{{{{{ / ( | this is ... | + }}}}}} | \ | | + {{{{{{{{ \ \ | | + }}}}}}}}} '.__ _ | | _____ __ __ _ | + {{{{{{{{ /`._ (_\ / | / ___/__ ______ / /_____ ______/ /_(_)____ | + }}}}}}' | //___/ --=: \__ \/ / / / __ \/ __/ __ `/ ___/ __/ / ___/ | + jgs `{{{{` | '--' | ___/ / /_/ / / / / /_/ /_/ (__ ) /_/ / /__ | + }}}` | /____/\__, /_/ /_/\__/\__,_/____/\__/_/\___/ | + | /____/ | + | / + \_____________________________________________/ + + +- - - +1\. [Introduction](#introduction) +2\. [Installation](#installation) +3\. [FAQ](#faq) +4\. [Other resources](#otherresources) +- - - + + + +## 1\. Introduction + +Syntastic is a syntax checking plugin for Vim that runs files through external +syntax checkers and displays any resulting errors to the user. This can be done +on demand, or automatically as files are saved. If syntax errors are detected, +the user is notified and is happy because they didn't have to compile their +code or execute their script to find them. + +At the time of this writing, syntax checking plugins exist for ActionScript, +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, 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 +enabled. + +![Screenshot 1][0] + +1. Errors are loaded into the location list for the corresponding window. +2. When the cursor is on a line containing an error, the error message is echoed in the command window. +3. Signs are placed beside lines with errors - note that warnings are displayed in a different color. +4. There is a configurable statusline flag you can include in your statusline config. +5. Hover the mouse over a line containing an error and the error message is displayed as a balloon. +6. (not shown) Highlighting errors with syntax highlighting. Erroneous parts of lines can be highlighted. + + + +## 2\. Installation + +Installing syntastic is easy but first you need to have the [pathogen][1] +plugin installed. If you already have [pathogen][1] working then skip +[Step 1](#step1) and go to [Step 2](#step2). + + + + +### 2.1\. Step 1: Install pathogen.vim + +First I'll show you how to install Tim Pope's [pathogen][1] so that it's easy to +install syntastic. Do this in your terminal so that you get the `pathogen.vim` +file and the directories it needs: +```sh +mkdir -p ~/.vim/autoload ~/.vim/bundle && \ +curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim +``` +Next you *need* to add this to your `~/.vimrc`: +```vim +execute pathogen#infect() +``` + + + +### 2.2\. Step 2: Install syntastic as a pathogen bundle + +You now have pathogen installed and can put syntastic into `~/.vim/bundle` like +this: +```sh +cd ~/.vim/bundle && \ +git clone https://github.com/scrooloose/syntastic.git +``` +Quit vim and start it back up to reload it, then type: +```vim +:Helptags +``` +If you get an error when you do this, then you probably didn't install +[pathogen][1] right. Go back to [Step 1](#step1) and make sure you did the following: + +1. Created both the `~/.vim/autoload` and `~/.vim/bundle` directories. +2. Added the `call pathogen#infect()` line to your `~/.vimrc` file +3. Did the `git clone` of syntastic inside `~/.vim/bundle` +4. Have permissions to access all of these directories. + + + + +## 3\. FAQ + + + +__Q. I installed syntastic but it isn't reporting any errors...__ + +A. The most likely reason is that none of the syntax checkers that it requires +is installed. For example: by default, python requires either `flake8` or +`pylint` to be installed and in your `$PATH`. To see which executables are +supported, look at the [wiki][3]. Note that aliases do not work; the actual +executables must be available in your `$PATH`. Symbolic links are okay though. +You can see syntastic's idea of available checkers by running `:SyntasticInfo`. + +Another reason it could fail is that either the command line options or the +error output for a syntax checker may have changed. In this case, make sure you +have the latest version of the syntax checker installed. If it still fails then +create an issue - or better yet, create a pull request. + + + +__Q. The `perl` checker has stopped working...__ + +A. The `perl` checker runs `perl -c` against your file, which in turn +__executes__ any `BEGIN`, `UNITCHECK`, and `CHECK` blocks, and any `use` +statements in your file (cf. [perlrun][10]). This is probably fine if you +wrote the file yourself, but it's a security problem if you're checking third +party files. Since there is currently no way to disable this behaviour while +still producing useful results, the checker is now disabled by default. To +(re-)enable it, make sure the `g:syntastic_perl_checkers` list includes `perl`, +and set `g:syntastic_enable_perl_checker` to 1 in your vimrc: +```vim +let g:syntastic_enable_perl_checker = 1 +``` + + + +__Q. What happened to the `rustc` checker?__ + +A. It has been included in the [Rust compiler package][12]. If you have +a recent version of the Rust compiler, the checker should be picked up +automatically by syntastic. + + + +__Q. I run a checker and the location list is not updated...__ + +A. By default the location list is changed only when you run the `:Errors` +command, in order to minimise conflicts with other plugins. If you want the +location list to always be updated when you run the checkers, add this line to +your vimrc: +```vim +let g:syntastic_always_populate_loc_list = 1 +``` + + + +__Q. How can I pass additional arguments to a checker?__ + +A. Almost all syntax checkers use the `makeprgBuild()` function. Those checkers +that do can be configured using global variables. The general form of the +global `args` variables is `syntastic___args`. + +So, If you wanted to pass "--my --args --here" to the ruby mri checker you +would add this line to your vimrc: +```vim +let g:syntastic_ruby_mri_args = "--my --args --here" +``` + +See `:help syntastic-checker-options` for more information. + + + +__Q. Syntastic supports several checkers for my filetype - how do I tell it +which one(s) to use?__ + +A. Stick a line like this in your vimrc: +```vim +let g:syntastic__checkers = [''] +``` + +To see the list of supported checkers for your filetype look at the +[wiki][3]. + +e.g. Python has the following checkers, among others: `flake8`, `pyflakes`, +`pylint` and a native `python` checker. + +To tell syntastic to use `pylint`, you would use this setting: +```vim +let g:syntastic_python_checkers = ['pylint'] +``` + +Some filetypes, like PHP, have style checkers as well as syntax checkers. These +can be chained together like this: +```vim +let g:syntastic_php_checkers = ['php', 'phpcs', 'phpmd'] +``` + +This is telling syntastic to run the `php` checker first, and if no errors are +found, run `phpcs`, and then `phpmd`. + +You can also run checkers explicitly by calling `:SyntasticCheck `. + +e.g. to run `phpcs` and `phpmd`: +```vim +:SyntasticCheck phpcs phpmd +``` + +This works for any checkers available for the current filetype, even if they +aren't listed in `g:syntastic__checkers`. You can't run checkers for +"foreign" filetypes though (e.g. you can't run, say, a Python checker if the +current filetype is `php`). + + + +__Q. How can I display together the errors found by all checkers enabled for +the current file?__ + +A. Set `g:syntastic_aggregate_errors` to 1 in your vimrc: +```vim +let g:syntastic_aggregate_errors = 1 +``` + +See `:help syntastic-aggregating-errors` for more details. + + + +__Q. How can I jump between the different errors without using the location +list at the bottom of the window?__ + +A. Vim provides several built in commands for this. See `:help :lnext` and +`:help :lprev`. + +If you use these commands a lot then you may want to add shortcut mappings to +your vimrc, or install something like [unimpaired][2], which provides such +mappings (among other things). + + + +__Q. A syntax checker is giving me unwanted/strange style tips?__ + +A. Some filetypes (e.g. php) have style checkers as well as syntax +checkers. You can usually configure the options that are passed to the style +checkers, or just disable them. Take a look at the [wiki][3] to see what +options are available. + +Alternatively, you can use `g:syntastic_quiet_messages` to filter out the +messages you don't want to see. e.g. To turn off all style messages: +```vim +let g:syntastic_quiet_messages = { "type": "style" } +``` +See `:help syntastic_quiet_messages` for details. + + + +__Q. The error window is closed automatically when I :quit the current buffer +but not when I :bdelete it?__ + +A. There is no safe way to handle that situation automatically, but you can +work around it: + +```vim +nnoremap :lclose:bdelete +cabbrev bd lclose\|bdelete +``` + + + + +## 4\. Other resources + +The preferred place for posting suggestions, reporting bugs, and general +discussions related to syntastic is the [issue tracker at GitHub][4]. +A guide for writing syntax checkers can be found in the [wiki][11]. +There are also a dedicated [google group][5], and a +[syntastic tag at StackOverflow][6]. + +Syntastic aims to provide a common interface to syntax checkers for as many +languages as possible. For particular languages, there are, of course, other +plugins that provide more functionality than syntastic. You might want to take +a look at [jedi-vim][7], [python-mode][8], or [YouCompleteMe][9]. + +[0]: https://github.com/scrooloose/syntastic/raw/master/_assets/screenshot_1.png +[1]: https://github.com/tpope/vim-pathogen +[2]: https://github.com/tpope/vim-unimpaired +[3]: https://github.com/scrooloose/syntastic/wiki/Syntax-Checkers +[4]: https://github.com/scrooloose/syntastic/issues +[5]: https://groups.google.com/group/vim-syntastic +[6]: http://stackoverflow.com/questions/tagged/syntastic +[7]: https://github.com/davidhalter/jedi-vim +[8]: https://github.com/klen/python-mode +[9]: http://valloric.github.io/YouCompleteMe/ +[10]: http://perldoc.perl.org/perlrun.html#*-c* +[11]: https://github.com/scrooloose/syntastic/wiki/Syntax-Checker-Guide +[12]: https://github.com/rust-lang/rust/ diff --git a/sources_non_forked/syntastic/_assets/screenshot_1.png b/sources_non_forked/syntastic/_assets/screenshot_1.png new file mode 100644 index 0000000000000000000000000000000000000000..c1b69f4ba26a2092aa4e9d42d2fa3ee08c6ab28a GIT binary patch literal 92425 zcmcF~byQSc6fcT^l&GYnN_T@ah?Gb>fOL1m5E6r+(jcI8cXxLq9Rmz7bPe4M4e#pr zeeb=s-dpSa^%iSjxHIRTbN1cw`|Y!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_`e*FpNQ=b9Ul z0glnwE&dcgYkr-T-r4}<`x~7GLt9KQBI(qaN9=u?g#dpVnmY+ene-{t@D@8I1#@wx zcR_`p47osjXYs3bPD3nyRx`kppZ-qH*hG2c)YQr;U1ZnO))s~n!O$B+iV)Jp@uefh zn^Wzx^OeNR=1Y4ZOhpQn+48EU)|1g3A`qJTz)@tgcIxyT3jPGgN8=%Qj&)S}c4lzW z-g9RVA(dIhHIg3D!|-B~Vn5~Lp4ri1Ths`u1@Au>M|~3hHG^h_+oixpCO4okV+W&Q zbkvK{Q6#dnZ-#aGJ7-|E03I{wQwHPnXV%qJNkQ', 'syntastic#c#checkPHP', []) + call s:_regHandler('\m\', 'syntastic#c#checkPython', []) + call s:_regHandler('\m\" + echohl ErrorMsg + echomsg "syntastic: error: " . a:msg + echohl None +endfunction " }}}2 + +function! syntastic#log#oneTimeWarn(msg) " {{{2 + if index(s:one_time_notices_issued, a:msg) >= 0 + return + endif + + call add(s:one_time_notices_issued, a:msg) + call syntastic#log#warn(a:msg) +endfunction " }}}2 + +" @vimlint(EVL102, 1, l:OLD_VAR) +function! syntastic#log#deprecationWarn(old, new, ...) " {{{2 + if exists('g:syntastic_' . a:old) && !exists('g:syntastic_' . a:new) + let msg = 'variable g:syntastic_' . a:old . ' is deprecated, please use ' + + if a:0 + let OLD_VAR = g:syntastic_{a:old} + try + let NEW_VAR = eval(a:1) + let msg .= 'in its stead: let g:syntastic_' . a:new . ' = ' . string(NEW_VAR) + let g:syntastic_{a:new} = NEW_VAR + catch + let msg .= 'g:syntastic_' . a:new . ' instead' + endtry + else + let msg .= 'g:syntastic_' . a:new . ' instead' + let g:syntastic_{a:new} = g:syntastic_{a:old} + endif + + call syntastic#log#oneTimeWarn(msg) + endif +endfunction " }}}2 +" @vimlint(EVL102, 0, l:OLD_VAR) + +function! syntastic#log#debug(level, msg, ...) " {{{2 + if !s:isDebugEnabled(a:level) + return + endif + + let leader = s:_logTimestamp() + call s:_logRedirect(1) + + if a:0 > 0 + " filter out dictionary functions + echomsg leader . a:msg . ' ' . + \ strtrans(string(type(a:1) == type({}) || type(a:1) == type([]) ? + \ filter(copy(a:1), 'type(v:val) != type(function("tr"))') : a:1)) + else + echomsg leader . a:msg + endif + + call s:_logRedirect(0) +endfunction " }}}2 + +function! syntastic#log#debugShowOptions(level, names) " {{{2 + if !s:isDebugEnabled(a:level) + return + endif + + let leader = s:_logTimestamp() + call s:_logRedirect(1) + + let vlist = copy(type(a:names) == type("") ? [a:names] : a:names) + if !empty(vlist) + call map(vlist, "'&' . v:val . ' = ' . strtrans(string(eval('&' . v:val)))") + echomsg leader . join(vlist, ', ') + endif + call s:_logRedirect(0) +endfunction " }}}2 + +function! syntastic#log#debugShowVariables(level, names) " {{{2 + if !s:isDebugEnabled(a:level) + return + endif + + let leader = s:_logTimestamp() + call s:_logRedirect(1) + + let vlist = type(a:names) == type("") ? [a:names] : a:names + for name in vlist + let msg = s:_formatVariable(name) + if msg != '' + echomsg leader . msg + endif + endfor + + call s:_logRedirect(0) +endfunction " }}}2 + +function! syntastic#log#debugDump(level) " {{{2 + if !s:isDebugEnabled(a:level) + return + endif + + call syntastic#log#debugShowVariables( a:level, sort(keys(g:syntastic_defaults)) ) +endfunction " }}}2 + +" }}}1 + +" Private functions {{{1 + +function! s:_isDebugEnabled_smart(level) " {{{2 + return and(g:syntastic_debug, a:level) +endfunction " }}}2 + +function! s:_isDebugEnabled_dumb(level) " {{{2 + " poor man's bit test for bit N, assuming a:level == 2**N + return (g:syntastic_debug / a:level) % 2 +endfunction " }}}2 + +let s:isDebugEnabled = function(exists('*and') ? 's:_isDebugEnabled_smart' : 's:_isDebugEnabled_dumb') +lockvar s:isDebugEnabled + +function! s:_logRedirect(on) " {{{2 + if exists("g:syntastic_debug_file") + if a:on + try + execute 'redir >> ' . fnameescape(expand(g:syntastic_debug_file)) + catch /\m^Vim\%((\a\+)\)\=:/ + silent! redir END + unlet g:syntastic_debug_file + endtry + else + silent! redir END + endif + endif +endfunction " }}}2 + +function! s:_logTimestamp() " {{{2 + return 'syntastic: ' . split(reltimestr(reltime(g:syntastic_start)))[0] . ': ' +endfunction " }}}2 + +function! s:_formatVariable(name) " {{{2 + let vals = [] + if exists('g:syntastic_' . a:name) + call add(vals, 'g:syntastic_' . a:name . ' = ' . strtrans(string(g:syntastic_{a:name}))) + endif + if exists('b:syntastic_' . a:name) + call add(vals, 'b:syntastic_' . a:name . ' = ' . strtrans(string(b:syntastic_{a:name}))) + endif + + return join(vals, ', ') +endfunction " }}}2 + +" }}}1 + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set sw=4 sts=4 et fdm=marker: diff --git a/sources_non_forked/syntastic/autoload/syntastic/postprocess.vim b/sources_non_forked/syntastic/autoload/syntastic/postprocess.vim new file mode 100644 index 00000000..65570d98 --- /dev/null +++ b/sources_non_forked/syntastic/autoload/syntastic/postprocess.vim @@ -0,0 +1,54 @@ +if exists("g:loaded_syntastic_postprocess_autoload") || !exists("g:loaded_syntastic_plugin") + finish +endif +let g:loaded_syntastic_postprocess_autoload = 1 + +let s:save_cpo = &cpo +set cpo&vim + +" Public functions {{{1 + +" merge consecutive blanks +function! syntastic#postprocess#compressWhitespace(errors) " {{{2 + for e in a:errors + let e['text'] = substitute(e['text'], "\001", '', 'g') + let e['text'] = substitute(e['text'], '\n', ' ', 'g') + let e['text'] = substitute(e['text'], '\m\s\{2,}', ' ', 'g') + let e['text'] = substitute(e['text'], '\m^\s\+', '', '') + let e['text'] = substitute(e['text'], '\m\s\+$', '', '') + endfor + + return a:errors +endfunction " }}}2 + +" remove spurious CR under Cygwin +function! syntastic#postprocess#cygwinRemoveCR(errors) " {{{2 + if has('win32unix') + for e in a:errors + let e['text'] = substitute(e['text'], '\r', '', 'g') + endfor + endif + + return a:errors +endfunction " }}}2 + +" decode XML entities +function! syntastic#postprocess#decodeXMLEntities(errors) " {{{2 + for e in a:errors + let e['text'] = syntastic#util#decodeXMLEntities(e['text']) + endfor + + return a:errors +endfunction " }}}2 + +" filter out errors referencing other files +function! syntastic#postprocess#filterForeignErrors(errors) " {{{2 + return filter(copy(a:errors), 'get(v:val, "bufnr") == ' . bufnr('')) +endfunction " }}}2 + +" }}}1 + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set sw=4 sts=4 et fdm=marker: diff --git a/sources_non_forked/syntastic/autoload/syntastic/preprocess.vim b/sources_non_forked/syntastic/autoload/syntastic/preprocess.vim new file mode 100644 index 00000000..56998d26 --- /dev/null +++ b/sources_non_forked/syntastic/autoload/syntastic/preprocess.vim @@ -0,0 +1,142 @@ +if exists("g:loaded_syntastic_preprocess_autoload") || !exists("g:loaded_syntastic_plugin") + finish +endif +let g:loaded_syntastic_preprocess_autoload = 1 + +let s:save_cpo = &cpo +set cpo&vim + +" Public functions {{{1 + +function! syntastic#preprocess#cabal(errors) " {{{2 + let out = [] + let star = 0 + for err in a:errors + if star + if err == '' + let star = 0 + else + let out[-1] .= ' ' . err + endif + else + call add(out, err) + if err =~ '\m^*\s' + let star = 1 + endif + endif + endfor + return out +endfunction " }}}2 + +function! syntastic#preprocess#checkstyle(errors) " {{{2 + let out = [] + let fname = expand('%') + for err in a:errors + if match(err, '\m') > -1 + let line = str2nr(matchstr(err, '\m\ \[[^]]+\])+\ze:'', "", "")') +endfunction " }}}2 + +function! syntastic#preprocess#killEmpty(errors) " {{{2 + return filter(copy(a:errors), 'v:val != ""') +endfunction " }}}2 + +function! syntastic#preprocess#perl(errors) " {{{2 + let out = [] + + for e in a:errors + let parts = matchlist(e, '\v^(.*)\sat\s(.*)\sline\s(\d+)(.*)$') + if !empty(parts) + call add(out, parts[2] . ':' . parts[3] . ':' . parts[1] . parts[4]) + endif + endfor + + return syntastic#util#unique(out) +endfunction " }}}2 + +function! syntastic#preprocess#rparse(errors) " {{{2 + let errlist = copy(a:errors) + + " remove uninteresting lines and handle continuations + let i = 0 + while i < len(errlist) + if i > 0 && errlist[i][:1] == ' ' && errlist[i] !~ '\m\s\+\^$' + let errlist[i-1] .= errlist[i][1:] + call remove(errlist, i) + elseif errlist[i] !~ '\m^\(Lint:\|Lint checking:\|Error in\) ' + call remove(errlist, i) + else + let i += 1 + endif + endwhile + + let out = [] + let fname = '' + for e in errlist + if match(e, '\m^Lint: ') == 0 + let parts = matchlist(e, '\m^Lint: \(.*\): found on lines \([0-9, ]\+\)\(+\(\d\+\) more\)\=') + if len(parts) >= 3 + for line in split(parts[2], '\m,\s*') + call add(out, 'E:' . fname . ':' . line . ': ' . parts[1]) + endfor + endif + if len(parts) >= 5 && parts[4] != '' + call add(out, 'E:' . fname . ':0: ' . parts[1] . ' - ' . parts[4] . ' messages not shown') + endif + elseif match(e, '\m^Lint checking: ') == 0 + let fname = matchstr(e, '\m^Lint checking: \zs.*') + elseif match(e, '\m^Error in ') == 0 + call add(out, substitute(e, '\m^Error in .\+ : .\+\ze:\d\+:\d\+: ', 'E:' . fname, '')) + endif + endfor + + return out +endfunction " }}}2 + +function! syntastic#preprocess#tslint(errors) " {{{2 + return map(copy(a:errors), 'substitute(v:val, ''\m^\(([^)]\+)\)\s\(.\+\)$'', ''\2 \1'', "")') +endfunction " }}}2 + +function! syntastic#preprocess#validator(errors) " {{{2 + let out = [] + for e in a:errors + let parts = matchlist(e, '\v^"([^"]+)"(.+)') + if len(parts) >= 3 + " URL decode, except leave alone any "+" + let parts[1] = substitute(parts[1], '\m%\(\x\x\)', '\=nr2char("0x".submatch(1))', 'g') + let parts[1] = substitute(parts[1], '\m\\"', '"', 'g') + let parts[1] = substitute(parts[1], '\m\\\\', '\\', 'g') + call add(out, '"' . parts[1] . '"' . parts[2]) + endif + endfor + return out +endfunction " }}}2 + +" }}}1 + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set sw=4 sts=4 et fdm=marker: diff --git a/sources_non_forked/syntastic/autoload/syntastic/util.vim b/sources_non_forked/syntastic/autoload/syntastic/util.vim new file mode 100644 index 00000000..51831b47 --- /dev/null +++ b/sources_non_forked/syntastic/autoload/syntastic/util.vim @@ -0,0 +1,286 @@ +if exists('g:loaded_syntastic_util_autoload') || !exists("g:loaded_syntastic_plugin") + finish +endif +let g:loaded_syntastic_util_autoload = 1 + +let s:save_cpo = &cpo +set cpo&vim + +" Public functions {{{1 + +function! syntastic#util#isRunningWindows() " {{{2 + return has('win16') || has('win32') || has('win64') +endfunction " }}}2 + +function! syntastic#util#DevNull() " {{{2 + if syntastic#util#isRunningWindows() + return 'NUL' + endif + return '/dev/null' +endfunction " }}}2 + +" Get directory separator +function! syntastic#util#Slash() abort " {{{2 + return (!exists("+shellslash") || &shellslash) ? '/' : '\' +endfunction " }}}2 + +"search the first 5 lines of the file for a magic number and return a map +"containing the args and the executable +" +"e.g. +" +"#!/usr/bin/perl -f -bar +" +"returns +" +"{'exe': '/usr/bin/perl', 'args': ['-f', '-bar']} +function! syntastic#util#parseShebang() " {{{2 + for lnum in range(1, 5) + let line = getline(lnum) + if line =~ '^#!' + let line = substitute(line, '\v^#!\s*(\S+/env(\s+-\S+)*\s+)?', '', '') + let exe = matchstr(line, '\m^\S*\ze') + let args = split(matchstr(line, '\m^\S*\zs.*')) + return { 'exe': exe, 'args': args } + endif + endfor + + return { 'exe': '', 'args': [] } +endfunction " }}}2 + +" Get the value of a variable. Allow local variables to override global ones. +function! syntastic#util#var(name, ...) " {{{2 + return + \ exists('b:syntastic_' . a:name) ? b:syntastic_{a:name} : + \ exists('g:syntastic_' . a:name) ? g:syntastic_{a:name} : + \ a:0 > 0 ? a:1 : '' +endfunction " }}}2 + +" Parse a version string. Return an array of version components. +function! syntastic#util#parseVersion(version) " {{{2 + return map(split(matchstr( a:version, '\v^\D*\zs\d+(\.\d+)+\ze' ), '\m\.'), 'str2nr(v:val)') +endfunction " }}}2 + +" Run 'command' in a shell and parse output as a version string. +" Returns an array of version components. +function! syntastic#util#getVersion(command) " {{{2 + return syntastic#util#parseVersion(system(a:command)) +endfunction " }}}2 + +" Verify that the 'installed' version is at least the 'required' version. +" +" 'installed' and 'required' must be arrays. If they have different lengths, +" the "missing" elements will be assumed to be 0 for the purposes of checking. +" +" See http://semver.org for info about version numbers. +function! syntastic#util#versionIsAtLeast(installed, required) " {{{2 + return syntastic#util#compareLexi(a:installed, a:required) >= 0 +endfunction " }}}2 + +" Almost lexicographic comparison of two lists of integers. :) If lists +" have different lengths, the "missing" elements are assumed to be 0. +function! syntastic#util#compareLexi(a, b) " {{{2 + for idx in range(max([len(a:a), len(a:b)])) + let a_element = str2nr(get(a:a, idx, 0)) + let b_element = str2nr(get(a:b, idx, 0)) + if a_element != b_element + return a_element > b_element ? 1 : -1 + endif + endfor + " Everything matched, so it is at least the required version. + return 0 +endfunction " }}}2 + +" strwidth() was added in Vim 7.3; if it doesn't exist, we use strlen() +" and hope for the best :) +let s:width = function(exists('*strwidth') ? 'strwidth' : 'strlen') +lockvar s:width + +function! syntastic#util#screenWidth(str, tabstop) " {{{2 + let chunks = split(a:str, "\t", 1) + let width = s:width(chunks[-1]) + for c in chunks[:-2] + let cwidth = s:width(c) + let width += cwidth + a:tabstop - cwidth % a:tabstop + endfor + return width +endfunction " }}}2 + +"print as much of a:msg as possible without "Press Enter" prompt appearing +function! syntastic#util#wideMsg(msg) " {{{2 + let old_ruler = &ruler + let old_showcmd = &showcmd + + "This is here because it is possible for some error messages to + "begin with \n which will cause a "press enter" prompt. + let msg = substitute(a:msg, "\n", "", "g") + + "convert tabs to spaces so that the tabs count towards the window + "width as the proper amount of characters + let chunks = split(msg, "\t", 1) + let msg = join(map(chunks[:-2], 'v:val . repeat(" ", &tabstop - s:width(v:val) % &tabstop)'), '') . chunks[-1] + let msg = strpart(msg, 0, &columns - 1) + + set noruler noshowcmd + call syntastic#util#redraw(0) + + echo msg + + let &ruler = old_ruler + let &showcmd = old_showcmd +endfunction " }}}2 + +" Check whether a buffer is loaded, listed, and not hidden +function! syntastic#util#bufIsActive(buffer) " {{{2 + " convert to number, or hell breaks loose + let buf = str2nr(a:buffer) + + if !bufloaded(buf) || !buflisted(buf) + return 0 + endif + + " get rid of hidden buffers + for tab in range(1, tabpagenr('$')) + if index(tabpagebuflist(tab), buf) >= 0 + return 1 + endif + endfor + + return 0 +endfunction " }}}2 + +" start in directory a:where and walk up the parent folders until it +" finds a file matching a:what; return path to that file +function! syntastic#util#findInParent(what, where) " {{{2 + let here = fnamemodify(a:where, ':p') + + let root = syntastic#util#Slash() + if syntastic#util#isRunningWindows() && here[1] == ':' + " The drive letter is an ever-green source of fun. That's because + " we don't care about running syntastic on Amiga these days. ;) + let root = fnamemodify(root, ':p') + let root = here[0] . root[1:] + endif + + let old = '' + while here != '' + let p = split(globpath(here, a:what), '\n') + + if !empty(p) + return fnamemodify(p[0], ':p') + elseif here ==? root || here ==? old + break + endif + + let old = here + + " we use ':h:h' rather than ':h' since ':p' adds a trailing '/' + " if 'here' is a directory + let here = fnamemodify(here, ':p:h:h') + endwhile + + return '' +endfunction " }}}2 + +" Returns unique elements in a list +function! syntastic#util#unique(list) " {{{2 + let seen = {} + let uniques = [] + for e in a:list + if !has_key(seen, e) + let seen[e] = 1 + call add(uniques, e) + endif + endfor + return uniques +endfunction " }}}2 + +" A less noisy shellescape() +function! syntastic#util#shescape(string) " {{{2 + return a:string =~ '\m^[A-Za-z0-9_/.-]\+$' ? a:string : shellescape(a:string) +endfunction " }}}2 + +" A less noisy shellescape(expand()) +function! syntastic#util#shexpand(string) " {{{2 + return syntastic#util#shescape(expand(a:string)) +endfunction " }}}2 + +" decode XML entities +function! syntastic#util#decodeXMLEntities(string) " {{{2 + let str = a:string + let str = substitute(str, '\m<', '<', 'g') + let str = substitute(str, '\m>', '>', 'g') + let str = substitute(str, '\m"', '"', 'g') + let str = substitute(str, '\m'', "'", 'g') + let str = substitute(str, '\m&', '\&', 'g') + return str +endfunction " }}}2 + +function! syntastic#util#redraw(full) " {{{2 + if a:full + redraw! + else + redraw + endif +endfunction " }}}2 + +function! syntastic#util#dictFilter(errors, filter) " {{{2 + let rules = s:_translateFilter(a:filter) + " call syntastic#log#debug(g:SyntasticDebugFilters, "applying filter:", rules) + try + call filter(a:errors, rules) + catch /\m^Vim\%((\a\+)\)\=:E/ + let msg = matchstr(v:exception, '\m^Vim\%((\a\+)\)\=:\zs.*') + call syntastic#log#error('quiet_messages: ' . msg) + endtry +endfunction " }}}2 + +" Return a [high, low] list of integers, representing the time +" (hopefully high resolution) since program start +" TODO: This assumes reltime() returns a list of integers. +function! syntastic#util#stamp() " {{{2 + return reltime(g:syntastic_start) +endfunction " }}}2 + +" }}}1 + +" Private functions {{{1 + +function! s:_translateFilter(filters) " {{{2 + let conditions = [] + for k in keys(a:filters) + if type(a:filters[k]) == type([]) + call extend(conditions, map(copy(a:filters[k]), 's:_translateElement(k, v:val)')) + else + call add(conditions, s:_translateElement(k, a:filters[k])) + endif + endfor + + if conditions == [] + let conditions = ["1"] + endif + return len(conditions) == 1 ? conditions[0] : join(map(conditions, '"(" . v:val . ")"'), ' && ') +endfunction " }}}2 + +function! s:_translateElement(key, term) " {{{2 + if a:key ==? 'level' + let ret = 'v:val["type"] !=? ' . string(a:term[0]) + elseif a:key ==? 'type' + let ret = a:term ==? 'style' ? 'get(v:val, "subtype", "") !=? "style"' : 'has_key(v:val, "subtype")' + elseif a:key ==? 'regex' + let ret = 'v:val["text"] !~? ' . string(a:term) + elseif a:key ==? 'file' + let ret = 'bufname(str2nr(v:val["bufnr"])) !~# ' . string(a:term) + else + call syntastic#log#warn('quiet_messages: ignoring invalid key ' . strtrans(string(a:key))) + let ret = "1" + endif + return ret +endfunction " }}}2 + +" }}}1 + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set sw=4 sts=4 et fdm=marker: diff --git a/sources_non_forked/syntastic/doc/syntastic.txt b/sources_non_forked/syntastic/doc/syntastic.txt new file mode 100644 index 00000000..14d4b13e --- /dev/null +++ b/sources_non_forked/syntastic/doc/syntastic.txt @@ -0,0 +1,770 @@ +*syntastic.txt* Syntax checking on the fly has never been so pimp. +*syntastic* + + + It's a bird! It's a plane! ZOMG It's ... ~ + + _____ __ __ _ ~ + / ___/__ ______ / /_____ ______/ /_(_)____ ~ + \__ \/ / / / __ \/ __/ __ `/ ___/ __/ / ___/ ~ + ___/ / /_/ / / / / /_/ /_/ (__ ) /_/ / /__ ~ + /____/\__, /_/ /_/\__/\__,_/____/\__/_/\___/ ~ + /____/ ~ + + + + Reference Manual~ + + +============================================================================== +CONTENTS *syntastic-contents* + + 1.Intro........................................|syntastic-intro| + 1.1.Quick start............................|syntastic-quickstart| + 2.Functionality provided.......................|syntastic-functionality| + 2.1.The statusline flag....................|syntastic-statusline-flag| + 2.2.Error signs............................|syntastic-error-signs| + 2.3.Error window...........................|syntastic-error-window| + 2.4.Error highlighting.....................|syntastic-highlighting| + 2.5.Aggregating errors.....................|syntastic-aggregating-errors| + 2.6.Filtering errors.......................|syntastic-filtering-errors| + 3.Commands.....................................|syntastic-commands| + 4.Global Options...............................|syntastic-global-options| + 5.Checker Options..............................|syntastic-checker-options| + 5.1.Choosing which checkers to use.........|syntastic-filetype-checkers| + 5.2.Choosing the executable................|syntastic-config-exec| + 5.3.Configuring specific checkers..........|syntastic-config-makeprg| + 6.Notes........................................|syntastic-notes| + 6.1.Handling of composite filetypes........|syntastic-composite| + 6.2.Editing files over network.............|syntastic-netrw| + 6.3.Interaction with python-mode...........|syntastic-pymode| + 6.4.Interaction with YouCompleteMe.........|syntastic-ycm| + 6.5.Interaction with the fish shell........|syntastic-fish| + 6.6.Interaction with PowerShell............|syntastic-powershell| + 6.7.Using syntastic with the fizsh shell...|syntastic-fizsh| + 6.8.Interaction with Eclim.................|syntastic-eclim| + 6.9.Interaction with vim-virtualenv........|syntastic-vim-virtualenv| + 7.About........................................|syntastic-about| + 8.License......................................|syntastic-license| + + +============================================================================== +1. Intro *syntastic-intro* + +Syntastic is a syntax checking plugin that runs files through external syntax +checkers. This can be done on demand, or automatically as files are saved and +opened. If syntax errors are detected, the user is notified and is happy +because they didn't have to compile their code or execute their script to find +them. + +Syntastic comes in two parts: the syntax checker plugins, and the core. The +syntax checker plugins are defined on a per-filetype basis where each one wraps +up an external syntax checking program. The core script delegates off to these +plugins and uses their output to provide the syntastic functionality. + +Take a look at the wiki for a list of supported filetypes and checkers: + + https://github.com/scrooloose/syntastic/wiki/Syntax-Checkers + +Note: This doc only deals with using syntastic. To learn how to write syntax +checker integrations, see the guide on the github wiki: + + https://github.com/scrooloose/syntastic/wiki/Syntax-Checker-Guide + +------------------------------------------------------------------------------ +1.1. Quick start *syntastic-quickstart* + +Syntastic comes preconfigured with a default list of enabled checkers per +filetype. This list is kept reasonably short to prevent slowing down Vim or +trying to use conflicting checkers. + +You can see the list checkers available for the current filetype with the +|:SyntasticInfo| command. + +If you want to override the configured list of checkers for a filetype then +see |syntastic-checker-options| for details. You can also change the arguments +passed to a specific checker as well. + +Use |:SyntasticCheck| to manually check right now. Use |:SyntasticToggleMode| +to switch between active (checking on writing the buffer) and passive (manual) +checking. + +============================================================================== +2. Functionality provided *syntastic-functionality* + +Syntax checking can be done automatically or on demand (see +|'syntastic_mode_map'| and |:SyntasticToggleMode| for configuring this). + +When syntax checking is done, the features below can be used to notify the +user of errors. See |syntastic-global-options| for how to configure and +activate/deactivate these features. + + * A statusline flag + * Signs beside lines with errors + * The |location-list| can be populated with the errors for the associated + buffer + * Erroneous parts of lines can be highlighted (this functionality is only + provided by some syntax checkers) + * Balloons (if the |+balloon_eval| feature is compiled in) can be used to + display error messages for erroneous lines when hovering the mouse over + them + * Error messages from multiple checkers can be aggregated in a single list + +------------------------------------------------------------------------------ +2.1. The statusline flag *syntastic-statusline-flag* + +To use the statusline flag, this must appear in your |'statusline'| setting > + %{SyntasticStatuslineFlag()} +< +Something like this could be more useful: > + set statusline+=%#warningmsg# + set statusline+=%{SyntasticStatuslineFlag()} + set statusline+=%* +< +When syntax errors are detected a flag will be shown. The content of the flag +is derived from the |syntastic_stl_format| option. + +------------------------------------------------------------------------------ +2.2. Error signs *syntastic-error-signs* + +Syntastic uses the |:sign| commands to mark lines with errors and warnings in +the sign column. To enable this feature, use the |'syntastic_enable_signs'| +option. + +Signs are colored using the Error and Todo syntax highlight groups by default. +If you wish to customize the colors for the signs, you can use the following +groups: + SyntasticErrorSign - For syntax errors, links to 'error' by default + SyntasticWarningSign - For syntax warnings, links to 'todo' by default + SyntasticStyleErrorSign - For style errors, links to 'SyntasticErrorSign' + by default + SyntasticStyleWarningSign - For style warnings, links to + 'SyntasticWarningSign' by default + +Example: > + highlight SyntasticErrorSign guifg=white guibg=red +< +To set up highlighting for the line where a sign resides, you can use the +following highlight groups: + SyntasticErrorLine + SyntasticWarningLine + SyntasticStyleErrorLine - Links to 'SyntasticErrorLine' by default + SyntasticStyleWarningLine - Links to 'SyntasticWarningLine' by default + +Example: > + highlight SyntasticErrorLine guibg=#2f0000 +< +------------------------------------------------------------------------------ +2.3. The error window *:Errors* *syntastic-error-window* + +You can use the :Errors command to display the errors for the current buffer +in the |location-list|. + +Note that when you use :Errors, the current location list is overwritten with +Syntastic's own location list. + +------------------------------------------------------------------------------ +2.4. Error highlighting *syntastic-highlighting* + +Some checkers provide enough information for syntastic to be able to highlight +errors. By default the SpellBad syntax highlight group is used to color errors, +and the SpellCap group is used for warnings. If you wish to customize the +colors for highlighting you can use the following groups: + SyntasticError - Links to 'SpellBad' by default + SyntasticWarning - Links to 'SpellCap' by default + SyntasticStyleError - Links to SyntasticError by default + SyntasticStyleWarning - Links to SyntasticWarning by default + +Example: > + highlight SyntasticError guibg=#2f0000 +< +------------------------------------------------------------------------------ +2.5. Aggregating errors *syntastic-aggregating-errors* + +By default, namely if |'syntastic_aggregate_errors'| is unset, syntastic runs +in turn the checkers corresponding to the filetype of the current file (see +|syntastic-filetype-checkers|), and stops as soon as a checker reports any +errors. It then notifies you of the errors using the notification mechanisms +above. In this mode error lists are always produced by a single checker, and, +if you open the error window, the name of the checker that generated the errors +is shown on the statusline of the error window. + +If |'syntastic_aggregate_errors'| is set, syntastic runs all checkers that +apply (still cf. |syntastic-filetype-checkers|), then aggregates errors found +by all checkers in a single list, and notifies you. In this mode each error +message is labeled with the name of the checker that generated it, but you can +disable generation of these labels by turning off '|syntastic_id_checkers|'. + +If |'syntastic_sort_aggregated_errors'| is set (which is the default), messages +in the aggregated list are grouped by file, then sorted by line number, then +type, then column number. Otherwise messages produced by the same checker are +grouped together. + +------------------------------------------------------------------------------ +2.6 Filtering errors *syntastic-filtering-errors* + +You can selectively disable some of the errors found by checkers either +using |'syntastic_quiet_messages'|, or by specifying a list of patterns in +|'syntastic_ignore_files'|. + +See also: |'syntastic___quiet_messages'|. + +============================================================================== +3. Commands *syntastic-commands* + +:Errors *:SyntasticErrors* + +When errors have been detected, use this command to pop up the |location-list| +and display the error messages. + +:SyntasticToggleMode *:SyntasticToggleMode* + +Toggles syntastic between active and passive mode. See |'syntastic_mode_map'| +for more info. + +:SyntasticCheck *:SyntasticCheck* + +Manually cause a syntax check to be done. By default the checkers in the +|'g:syntastic__checkers'| or |'b:syntastic_checkers'| lists are run, +cf. |syntastic-filetype-checkers|. If |syntastic_aggregate_errors| is unset +(which is the default), checking stops the first time a checker reports any +errors; if |syntastic_aggregate_errors| is set, all checkers that apply are run +in turn, and all errors found are aggregated in a single list. + +The command may be followed by a (space separated) list of checkers. In this +case |'g:syntastic__checkers'| and |'b:syntastic_checkers'| are +ignored, and the checkers named by the command's arguments are run instead, in +the order specified. The rules of |syntastic_aggregate_errors| still apply. + +Example: > + :SyntasticCheck flake8 pylint +< +:SyntasticInfo *:SyntasticInfo* + +The command takes an optional argument, and outputs information about the +checkers available for the filetype named by said argument, or for the current +filetype if no argument was provided. + +:SyntasticReset *:SyntasticReset* + +Resets the list of errors and turns off all error notifiers. + +:SyntasticSetLoclist *:SyntasticSetLoclist* + +If |'syntastic_always_populate_loc_list'| is not set, the |location-list| is +not filled in automatically with the list of errors detected by the checkers. +This is useful if you run syntastic along with other plugins that use location +lists. The |:SyntasticSetLoclist| command allows you to stick the errors into +the location list explicitly. + +============================================================================== +4. Global Options *syntastic-global-options* + + + *'syntastic_check_on_open'* +Default: 0 +If enabled, syntastic will do syntax checks when buffers are first loaded as +well as on saving > + let g:syntastic_check_on_open = 1 +< + *'syntastic_check_on_wq'* +Default: 1 +Normally syntastic runs syntax checks whenever buffers are written to disk. +If you want to skip these checks when you issue |:wq|, |:x|, and |:ZZ|, set this +variable to 0. > + let g:syntastic_check_on_wq = 0 +< + *'syntastic_aggregate_errors'* +Default: 0 +When enabled, syntastic runs all checkers that apply to the current filetype, +then aggregates errors found by all checkers and displays them. When disabled, +syntastic runs each checker in turn, and stops to display the results the first +time a checker finds any errors. > + let g:syntastic_aggregate_errors = 1 +< + *'syntastic_id_checkers'* +Default: 1 +When results from multiple checkers are aggregated in a single error list +(that is either when |syntastic_aggregate_errors| is enabled, or when checking +a file with a composite filetype), it might not be immediately obvious which +checker has produced a given error message. This variable instructs syntastic +to label error messages with the names of the checkers that created them. > + let g:syntastic_id_checkers = 0 +< + *'syntastic_sort_aggregated_errors'* +Default: 1 +By default, when results from multiple checkers are aggregated in a single +error list (that is either when |syntastic_aggregate_errors| is enabled, or +when checking a file with a composite filetype), errors are grouped by file, +then sorted by line number, then grouped by type (namely errors take precedence +over warnings), then they are sorted by column number. If you want to leave +messages grouped by checker output, set this variable to 0. > + let g:syntastic_sort_aggregated_errors = 0 +< + *'syntastic_echo_current_error'* +Default: 1 +If enabled, syntastic will echo current error to the command window. If +multiple errors are found on the same line, |syntastic_cursor_columns| is used +to decide which one is shown. > + let g:syntastic_echo_current_error = 1 +< + *'syntastic_cursor_columns'* +Default: 1 +This option controls which errors are echoed to the command window if +|syntastic_echo_current_error| is set and multiple errors are found on the same +line. When the option is enabled, the first error corresponding to the current +column is show. Otherwise, the first error on the current line is echoed, +regardless of the cursor position on the current line. + +When dealing with very large lists of errors, disabling this option can speed +up navigation significantly: > + let g:syntastic_cursor_column = 0 +< + *'syntastic_enable_signs'* +Default: 1 +Use this option to tell syntastic whether to use the |:sign| interface to mark +syntax errors: > + let g:syntastic_enable_signs = 1 +< + *'syntastic_error_symbol'* *'syntastic_style_error_symbol'* + *'syntastic_warning_symbol'* *'syntastic_style_warning_symbol'* +Use this option to control what the syntastic |:sign| text contains. Several +error symbols can be customized: + syntastic_error_symbol - For syntax errors, defaults to '>>' + syntastic_style_error_symbol - For style errors, defaults to 'S>' + syntastic_warning_symbol - For syntax warnings, defaults to '>>' + syntastic_style_warning_symbol - For style warnings, defaults to 'S>' + +Example: > + let g:syntastic_error_symbol = "✗" + let g:syntastic_warning_symbol = "⚠" +< + *'syntastic_enable_balloons'* +Default: 1 +Use this option to tell syntastic whether to display error messages in balloons +when the mouse is hovered over erroneous lines: > + let g:syntastic_enable_balloons = 1 +< +Note that Vim must be compiled with |+balloon_eval|. + + *'syntastic_enable_highlighting'* +Default: 1 +Use this option to tell syntastic whether to use syntax highlighting to mark +errors (where possible). Highlighting can be turned off with the following > + let g:syntastic_enable_highlighting = 0 +< + *'syntastic_always_populate_loc_list'* +Default: 0 +Enable this option to tell syntastic to always stick any detected errors into +the |location-list|: > + let g:syntastic_always_populate_loc_list = 1 +< + *'syntastic_auto_jump'* +Default: 0 +Enable this option if you want the cursor to jump to the first detected issue +when saving or opening a file. + +When set to 0 the cursor won't jump automatically. > + let g:syntastic_auto_jump = 0 +< +When set to 1 the cursor will always jump to the first issue detected. > + let g:syntastic_auto_jump = 1 +< +When set to 2 the cursor will jump to the first issue detected, but only if +this issue is an error. > + let g:syntastic_auto_jump = 2 +< + *'syntastic_auto_loc_list'* +Default: 2 +Use this option to tell syntastic to automatically open and/or close the +|location-list| (see |syntastic-error-window|). + +When set to 0 the error window will not be opened or closed automatically. > + let g:syntastic_auto_loc_list = 0 +< +When set to 1 the error window will be automatically opened when errors are +detected, and closed when none are detected. > + let g:syntastic_auto_loc_list = 1 +< +When set to 2 the error window will be automatically closed when no errors are +detected, but not opened automatically. > + let g:syntastic_auto_loc_list = 2 +< + *'syntastic_loc_list_height'* +Default: 10 +Use this option to specify the height of the location lists that syntastic +opens. > + let g:syntastic_loc_list_height = 5 +< + *'syntastic_ignore_files'* +Default: [] +Use this option to specify files that syntastic should never check. It's a +list of |regular-expression| patterns. The full paths of files (see |::p|) are +matched against these patterns, and the matches are case sensitive. Use |\c| +to specify case insensitive patterns. Example: > + let g:syntastic_ignore_files = ['\m^/usr/include/', '\m\c\.h$'] +< + *'syntastic_filetype_map'* +Default: {} +Use this option to map non-standard filetypes to standard ones. Corresponding +checkers are mapped accordingly, which allows syntastic to check files with +non-standard filetypes: > + let g:syntastic_filetype_map = { "latex": "tex", + \ "gentoo-metadata": "xml" } +< +Composite filetypes can also be mapped to simple types, which disables the +default behaviour of running both checkers against the input file: > + let g:syntastic_filetype_map = { "handlebars.html": "handlebars" } +< + *'syntastic_mode_map'* +Default: { "mode": "active", + "active_filetypes": [], + "passive_filetypes": [] } + +Use this option to fine tune when automatic syntax checking is done (or not +done). + +The option should be set to something like: > + + let g:syntastic_mode_map = { "mode": "active", + \ "active_filetypes": ["ruby", "php"], + \ "passive_filetypes": ["puppet"] } +< +"mode" can be mapped to one of two values - "active" or "passive". When set +to "active", syntastic does automatic checking whenever a buffer is saved or +initially opened. When set to "passive" syntastic only checks when the user +calls |:SyntasticCheck|. + +The exceptions to these rules are defined with "active_filetypes" and +"passive_filetypes". In passive mode, automatic checks are still done for +filetypes in the "active_filetypes" array (and "passive_filetypes" is +ignored). In active mode, automatic checks are not done for any filetypes in +the "passive_filetypes" array ("active_filetypes" is ignored). + +If any of "mode", "active_filetypes", or "passive_filetypes" are left +unspecified, they default to values above. + +At runtime, the |:SyntasticToggleMode| command can be used to switch between +active and passive modes. + + *'syntastic_quiet_messages'* +Default: {} + +Use this option to filter out some of the messages produced by checkers. The +option should be set to something like: > + let g:syntastic_quiet_messages = { "level": "warnings", + \ "type": "style", + \ "regex": '\m\[C03\d\d\]', + \ "file": ['\m^/usr/include/', '\m\c\.h$'] } +< +Each element turns off messages matching the patterns specified by the +corresponding value. Values are lists, but if a list consist of a single +element you can omit adding the brackets (e.g. you can write "style" instead +of ["style"]). Elements with values [] or '' are ignored (this is useful for +overriding filters, cf. |filter-overrides|). + + "level" - takes one of two values, "warnings" or "errors" + "type" - can be either "syntax" or "style" + "regex" - is matched against the messages' text as a case insensitive + |regular-expression| + "file" - is matched against the filename the error refers to, as a case + sensitive |regular-expression|. + +If |'syntastic_id_checkers'| is set, filters are applied before error messages +are labeled with the names of the checkers that created them. + +There are also checker-specific variants of this option, providing finer +control. They are named |'syntastic___quiet_messages'|. + +For a particular checker, if both a |'syntastic_quiet_messages'| filter and +a checker-specific filter are present, they are both applied (to the list of +errors produced by the said checker). In case of conflicting values for the +same keys, the values of the checker-specific filters take precedence. + + *filter-overrides* +Since filter elements with values [] or '' are ignored, you can disable global +filters for particular checkers, by setting the values of the corresponding +elements in |'syntastic___quiet_messages'| to [] or ''. For +example, the following setting will silence all warnings, except for the +ones produced by "pylint": > + let g:syntastic_quiet_messages = { "level": "warnings" } + let g:syntastic_python_pylint_quiet_messages = { "level" : [] } +< + *'syntastic_stl_format'* +Default: [Syntax: line:%F (%t)] +Use this option to control what the syntastic statusline text contains. Several +magic flags are available to insert information: + %e - number of errors + %w - number of warnings + %t - total number of warnings and errors + %fe - line number of first error + %fw - line number of first warning + %F - line number of first warning or error + +Several additional flags are available to hide text under certain conditions: + %E{...} - hide the text in the brackets unless there are errors + %W{...} - hide the text in the brackets unless there are warnings + %B{...} - hide the text in the brackets unless there are both warnings AND + errors +These flags can't be nested. + +Example: > + let g:syntastic_stl_format = '[%E{Err: %fe #%e}%B{, }%W{Warn: %fw #%w}]' +< +If this format is used and the current buffer has 5 errors and 1 warning +starting on lines 20 and 10 respectively then this would appear on the +statusline: > + [Err: 20 #5, Warn: 10 #1] +< +If the buffer had 2 warnings, starting on line 5 then this would appear: > + [Warn: 5 #2] +< + *'syntastic_full_redraws'* +Default: 0 in GUI Vim and MacVim, 1 otherwise +Controls whether syntastic calls |:redraw| or |:redraw!| for screen redraws. +Changing it can in principle make screen redraws smoother, but it can also +cause screen to flicker, or cause ghost characters. Leaving it to the default +should be safe. + + *'syntastic_debug'* +Default: 0 +Set this to the sum of one or more of the following flags to enable +debugging: + + 1 - trace checker calls + 2 - dump location lists + 4 - trace notifiers + 8 - trace autocommands + 16 - dump options + +Example: > + let g:syntastic_debug = 1 +< +Syntastic will then add debugging messages to Vim's |message-history|. You can +examine these messages with |:mes|. + + *'syntastic_debug_file'* +Default: unset +When set, debugging messages are written to the file named by its value, in +addition to being added to Vim's |message-history|: > + let g:syntastic_debug_file = '~/syntastic.log' +< + *'syntastic_extra_filetypes'* +Default: [] +List of filetypes handled by checkers external to syntastic. If you have a Vim +plugin that adds a checker for syntastic, and if the said checker deals with a +filetype that is unknown to syntastic, you might consider adding that filetype +to this list: > + let g:syntastic_extra_filetypes = [ "make", "gitcommit" ] +< +This will allow |:SyntasticInfo| to do proper tab completion for the new +filetypes. + +============================================================================== +5. Checker Options *syntastic-checker-options* + +------------------------------------------------------------------------------ +5.1 Choosing which checkers to use *syntastic-filetype-checkers* + + *'g:syntastic__checkers'* +You can tell syntastic which checkers to run for a given filetype by setting a +variable 'g:syntastic__checkers' to a list of checkers, e.g. > + let g:syntastic_php_checkers = ["php", "phpcs", "phpmd"] +< + *'b:syntastic_checkers'* +There is also a per-buffer version of this setting, 'b:syntastic_checkers'. +When set, it takes precedence over |'g:syntastic__checkers'|. You can +use this in an autocmd to configure specific checkers for particular paths: > + autocmd FileType python if stridx(expand("%:p"), "/some/path/") == 0 | + \ let b:syntastic_checkers = ["pylint"] | endif +< +If neither |'g:syntastic__checkers'| nor |'b:syntastic_checkers'| +is set, a default list of checker is used. Beware however that this list +deliberately kept minimal, for performance reasons. + +Take a look at the wiki to find out what checkers and filetypes are supported +by syntastic: + + https://github.com/scrooloose/syntastic/wiki/Syntax-Checkers + +Use |:SyntasticInfo| to see which checkers are available for a given filetype. + +------------------------------------------------------------------------------ +5.2 Choosing the executable *syntastic-config-exec* + + *'syntastic___exec'* +The executable used by a checker is normally defined automatically, when the +checkers is registered. You can however override it by setting the variable +'g:syntastic___exec': > + let g:syntastic_ruby_mri_exec = '~/bin/ruby2' +< +------------------------------------------------------------------------------ +5.3 Configuring specific checkers *syntastic-config-makeprg* + +Most checkers use the 'makeprgBuild()' function and provide many options by +default - in fact you can customise every part of the command that gets called. + + *'syntastic___
lacks \"summary\" attribute", + \ "not approved by W3C", + \ " proprietary attribute \"placeholder\"", + \ " proprietary attribute \"charset\"", + \ " lacks \"content\" attribute", + \ "inserting \"type\" attribute", + \ "proprietary attribute \"data-", + \ "missing declaration", + \ "inserting implicit ", + \ "inserting missing 'title' element", + \ "unescaped & or unknown entity", + \ " attribute \"type\" has invalid value", + \ "proprietary attribute \"role\"", + \ "proprietary attribute \"aria-activedescendant\"", + \ "proprietary attribute \"aria-atomic\"", + \ "proprietary attribute \"aria-autocomplete\"", + \ "proprietary attribute \"aria-busy\"", + \ "proprietary attribute \"aria-checked\"", + \ "proprietary attribute \"aria-controls\"", + \ "proprietary attribute \"aria-describedby\"", + \ "proprietary attribute \"aria-disabled\"", + \ "proprietary attribute \"aria-dropeffect\"", + \ "proprietary attribute \"aria-expanded\"", + \ "proprietary attribute \"aria-flowto\"", + \ "proprietary attribute \"aria-grabbed\"", + \ "proprietary attribute \"aria-haspopup\"", + \ "proprietary attribute \"aria-hidden\"", + \ "proprietary attribute \"aria-invalid\"", + \ "proprietary attribute \"aria-label\"", + \ "proprietary attribute \"aria-labelledby\"", + \ "proprietary attribute \"aria-level\"", + \ "proprietary attribute \"aria-live\"", + \ "proprietary attribute \"aria-multiline\"", + \ "proprietary attribute \"aria-multiselectable\"", + \ "proprietary attribute \"aria-orientation\"", + \ "proprietary attribute \"aria-owns\"", + \ "proprietary attribute \"aria-posinset\"", + \ "proprietary attribute \"aria-pressed\"", + \ "proprietary attribute \"aria-readonly\"", + \ "proprietary attribute \"aria-relevant\"", + \ "proprietary attribute \"aria-relevant\"", + \ "proprietary attribute \"aria-required\"", + \ "proprietary attribute \"aria-selected\"", + \ "proprietary attribute \"aria-setsize\"", + \ "proprietary attribute \"aria-sort\"", + \ "proprietary attribute \"aria-valuemax\"", + \ "proprietary attribute \"aria-valuemin\"", + \ "proprietary attribute \"aria-valuenow\"", + \ "proprietary attribute \"aria-valuetext\"" + \ ] +lockvar! s:ignore_errors + +let s:blocklevel_tags = [ + \ "main", + \ "section", + \ "article", + \ "aside", + \ "header", + \ "footer", + \ "nav", + \ "figure", + \ "figcaption" + \ ] +lockvar! s:blocklevel_tags + +let s:inline_tags = [ + \ "video", + \ "audio", + \ "source", + \ "embed", + \ "mark", + \ "progress", + \ "meter", + \ "time", + \ "ruby", + \ "rt", + \ "rp", + \ "canvas", + \ "command", + \ "details", + \ "datalist" + \ ] +lockvar! s:inline_tags + +let s:empty_tags = [ + \ "wbr", + \ "keygen" + \ ] +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 + return 1 + endif + endfor + return 0 +endfunction + +function! s:NewTags(name) + return syntastic#util#shescape(join( s:{a:name} + g:syntastic_html_tidy_{a:name}, ',' )) +endfunction + +function! s:Args() + let args = s:TidyEncOptByFenc() . + \ ' --new-blocklevel-tags ' . s:NewTags('blocklevel_tags') . + \ ' --new-inline-tags ' . s:NewTags('inline_tags') . + \ ' --new-empty-tags ' . s:NewTags('empty_tags') . + \ ' -e' + return args +endfunction + +function! SyntaxCheckers_html_tidy_GetLocList() dict + let makeprg = self.makeprgBuild({ 'args_after': s:Args() }) + + let errorformat = + \ '%Wline %l column %v - Warning: %m,' . + \ '%Eline %l column %v - Error: %m,' . + \ '%-G%.%#' + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'defaults': {'bufnr': bufnr("")}, + \ 'returns': [0, 1, 2] }) + + " filter out valid HTML5 from the errors + for e in loclist + if e['valid'] && s:IgnoreError(e['text']) == 1 + let e['valid'] = 0 + endif + endfor + + return loclist +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'html', + \ 'name': 'tidy'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/html/validator.vim b/sources_non_forked/syntastic/syntax_checkers/html/validator.vim new file mode 100644 index 00000000..6a8e503d --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/html/validator.vim @@ -0,0 +1,87 @@ +"============================================================================ +"File: validator.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: LCD 47 +"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. +" +"============================================================================ +" +" For detail;s about validator see: http://about.validator.nu/ +" +" Checker options: +" +" - g:syntastic_html_validator_api (string; default: 'http://validator.nu/') +" URL of the service to use for checking; leave it to the default to run the +" checks against http://validator.nu/, or set it to 'http://localhost:8888/' +" if you're running a local service as per http://about.validator.nu/#src +" +" - g:syntastic_html_validator_parser (string; default: empty) +" parser to use; legal values are: xml, xmldtd, html, html5, html4, html4tr; +" set it to 'html5' to check HTML5 files; see the wiki for reference: +" http://wiki.whatwg.org/wiki/Validator.nu_Common_Input_Parameters#parser +" +" - g:syntastic_html_validator_nsfilter (string; default: empty) +" sets the nsfilter for the parser; see the wiki for details: +" http://wiki.whatwg.org/wiki/Validator.nu_Common_Input_Parameters#nsfilter + +if exists("g:loaded_syntastic_html_validator_checker") + finish +endif +let g:loaded_syntastic_html_validator_checker=1 + +if !exists('g:syntastic_html_validator_api') + let g:syntastic_html_validator_api = 'http://validator.nu/' +endif + +if !exists('g:syntastic_html_validator_parser') + let g:syntastic_html_validator_parser = '' +endif + +if !exists('g:syntastic_html_validator_nsfilter') + let g:syntastic_html_validator_nsfilter = '' +endif + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_html_validator_GetLocList() dict + let fname = syntastic#util#shexpand('%') + let makeprg = self.getExecEscaped() . ' -s --compressed -F out=gnu -F asciiquotes=yes' . + \ (g:syntastic_html_validator_parser != '' ? ' -F parser=' . g:syntastic_html_validator_parser : '') . + \ (g:syntastic_html_validator_nsfilter != '' ? ' -F nsfilter=' . g:syntastic_html_validator_nsfilter : '') . + \ ' -F doc=@' . fname . '\;type=text/html\;filename=' . fname . ' ' . g:syntastic_html_validator_api + + let errorformat = + \ '%E"%f":%l: %trror: %m,' . + \ '%E"%f":%l-%\d%\+: %trror: %m,' . + \ '%E"%f":%l%\%.%c: %trror: %m,' . + \ '%E"%f":%l%\%.%c-%\d%\+%\%.%\d%\+: %trror: %m,' . + \ '%E"%f":%l: %trror fatal: %m,' . + \ '%E"%f":%l-%\d%\+: %trror fatal: %m,' . + \ '%E"%f":%l%\%.%c: %trror fatal: %m,' . + \ '%E"%f":%l%\%.%c-%\d%\+%\%.%\d%\+: %trror fatal: %m,' . + \ '%W"%f":%l: info %tarning: %m,' . + \ '%W"%f":%l-%\d%\+: info %tarning: %m,' . + \ '%W"%f":%l%\%.%c: info %tarning: %m,' . + \ '%W"%f":%l%\%.%c-%\d%\+%\%.%\d%\+: info %tarning: %m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'preprocess': 'validator', + \ 'returns': [0] }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'html', + \ 'name': 'validator', + \ 'exec': 'curl' }) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/html/w3.vim b/sources_non_forked/syntastic/syntax_checkers/html/w3.vim new file mode 100644 index 00000000..747b7583 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/html/w3.vim @@ -0,0 +1,69 @@ +"============================================================================ +"File: w3.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Martin Grenfell +"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. +" +"============================================================================ +" +" Checker option: +" +" - g:syntastic_html_w3_api (string; default: 'http://validator.w3.org/check') +" URL of the service to use for checking; leave it to the default to run the +" checks against http://validator.w3.org/, or set it to +" 'http://localhost/w3c-validator/check' if you're running a local service + +if exists("g:loaded_syntastic_html_w3_checker") + finish +endif +let g:loaded_syntastic_html_w3_checker = 1 + +if !exists('g:syntastic_html_w3_api') + let g:syntastic_html_w3_api = 'http://validator.w3.org/check' +endif + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_html_w3_GetLocList() dict + let makeprg = self.getExecEscaped() . ' -s -F output=json ' . + \ '-F uploaded_file=@' . syntastic#util#shexpand('%:p') . '\;type=text/html ' . + \ g:syntastic_html_w3_api + + let errorformat = + \ '%A %\+{,' . + \ '%C %\+"lastLine": %l\,%\?,' . + \ '%C %\+"lastColumn": %c\,%\?,' . + \ '%C %\+"message": "%m"\,%\?,' . + \ '%C %\+"type": "%trror"\,%\?,' . + \ '%-G %\+"type": "%tnfo"\,%\?,' . + \ '%C %\+"subtype": "%tarning"\,%\?,' . + \ '%Z %\+}\,,' . + \ '%-G%.%#' + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'defaults': {'bufnr': bufnr("")}, + \ 'returns': [0] }) + + for e in loclist + let e['text'] = substitute(e['text'], '\m\\\([\"]\)', '\1', 'g') + endfor + + return loclist +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'html', + \ 'name': 'w3', + \ 'exec': 'curl' }) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/java/checkstyle.vim b/sources_non_forked/syntastic/syntax_checkers/java/checkstyle.vim new file mode 100644 index 00000000..387c2c9f --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/java/checkstyle.vim @@ -0,0 +1,62 @@ +"============================================================================ +"File: checkstyle.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Dmitry Geurkov +"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. +" +" Tested with checkstyle 5.5 +"============================================================================ + +if exists("g:loaded_syntastic_java_checkstyle_checker") + finish +endif +let g:loaded_syntastic_java_checkstyle_checker = 1 + +if !exists("g:syntastic_java_checkstyle_classpath") + let g:syntastic_java_checkstyle_classpath = 'checkstyle-5.5-all.jar' +endif + +if !exists("g:syntastic_java_checkstyle_conf_file") + let g:syntastic_java_checkstyle_conf_file = 'sun_checks.xml' +endif + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_java_checkstyle_GetLocList() dict + + let fname = syntastic#util#shescape( expand('%:p:h') . '/' . expand('%:t') ) + + if has('win32unix') + let fname = substitute(system('cygpath -m ' . fname), '\m\%x00', '', 'g') + endif + + let makeprg = self.makeprgBuild({ + \ 'args_after': '-cp ' . g:syntastic_java_checkstyle_classpath . + \ ' com.puppycrawl.tools.checkstyle.Main -c ' . + \ syntastic#util#shexpand(g:syntastic_java_checkstyle_conf_file) . + \ ' -f xml', + \ 'fname': fname }) + + let errorformat = '%f:%t:%l:%c:%m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'preprocess': 'checkstyle', + \ 'subtype': 'Style' }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'java', + \ 'name': 'checkstyle', + \ 'exec': 'java'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/java/javac.vim b/sources_non_forked/syntastic/syntax_checkers/java/javac.vim new file mode 100644 index 00000000..2e138bea --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/java/javac.vim @@ -0,0 +1,435 @@ +"============================================================================ +"File: javac.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Jochen Keil +" Dmitry Geurkov +"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_java_javac_checker') + finish +endif +let g:loaded_syntastic_java_javac_checker = 1 +let g:syntastic_java_javac_maven_pom_tags = ['build', 'properties'] +let g:syntastic_java_javac_maven_pom_properties = {} +let s:has_maven = 0 + +" Global Options +if !exists('g:syntastic_java_javac_executable') + let g:syntastic_java_javac_executable = 'javac' +endif + +if !exists('g:syntastic_java_maven_executable') + let g:syntastic_java_maven_executable = 'mvn' +endif + +if !exists('g:syntastic_java_javac_options') + let g:syntastic_java_javac_options = '-Xlint' +endif + +if !exists('g:syntastic_java_maven_options') + let g:syntastic_java_maven_options = '' +endif + +if !exists('g:syntastic_java_javac_classpath') + let g:syntastic_java_javac_classpath = '' +endif + +if !exists('g:syntastic_java_javac_delete_output') + let g:syntastic_java_javac_delete_output = 1 +endif + +let s:save_cpo = &cpo +set cpo&vim + +function! s:CygwinPath(path) + return substitute(system('cygpath -m ' . syntastic#util#shescape(a:path)), "\n", '', 'g') +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 +endif + +if !exists('g:syntastic_java_javac_autoload_maven_classpath') + let g:syntastic_java_javac_autoload_maven_classpath = 1 +endif + +if !exists('g:syntastic_java_javac_config_file_enabled') + let g:syntastic_java_javac_config_file_enabled = 0 +endif + +if !exists('g:syntastic_java_javac_config_file') + let g:syntastic_java_javac_config_file = '.syntastic_javac_config' +endif + +if !exists('g:syntastic_java_javac_custom_classpath_command') + let g:syntastic_java_javac_custom_classpath_command = '' +endif + +if !exists('g:syntastic_java_javac_maven_pom_ftime') + let g:syntastic_java_javac_maven_pom_ftime = {} +endif + +if !exists('g:syntastic_java_javac_maven_pom_classpath') + let g:syntastic_java_javac_maven_pom_classpath = {} +endif + +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 + +function! s:AddToClasspath(classpath, path) + if a:path == '' + return a:classpath + endif + return (a:classpath != '') ? a:classpath . s:ClassSep() . a:path : a:path +endfunction + +function! s:SplitClasspath(classpath) + return split(a:classpath, s:ClassSep()) +endfunction + +function! s:LoadConfigFile() + if filereadable(expand(g:syntastic_java_javac_config_file)) + exe 'source ' . fnameescape(expand(g:syntastic_java_javac_config_file)) + endif +endfunction + +function! s:SaveClasspath() + " build classpath from lines + let path = '' + let lines = getline(1, line('$')) + for l in lines + let path = s:AddToClasspath(path, l) + endfor + " save classpath to config file + if g:syntastic_java_javac_config_file_enabled + if filereadable(expand(g:syntastic_java_javac_config_file)) + " load lines from config file + let lines = readfile(expand(g:syntastic_java_javac_config_file)) + " strip g:syntastic_java_javac_classpath options from config file lines + let i = 0 + while i < len(lines) + if match(lines[i], 'g:syntastic_java_javac_classpath') != -1 + call remove(lines, i) + else + let i += 1 + endif + endwhile + else + let lines = [] + endif + " add new g:syntastic_java_javac_classpath option to config + call add(lines, 'let g:syntastic_java_javac_classpath = ' . string(path)) + " save config file lines + call writefile(lines, expand(g:syntastic_java_javac_config_file)) + endif + " set new classpath + let g:syntastic_java_javac_classpath = path + let &modified = 0 +endfunction + +function! s:EditClasspath() + let command = 'syntastic javac classpath' + let winnr = bufwinnr('^' . command . '$') + if winnr < 0 + let path = [] + let pathlines = split(g:syntastic_java_javac_classpath, "\n") + for p in pathlines + call extend(path, s:SplitClasspath(p)) + endfor + execute (len(path) + 5) . 'sp ' . fnameescape(command) + + augroup syntastic + autocmd BufWriteCmd call s:SaveClasspath() | bwipeout + augroup END + + setlocal buftype=acwrite bufhidden=wipe nobuflisted noswapfile nowrap number + for p in path + call append(line('$') - 1, p) + endfor + let &modified = 0 + else + execute winnr . 'wincmd w' + endif +endfunction + +function! s:SaveConfig() + " get lines + let lines = getline(1, line('$')) + if g:syntastic_java_javac_config_file_enabled + " save config file lines + call writefile(lines, expand(g:syntastic_java_javac_config_file)) + endif + let &modified = 0 +endfunction + +function! s:EditConfig() + let command = 'syntastic javac config' + let winnr = bufwinnr('^' . command . '$') + if winnr < 0 + let lines = [] + if filereadable(expand(g:syntastic_java_javac_config_file)) + let lines = readfile(expand(g:syntastic_java_javac_config_file)) + endif + execute (len(lines) + 5) . 'sp ' . fnameescape(command) + + augroup syntastic + autocmd BufWriteCmd call s:SaveConfig() | bwipeout + augroup END + + setlocal ft=vim buftype=acwrite bufhidden=wipe nobuflisted noswapfile nowrap number + for l in lines + call append(line('$') - 1, l) + endfor + let &modified = 0 + else + execute winnr . 'wincmd w' + endif +endfunction + +function! s:GetMavenProperties() + let mvn_properties = {} + let pom = findfile('pom.xml', '.;') + if s:has_maven && filereadable(pom) + if !has_key(g:syntastic_java_javac_maven_pom_properties, pom) + let mvn_cmd = syntastic#util#shexpand(g:syntastic_java_maven_executable) . + \ ' -f ' . syntastic#util#shescape(pom) . + \ ' ' . g:syntastic_java_maven_options + let mvn_is_managed_tag = 1 + let mvn_settings_output = split(system(mvn_cmd . ' help:effective-pom'), "\n") + let current_path = 'project' + for line in mvn_settings_output + let matches = matchlist(line, '\m^\s*<\([a-zA-Z0-9\-\.]\+\)>\s*$') + if mvn_is_managed_tag && !empty(matches) + let mvn_is_managed_tag = index(g:syntastic_java_javac_maven_pom_tags, matches[1]) >= 0 + let current_path .= '.' . matches[1] + else + let matches = matchlist(line, '\m^\s*\s*$') + if !empty(matches) + let mvn_is_managed_tag = index(g:syntastic_java_javac_maven_pom_tags, matches[1]) < 0 + let current_path = substitute(current_path, '\m\.' . matches[1] . '$', '', '') + else + let matches = matchlist(line, '\m^\s*<\([a-zA-Z0-9\-\.]\+\)>\(.\+\)\s*$') + if mvn_is_managed_tag && !empty(matches) + let mvn_properties[current_path . '.' . matches[1]] = matches[2] + endif + endif + endif + endfor + let g:syntastic_java_javac_maven_pom_properties[pom] = mvn_properties + endif + return g:syntastic_java_javac_maven_pom_properties[pom] + endif + return mvn_properties +endfunction + +command! SyntasticJavacEditClasspath call s:EditClasspath() + +if g:syntastic_java_javac_config_file_enabled + command! SyntasticJavacEditConfig call s:EditConfig() +endif + +function! s:GetMavenClasspath() + let pom = findfile('pom.xml', '.;') + if s:has_maven && filereadable(pom) + if !has_key(g:syntastic_java_javac_maven_pom_ftime, pom) || g:syntastic_java_javac_maven_pom_ftime[pom] != getftime(pom) + let mvn_cmd = syntastic#util#shexpand(g:syntastic_java_maven_executable) . + \ ' -f ' . syntastic#util#shescape(pom) . + \ ' ' . g:syntastic_java_maven_options + let mvn_classpath_output = split(system(mvn_cmd . ' dependency:build-classpath'), "\n") + let mvn_classpath = '' + let class_path_next = 0 + + for line in mvn_classpath_output + if class_path_next == 1 + let mvn_classpath = s:RemoveCarriageReturn(line) + break + endif + if stridx(line, 'Dependencies classpath:') >= 0 + let class_path_next = 1 + endif + endfor + + let mvn_properties = s:GetMavenProperties() + + let output_dir = 'target/classes' + if has_key(mvn_properties, 'project.build.outputDirectory') + let output_dir = mvn_properties['project.build.outputDirectory'] + endif + let mvn_classpath = s:AddToClasspath(mvn_classpath, output_dir) + + let test_output_dir = 'target/test-classes' + if has_key(mvn_properties, 'project.build.testOutputDirectory') + let test_output_dir = mvn_properties['project.build.testOutputDirectory'] + endif + let mvn_classpath = s:AddToClasspath(mvn_classpath, test_output_dir) + + let g:syntastic_java_javac_maven_pom_ftime[pom] = getftime(pom) + let g:syntastic_java_javac_maven_pom_classpath[pom] = mvn_classpath + endif + return g:syntastic_java_javac_maven_pom_classpath[pom] + endif + return '' +endfunction + +function! SyntaxCheckers_java_javac_IsAvailable() dict + let s:has_maven = executable(expand(g:syntastic_java_maven_executable)) + return executable(expand(g:syntastic_java_javac_executable)) +endfunction + +function! s:MavenOutputDirectory() + let pom = findfile('pom.xml', '.;') + if s:has_maven && filereadable(pom) + let mvn_properties = s:GetMavenProperties() + let output_dir = getcwd() + if has_key(mvn_properties, 'project.properties.build.dir') + let output_dir = mvn_properties['project.properties.build.dir'] + endif + if stridx(expand( '%:p:h' ), 'src.main.java') >= 0 + let output_dir .= '/target/classes' + if has_key(mvn_properties, 'project.build.outputDirectory') + let output_dir = mvn_properties['project.build.outputDirectory'] + endif + endif + if stridx(expand( '%:p:h' ), 'src.test.java') >= 0 + let output_dir .= '/target/test-classes' + if has_key(mvn_properties, 'project.build.testOutputDirectory') + let output_dir = mvn_properties['project.build.testOutputDirectory'] + endif + endif + + if has('win32unix') + let output_dir = s:CygwinPath(output_dir) + endif + return output_dir + endif + return '.' +endfunction + +function! SyntaxCheckers_java_javac_GetLocList() dict + let javac_opts = g:syntastic_java_javac_options + + let output_dir = '' + if g:syntastic_java_javac_delete_output + let output_dir = g:syntastic_java_javac_temp_dir + let javac_opts .= ' -d ' . syntastic#util#shescape(output_dir) + endif + + " load classpath from config file + if g:syntastic_java_javac_config_file_enabled + call s:LoadConfigFile() + endif + + let javac_classpath = '' + + " add classpathes to javac_classpath + for path in split(g:syntastic_java_javac_classpath, s:ClassSep()) + if path != '' + try + let ps = glob(path, 0, 1) + catch + let ps = split(glob(path, 0), "\n") + endtry + if type(ps) == type([]) + for p in ps + let javac_classpath = s:AddToClasspath(javac_classpath, p) + endfor + else + let javac_classpath = s:AddToClasspath(javac_classpath, ps) + endif + endif + endfor + + if s:has_maven && g:syntastic_java_javac_autoload_maven_classpath + if !g:syntastic_java_javac_delete_output + let javac_opts .= ' -d ' . syntastic#util#shescape(s:MavenOutputDirectory()) + endif + let javac_classpath = s:AddToClasspath(javac_classpath, s:GetMavenClasspath()) + endif + + " load custom classpath + if g:syntastic_java_javac_custom_classpath_command != '' + let lines = system(g:syntastic_java_javac_custom_classpath_command) + if syntastic#util#isRunningWindows() || has('win32unix') + let lines = substitute(lines, "\r\n", "\n", 'g') + endif + for l in split(lines, "\n") + let javac_classpath = s:AddToClasspath(javac_classpath, l) + endfor + endif + + if javac_classpath != '' + let javac_opts .= ' -cp ' . syntastic#util#shexpand(javac_classpath) + endif + + let fname = expand('%:p:h') . syntastic#util#Slash() . expand ('%:t') + + if has('win32unix') + let fname = s:CygwinPath(fname) + endif + + let makeprg = self.makeprgBuild({ + \ 'args': javac_opts, + \ 'fname': syntastic#util#shescape(fname) }) + + " unashamedly stolen from *errorformat-javac* (quickfix.txt) and modified to include error types + let errorformat = + \ '%E%f:%l:\ error:\ %m,'. + \ '%W%f:%l:\ warning:\ %m,'. + \ '%A%f:%l:\ %m,'. + \ '%+Z%p^,'. + \ '%+C%.%#,'. + \ '%-G%.%#' + + if g:syntastic_java_javac_delete_output + silent! call mkdir(output_dir, 'p') + endif + let errors = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'postprocess': ['cygwinRemoveCR'] }) + + if g:syntastic_java_javac_delete_output + call s:RemoveDir(output_dir) + endif + return errors + +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'java', + \ 'name': 'javac'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/javascript/closurecompiler.vim b/sources_non_forked/syntastic/syntax_checkers/javascript/closurecompiler.vim new file mode 100644 index 00000000..5dac3abe --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/javascript/closurecompiler.vim @@ -0,0 +1,64 @@ +"============================================================================ +"File: closurecompiler.vim +"Description: Javascript syntax checker - using Google Closure Compiler +"Maintainer: Motohiro Takayama +"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_javascript_closurecompiler_checker") + finish +endif +let g:loaded_syntastic_javascript_closurecompiler_checker = 1 + +let s:save_cpo = &cpo +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) +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)) + else + let file_list = syntastic#util#shexpand('%') + endif + + let makeprg = self.makeprgBuild({ + \ 'exe_after': '-jar ' . g:syntastic_javascript_closurecompiler_path, + \ 'args_after': '--js' , + \ 'fname': file_list }) + + let errorformat = + \ '%-GOK,'. + \ '%E%f:%l: ERROR - %m,'. + \ '%Z%p^,'. + \ '%W%f:%l: WARNING - %m,'. + \ '%Z%p^' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'javascript', + \ 'name': 'closurecompiler', + \ 'exec': 'java'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/javascript/eslint.vim b/sources_non_forked/syntastic/syntax_checkers/javascript/eslint.vim new file mode 100644 index 00000000..96919c8f --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/javascript/eslint.vim @@ -0,0 +1,56 @@ +"============================================================================ +"File: eslint.vim +"Description: Javascript syntax checker - using eslint +"Maintainer: Maksim Ryzhikov +"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_javascript_eslint_checker') + finish +endif +let g:loaded_syntastic_javascript_eslint_checker = 1 + +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]) +endfunction + +function! SyntaxCheckers_javascript_eslint_GetLocList() dict + call syntastic#log#deprecationWarn('javascript_eslint_conf', 'javascript_eslint_args', + \ "'--config ' . syntastic#util#shexpand(OLD_VAR)") + + let makeprg = self.makeprgBuild({ 'args_before': '-f compact' }) + + let errorformat = + \ '%E%f: line %l\, col %c\, Error - %m,' . + \ '%W%f: line %l\, col %c\, Warning - %m' + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) + + for e in loclist + let e['col'] += 1 + endfor + + call self.setWantSort(1) + + return loclist +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'javascript', + \ 'name': 'eslint'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/javascript/gjslint.vim b/sources_non_forked/syntastic/syntax_checkers/javascript/gjslint.vim new file mode 100644 index 00000000..1704ac27 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/javascript/gjslint.vim @@ -0,0 +1,45 @@ +"============================================================================ +"File: gjslint.vim +"Description: Javascript syntax checker - using gjslint +"Maintainer: Martin Grenfell +"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_javascript_gjslint_checker") + finish +endif +let g:loaded_syntastic_javascript_gjslint_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_javascript_gjslint_GetLocList() dict + call syntastic#log#deprecationWarn('javascript_gjslint_conf', 'javascript_gjslint_args') + + let makeprg = self.makeprgBuild({ + \ 'args_after': '--nosummary --unix_mode --nodebug_indentation --nobeep' }) + + let errorformat = + \ "%f:%l:(New Error -%\\?\%n) %m," . + \ "%f:%l:(-%\\?%n) %m," . + \ "%-G1 files checked," . + \ " no errors found.," . + \ "%-G%.%#" + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'javascript', + \ 'name': 'gjslint'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/javascript/jscs.vim b/sources_non_forked/syntastic/syntax_checkers/javascript/jscs.vim new file mode 100644 index 00000000..c5017522 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/javascript/jscs.vim @@ -0,0 +1,44 @@ +"============================================================================ +"File: jscs.vim +"Description: Javascript syntax checker - using jscs +"Maintainer: LCD 47 +"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_javascript_jscs_checker") + finish +endif +let g:loaded_syntastic_javascript_jscs_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_javascript_jscs_GetLocList() dict + let makeprg = self.makeprgBuild({ 'args_after': '--no-colors --reporter checkstyle' }) + + let errorformat = '%f:%t:%l:%c:%m' + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'subtype': 'Style', + \ 'preprocess': 'checkstyle', + \ 'returns': [0, 2] }) + + call self.setWantSort(1) + + return loclist +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'javascript', + \ 'name': 'jscs'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/javascript/jshint.vim b/sources_non_forked/syntastic/syntax_checkers/javascript/jshint.vim new file mode 100644 index 00000000..69706c0a --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/javascript/jshint.vim @@ -0,0 +1,59 @@ +"============================================================================ +"File: jshint.vim +"Description: Javascript syntax checker - using jshint +"Maintainer: Martin Grenfell +"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_javascript_jshint_checker') + finish +endif +let g:loaded_syntastic_javascript_jshint_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_javascript_jshint_IsAvailable() dict + call syntastic#log#deprecationWarn('jshint_exec', 'javascript_jshint_exec') + if !executable(self.getExec()) + return 0 + endif + let s:jshint_version = syntastic#util#getVersion(self.getExecEscaped() . ' --version') + return syntastic#util#versionIsAtLeast(s:jshint_version, [1]) +endfunction + +function! SyntaxCheckers_javascript_jshint_GetLocList() dict + call syntastic#log#deprecationWarn('javascript_jshint_conf', 'javascript_jshint_args', + \ "'--config ' . syntastic#util#shexpand(OLD_VAR)") + + if !exists('s:jshint_new') + let s:jshint_new = syntastic#util#versionIsAtLeast(s:jshint_version, [1, 1]) + endif + + let makeprg = self.makeprgBuild({ 'args_after': (s:jshint_new ? '--verbose ' : '') }) + + let errorformat = s:jshint_new ? + \ '%A%f: line %l\, col %v\, %m \(%t%*\d\)' : + \ '%E%f: line %l\, col %v\, %m' + + call self.setWantSort(1) + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'defaults': {'bufnr': bufnr('')}, + \ 'returns': [0, 2] }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'javascript', + \ 'name': 'jshint'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/javascript/jsl.vim b/sources_non_forked/syntastic/syntax_checkers/javascript/jsl.vim new file mode 100644 index 00000000..8f4148d6 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/javascript/jsl.vim @@ -0,0 +1,48 @@ +"============================================================================ +"File: jsl.vim +"Description: Javascript syntax checker - using jsl +"Maintainer: Martin Grenfell +"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_javascript_jsl_checker") + finish +endif +let g:loaded_syntastic_javascript_jsl_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_javascript_jsl_GetLocList() dict + call syntastic#log#deprecationWarn('javascript_jsl_conf', 'javascript_jsl_args', + \ "'-conf ' . syntastic#util#shexpand(OLD_VAR)") + + let makeprg = self.makeprgBuild({ + \ 'args_after': '-nologo -nofilelisting -nosummary -nocontext -process' }) + + let errorformat = + \ '%W%f(%l): lint warning: %m,'. + \ '%-Z%p^,'. + \ '%W%f(%l): warning: %m,'. + \ '%-Z%p^,'. + \ '%E%f(%l): SyntaxError: %m,'. + \ '%-Z%p^,'. + \ '%-G' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'javascript', + \ 'name': 'jsl'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/javascript/jslint.vim b/sources_non_forked/syntastic/syntax_checkers/javascript/jslint.vim new file mode 100644 index 00000000..63bb4101 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/javascript/jslint.vim @@ -0,0 +1,51 @@ +"============================================================================ +"File: jslint.vim +"Description: Javascript syntax checker - using jslint +"Maintainer: Martin Grenfell +"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. +" +"Tested with jslint 0.1.4. +"============================================================================ +if exists("g:loaded_syntastic_javascript_jslint_checker") + finish +endif + +let g:loaded_syntastic_javascript_jslint_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_javascript_jslint_GetHighlightRegex(item) + let term = matchstr(a:item['text'], '\mExpected .* and instead saw ''\zs.*\ze''') + if term != '' + let term = '\V\<' . escape(term, '\') . '\>' + endif + return term +endfunction + +function! SyntaxCheckers_javascript_jslint_GetLocList() dict + let makeprg = self.makeprgBuild({ 'args': '--white --nomen --regexp --plusplus --bitwise --newcap --sloppy --vars' }) + + let errorformat = + \ '%E %##%\d%\+ %m,'. + \ '%-Z%.%#Line %l\, Pos %c,'. + \ '%-G%.%#' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'defaults': {'bufnr': bufnr("")} }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'javascript', + \ 'name': 'jslint'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/javascript/jsxhint.vim b/sources_non_forked/syntastic/syntax_checkers/javascript/jsxhint.vim new file mode 100644 index 00000000..21ba6a04 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/javascript/jsxhint.vim @@ -0,0 +1,47 @@ +"============================================================================ +"File: jsxhint.vim +"Description: Javascript syntax checker - using jsxhint +"Maintainer: Thomas Boyt +"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_javascript_jsxhint_checker') + finish +endif +let g:loaded_syntastic_javascript_jsxhint_checker = 1 + +let s:save_cpo = &cpo +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]) +endfunction + +function! SyntaxCheckers_javascript_jsxhint_GetLocList() dict + let makeprg = self.makeprgBuild({ + \ 'args_after': '--verbose' }) + + let errorformat = '%A%f: line %l\, col %v\, %m \(%t%*\d\)' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'defaults': {'bufnr': bufnr('')} }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'javascript', + \ 'name': 'jsxhint'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/json/jsonlint.vim b/sources_non_forked/syntastic/syntax_checkers/json/jsonlint.vim new file mode 100644 index 00000000..2b9ec451 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/json/jsonlint.vim @@ -0,0 +1,43 @@ +"============================================================================ +"File: jsonlint.vim +"Description: JSON syntax checker - using jsonlint +"Maintainer: Miller Medeiros +"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_json_jsonlint_checker") + finish +endif +let g:loaded_syntastic_json_jsonlint_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_json_jsonlint_GetLocList() dict + let makeprg = self.makeprgBuild({ 'post_args_after': '--compact' }) + + let errorformat = + \ '%ELine %l:%c,'. + \ '%Z\\s%#Reason: %m,'. + \ '%C%.%#,'. + \ '%f: line %l\, col %c\, %m,'. + \ '%-G%.%#' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'defaults': {'bufnr': bufnr('')} }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'json', + \ 'name': 'jsonlint'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/json/jsonval.vim b/sources_non_forked/syntastic/syntax_checkers/json/jsonval.vim new file mode 100644 index 00000000..16e30091 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/json/jsonval.vim @@ -0,0 +1,41 @@ +"============================================================================ +"File: jsonval.vim +"Description: JSON syntax checker - using jsonval +"Maintainer: Miller Medeiros +"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_json_jsonval_checker") + finish +endif +let g:loaded_syntastic_json_jsonval_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_json_jsonval_GetLocList() dict + " based on https://gist.github.com/1196345 + let makeprg = self.makeprgBuild({}) + + let errorformat = + \ '%E%f:\ %m\ at\ line\ %l,' . + \ '%-G%.%#' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'defaults': {'bufnr': bufnr('')} }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'json', + \ 'name': 'jsonval'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/less/less-lint.coffee b/sources_non_forked/syntastic/syntax_checkers/less/less-lint.coffee new file mode 100644 index 00000000..0b05e4a7 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/less/less-lint.coffee @@ -0,0 +1,41 @@ +#!/usr/bin/env node + +fs = require 'fs' +less = require 'less' +args = process.argv.slice(1) +options = {} + +args = args.filter (arg) -> + match = arg.match(/^-I(.+)$/) + if match + options.paths.push(match[1]); + return false + + match = arg.match(/^--?([a-z][\-0-9a-z]*)(?:=([^\s]+))?$/i) + if match + arg = match[1] + else + return arg + + switch arg + when 'strict-imports' then options.strictImports = true + when 'include-path' + options.paths = match[2].split(if os.type().match(/Windows/) then ';' else ':') + .map (p) -> + if p + return path.resolve(process.cwd(), p) + when 'O0' then options.optimization = 0 + when 'O1' then options.optimization = 1 + when 'O2' then options.optimization = 2 + +options.filename = args[1] + +parser = new(less.Parser) options + +fs.readFile(options.filename, 'utf-8', (err,data) -> + parser.parse(data, (err, tree) -> + if err + less.writeError err + process.exit(1) + ) +) diff --git a/sources_non_forked/syntastic/syntax_checkers/less/less-lint.js b/sources_non_forked/syntastic/syntax_checkers/less/less-lint.js new file mode 100644 index 00000000..5abc653c --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/less/less-lint.js @@ -0,0 +1,57 @@ +// Generated by CoffeeScript 1.3.3 +(function() { + var args, fs, less, options, parser; + + fs = require('fs'); + + less = require('less'); + + args = process.argv.slice(1); + + options = {}; + + args = args.filter(function(arg) { + var match; + match = arg.match(/^-I(.+)$/); + if (match) { + options.paths.push(match[1]); + return false; + } + match = arg.match(/^--?([a-z][\-0-9a-z]*)(?:=([^\s]+))?$/i); + if (match) { + arg = match[1]; + } else { + return arg; + } + switch (arg) { + case 'strict-imports': + return options.strictImports = true; + case 'include-path': + return options.paths = match[2].split(os.type().match(/Windows/) ? ';' : ':').map(function(p) { + if (p) { + return path.resolve(process.cwd(), p); + } + }); + case 'O0': + return options.optimization = 0; + case 'O1': + return options.optimization = 1; + case 'O2': + return options.optimization = 2; + } + }); + + options.filename = args[1]; + + parser = new less.Parser(options); + + fs.readFile(options.filename, 'utf-8', function(err, data) { + return parser.parse(data, function(err, tree) { + if (err) { + less.writeError(err); + return process.exit(1); + } + }); + }); + +}).call(this); diff --git a/sources_non_forked/syntastic/syntax_checkers/less/lessc.vim b/sources_non_forked/syntastic/syntax_checkers/less/lessc.vim new file mode 100644 index 00000000..9b5efa96 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/less/lessc.vim @@ -0,0 +1,71 @@ +"============================================================================ +"File: less.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Julien Blanchard +"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. +" +"============================================================================ + +" To send additional options to less use the variable g:syntastic_less_options. +" The default is +" let g:syntastic_less_options = "--no-color" +" +" To use less-lint instead of less set the variable +" g:syntastic_less_use_less_lint. + +if exists("g:loaded_syntastic_less_lessc_checker") + finish +endif +let g:loaded_syntastic_less_lessc_checker = 1 + +if !exists("g:syntastic_less_options") + let g:syntastic_less_options = "" +endif + +if !exists("g:syntastic_less_use_less_lint") + let g:syntastic_less_use_less_lint = 0 +endif + +let s:save_cpo = &cpo +set cpo&vim + +let s:node_file = 'node ' . syntastic#util#shescape(expand(':p:h') . syntastic#util#Slash() . 'less-lint.js') + +function! SyntaxCheckers_less_lessc_IsAvailable() dict + return g:syntastic_less_use_less_lint ? executable('node') : executable(self.getExec()) +endfunction + +function! SyntaxCheckers_less_lessc_GetLocList() dict + if !exists('s:check_file') + let s:check_file = g:syntastic_less_use_less_lint ? s:node_file : self.getExecEscaped() + endif + + let makeprg = self.makeprgBuild({ + \ 'exe': s:check_file, + \ 'args': g:syntastic_less_options, + \ 'args_after': '--no-color', + \ 'tail': '> ' . syntastic#util#DevNull() }) + + let errorformat = + \ '%m in %f on line %l\, column %c:,' . + \ '%m in %f:%l:%c,' . + \ '%-G%.%#' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'defaults': {'bufnr': bufnr(""), 'text': "Syntax error"} }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'less', + \ 'name': 'lessc'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/less/recess.vim b/sources_non_forked/syntastic/syntax_checkers/less/recess.vim new file mode 100644 index 00000000..92944189 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/less/recess.vim @@ -0,0 +1,44 @@ +"============================================================================ +"File: recess.vim +"Description: Syntax checking plugin for syntastic.vim using `recess` +" (http://twitter.github.io/recess/). +"Maintainer: Tim Carry +"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_less_recess_checker') + finish +endif +let g:loaded_syntastic_less_recess_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_less_recess_GetLocList() dict + let makeprg = self.makeprgBuild({ + \ 'post_args_after': '--format=compact --stripColors' }) + + let errorformat = + \ '%E%m in %f,' . + \ '%Z %#%l.%.%#,' . + \ '%f:%l:%m,' . + \ '%-G%.%#' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'less', + \ 'name': 'recess'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/lex/flex.vim b/sources_non_forked/syntastic/syntax_checkers/lex/flex.vim new file mode 100644 index 00000000..b8bc6483 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/lex/flex.vim @@ -0,0 +1,50 @@ +"============================================================================ +"File: lex.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: LCD 47 +"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_lex_flex_checker") + finish +endif +let g:loaded_syntastic_lex_flex_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_lex_flex_GetHighlightRegex(item) + let term = matchstr(a:item['text'], + \ '\m^\(unrecognized %option\|bad \|bad character\( class expression\)\=\): \zs.*') + if term == '' + let term = matchstr(a:item['text'], + \ '\m^\(Definition value for\|undefined definition\) \zs{[^}]\+}\ze') + endif + + return term != '' ? '\V' . escape(term, '\') : '' +endfunction + +function! SyntaxCheckers_lex_flex_GetLocList() dict + let makeprg = self.makeprgBuild({ + \ 'args_after': syntastic#c#NullOutput() }) + + let errorformat = '%f:%l: %m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'lex', + \ 'name': 'flex'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/limbo/limbo.vim b/sources_non_forked/syntastic/syntax_checkers/limbo/limbo.vim new file mode 100644 index 00000000..b501e3c9 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/limbo/limbo.vim @@ -0,0 +1,46 @@ +"============================================================================ +"File: limbo.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Alex Efros +"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_limbo_limbo_checker") + finish +endif +let g:loaded_syntastic_limbo_limbo_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_limbo_limbo_GetLocList() dict + let include = $INFERNO_HOME != '' ? '-I$INFERNO_HOME ' : '' + " don't generate .dis in current dir while checking syntax, + " .dis should be generated by `mk` + let output = filereadable('mkfile') ? (' ' . syntastic#c#NullOutput()) : '' + + let makeprg = self.makeprgBuild({ 'args_before': include . '-w' . output }) + + let errorformat = '%E%f:%l:%m' + if expand('%') =~# '\m\.m$' + let errorformat = '%-G%f:%l: near ` EOF ` : no implementation module,' . errorformat + endif + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'limbo', + \ 'name': 'limbo' }) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/lisp/clisp.vim b/sources_non_forked/syntastic/syntax_checkers/lisp/clisp.vim new file mode 100644 index 00000000..5e726a92 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/lisp/clisp.vim @@ -0,0 +1,49 @@ +"============================================================================ +"File: lisp.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Karl Yngve Lervåg +"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_lisp_clisp_checker") + finish +endif +let g:loaded_syntastic_lisp_clisp_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_lisp_clisp_GetLocList() dict + let makeprg = self.makeprgBuild({ + \ 'args_after': '-q', + \ 'fname_before': '-c' }) + + let errorformat = + \ '%-G;%.%#,' . + \ '%W%>WARNING:%.%# line %l : %m,' . + \ '%Z %#%m,' . + \ '%W%>WARNING:%.%# lines %l%\%.%\%.%\d%\+ : %m,' . + \ '%Z %#%m,' . + \ '%E%>The following functions were %m,' . + \ '%Z %m,' . + \ '%-G%.%#' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'defaults': {'bufnr': bufnr('')} }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'lisp', + \ 'name': 'clisp'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/llvm/llvm.vim b/sources_non_forked/syntastic/syntax_checkers/llvm/llvm.vim new file mode 100644 index 00000000..c65a1672 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/llvm/llvm.vim @@ -0,0 +1,39 @@ +"============================================================================ +"File: llvm.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Andrew Kelley +"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_llvm_llvm_checker") + finish +endif +let g:loaded_syntastic_llvm_llvm_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_llvm_llvm_GetLocList() dict + let makeprg = self.makeprgBuild({ 'args_after': syntastic#c#NullOutput() }) + + let errorformat = 'llc: %f:%l:%c: %trror: %m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'llvm', + \ 'name': 'llvm', + \ 'exec': 'llc'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/lua/luac.vim b/sources_non_forked/syntastic/syntax_checkers/lua/luac.vim new file mode 100644 index 00000000..012f1490 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/lua/luac.vim @@ -0,0 +1,65 @@ +"============================================================================ +"File: lua.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Gregor Uhlenheuer +"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_lua_luac_checker") + finish +endif +let g:loaded_syntastic_lua_luac_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_lua_luac_GetHighlightRegex(pos) + let result = '' + let near = matchstr(a:pos['text'], '\mnear ''\zs[^'']\+\ze''') + if near != '' + if near ==# '' + let p = getpos('$') + let a:pos['lnum'] = p[1] + let a:pos['col'] = p[2] + let result = '\%' . p[2] . 'c' + else + let result = '\V' . escape(near, '\') + endif + + " XXX the following piece of code is evil, and is likely to break + " in future versions of syntastic; enable it at your own risk :) + + "let open = matchstr(a:pos['text'], '\m(to close ''\zs[^'']\+\ze'' at line [0-9]\+)') + "if open != '' + " let line = str2nr(matchstr(a:pos['text'], '\m(to close ''[^'']\+'' at line \zs[0-9]\+\ze)')) + " let group = a:pos['type'] ==? 'E' ? 'SyntasticError' : 'SyntasticWarning' + " call matchadd(group, '\%' . line . 'l\V' . escape(open, '\')) + "endif + endif + return result +endfunction + +function! SyntaxCheckers_lua_luac_GetLocList() dict + let makeprg = self.makeprgBuild({ 'args_after': '-p' }) + + let errorformat = 'luac: %#%f:%l: %m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'defaults': { 'bufnr': bufnr(''), 'type': 'E' } }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'lua', + \ 'name': 'luac'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/matlab/mlint.vim b/sources_non_forked/syntastic/syntax_checkers/matlab/mlint.vim new file mode 100644 index 00000000..1b15eeac --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/matlab/mlint.vim @@ -0,0 +1,41 @@ +"============================================================================ +"File: matlab.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Jason Graham +"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_matlab_mlint_checker") + finish +endif +let g:loaded_syntastic_matlab_mlint_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_matlab_mlint_GetLocList() dict + let makeprg = self.makeprgBuild({ 'args_after': '-id $*' }) + + let errorformat = + \ 'L %l (C %c): %*[a-zA-Z0-9]: %m,'. + \ 'L %l (C %c-%*[0-9]): %*[a-zA-Z0-9]: %m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'defaults': {'bufnr': bufnr("")} }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'matlab', + \ 'name': 'mlint'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/nasm/nasm.vim b/sources_non_forked/syntastic/syntax_checkers/nasm/nasm.vim new file mode 100644 index 00000000..65bf9aa9 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/nasm/nasm.vim @@ -0,0 +1,41 @@ +"============================================================================ +"File: nasm.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Håvard Pettersson +"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_nasm_nasm_checker") + finish +endif +let g:loaded_syntastic_nasm_nasm_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_nasm_nasm_GetLocList() dict + let makeprg = self.makeprgBuild({ + \ 'args_after': '-X gnu -f elf' . + \ ' -I ' . syntastic#util#shescape(expand("%:p:h") . "/") . + \ ' ' . syntastic#c#NullOutput() }) + + let errorformat = '%f:%l: %t%*[^:]: %m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'nasm', + \ 'name': 'nasm'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/nroff/mandoc.vim b/sources_non_forked/syntastic/syntax_checkers/nroff/mandoc.vim new file mode 100644 index 00000000..28085d54 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/nroff/mandoc.vim @@ -0,0 +1,41 @@ +"============================================================================ +"File: mandoc.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: LCD 47 +"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_mandoc_checker") + finish +endif +let g:loaded_syntastic_nroff_mandoc_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_nroff_mandoc_GetLocList() dict + let makeprg = self.makeprgBuild({ 'args_after': '-Tlint' }) + + let errorformat = + \ '%E%f:%l:%c: %tRROR: %m,' . + \ '%W%f:%l:%c: %tARNING: %m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'returns': [0, 2, 3, 4] }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'nroff', + \ 'name': 'mandoc'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/objc/gcc.vim b/sources_non_forked/syntastic/syntax_checkers/objc/gcc.vim new file mode 100644 index 00000000..09c3daa2 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/objc/gcc.vim @@ -0,0 +1,58 @@ +"============================================================================ +"File: objc.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Gregor Uhlenheuer +"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_objc_gcc_checker') + finish +endif +let g:loaded_syntastic_objc_gcc_checker = 1 + +if !exists('g:syntastic_objc_compiler_options') + let g:syntastic_objc_compiler_options = '-std=gnu99' +endif + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_objc_gcc_IsAvailable() dict + if !exists('g:syntastic_objc_compiler') + let g:syntastic_objc_compiler = executable(self.getExec()) ? self.getExec() : 'clang' + endif + return executable(expand(g:syntastic_objc_compiler)) +endfunction + +function! SyntaxCheckers_objc_gcc_GetLocList() dict + return syntastic#c#GetLocList('objc', 'gcc', { + \ 'errorformat': + \ '%-G%f:%s:,' . + \ '%-G%f:%l: %#error: %#(Each undeclared identifier is reported only%.%#,' . + \ '%-G%f:%l: %#error: %#for each function it appears%.%#,' . + \ '%-GIn file included%.%#,'. + \ '%-G %#from %f:%l\,,' . + \ '%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', + \ 'main_flags': '-x objective-c -fsyntax-only', + \ 'header_flags': '-x objective-c-header -lobjc', + \ 'header_names': '\m\.h$' }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'objc', + \ 'name': 'gcc' }) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/objc/oclint.vim b/sources_non_forked/syntastic/syntax_checkers/objc/oclint.vim new file mode 100644 index 00000000..a415c41f --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/objc/oclint.vim @@ -0,0 +1,31 @@ +"============================================================================ +"File: oclint.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: "UnCO" Lin +"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. +"============================================================================ +" +" The setting 'g:syntastic_oclint_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_oclint_config': +" +" let g:syntastic_oclint_config_file = '.config' + +if exists("g:loaded_syntastic_objc_oclint_checker") + finish +endif +let g:loaded_syntastic_objc_oclint_checker = 1 + +runtime! syntax_checkers/c/*.vim + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'objc', + \ 'name': 'oclint', + \ 'redirect': 'c/oclint'}) + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/objcpp/gcc.vim b/sources_non_forked/syntastic/syntax_checkers/objcpp/gcc.vim new file mode 100644 index 00000000..853d6657 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/objcpp/gcc.vim @@ -0,0 +1,58 @@ +"============================================================================ +"File: objcpp.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Gregor Uhlenheuer +"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_objcpp_gcc_checker') + finish +endif +let g:loaded_syntastic_objcpp_gcc_checker = 1 + +if !exists('g:syntastic_objcpp_compiler_options') + let g:syntastic_objcpp_compiler_options = '-std=gnu99' +endif + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_objcpp_gcc_IsAvailable() dict + if !exists('g:syntastic_c_compiler') + let g:syntastic_objcpp_compiler = executable(self.getExec()) ? self.getExec() : 'clang' + endif + return executable(expand(g:syntastic_objcpp_compiler)) +endfunction + +function! SyntaxCheckers_objcpp_gcc_GetLocList() dict + return syntastic#c#GetLocList('objcpp', 'gcc', { + \ 'errorformat': + \ '%-G%f:%s:,' . + \ '%-G%f:%l: %#error: %#(Each undeclared identifier is reported only%.%#,' . + \ '%-G%f:%l: %#error: %#for each function it appears%.%#,' . + \ '%-GIn file included%.%#,'. + \ '%-G %#from %f:%l\,,' . + \ '%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', + \ 'main_flags': '-x objective-c++ -fsyntax-only', + \ 'header_flags': '-x objective-c++-header -lobjc', + \ 'header_names': '\m\.h$' }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'objcpp', + \ 'name': 'gcc' }) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/objcpp/oclint.vim b/sources_non_forked/syntastic/syntax_checkers/objcpp/oclint.vim new file mode 100644 index 00000000..84f71d29 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/objcpp/oclint.vim @@ -0,0 +1,31 @@ +"============================================================================ +"File: oclint.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: "UnCO" Lin +"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. +"============================================================================ +" +" The setting 'g:syntastic_oclint_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_oclint_config': +" +" let g:syntastic_oclint_config_file = '.config' + +if exists("g:loaded_syntastic_objcpp_oclint_checker") + finish +endif +let g:loaded_syntastic_objcpp_oclint_checker = 1 + +runtime! syntax_checkers/c/*.vim + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'objcpp', + \ 'name': 'oclint', + \ 'redirect': 'c/oclint'}) + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/ocaml/camlp4o.vim b/sources_non_forked/syntastic/syntax_checkers/ocaml/camlp4o.vim new file mode 100644 index 00000000..d9f57001 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/ocaml/camlp4o.vim @@ -0,0 +1,156 @@ +"============================================================================ +"File: ocaml.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Török Edwin +"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. +" +"============================================================================ +" +" The more reliable way to check for a single .ml file is to use ocamlc. +" You can do that setting this in your .vimrc: +" +" let g:syntastic_ocaml_use_ocamlc = 1 +" It's possible to use ocamlc in conjuction with Jane Street's Core. In order +" to do that, you have to specify this in your .vimrc: +" +" let g:syntastic_ocaml_use_janestreet_core = 1 +" let g:syntastic_ocaml_janestreet_core_dir = +" +" Where path is the path to your core installation (usually a collection of +" .cmx and .cmxa files). +" +" +" By default the camlp4o preprocessor is used to check the syntax of .ml, and .mli files, +" ocamllex is used to check .mll files and menhir is used to check .mly files. +" The output is all redirected to /dev/null, nothing is written to the disk. +" +" If your source code needs camlp4r then you can define this in your .vimrc: +" +" let g:syntastic_ocaml_camlp4r = 1 +" +" If you used some syntax extensions, or you want to also typecheck the source +" code, then you can define this: +" +" let g:syntastic_ocaml_use_ocamlbuild = 1 +" +" This will run ocamlbuild .inferred.mli, so it will write to your _build +" directory (and possibly rebuild your myocamlbuild.ml plugin), only enable this +" if you are ok with that. +" +" If you are using syntax extensions / external libraries and have a properly +" set up _tags (and myocamlbuild.ml file) then it should just work +" to enable this flag and get syntax / type checks through syntastic. +" +" For best results your current directory should be the project root +" (same situation if you want useful output from :make). + +if exists("g:loaded_syntastic_ocaml_camlp4o_checker") + finish +endif +let g:loaded_syntastic_ocaml_camlp4o_checker = 1 + +if exists('g:syntastic_ocaml_camlp4r') && g:syntastic_ocaml_camlp4r != 0 + let s:ocamlpp="camlp4r" +else + let s:ocamlpp="camlp4o" +endif + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_ocaml_camlp4o_IsAvailable() dict + return executable(s:ocamlpp) +endfunction + +if !exists('g:syntastic_ocaml_use_ocamlc') || !executable('ocamlc') + let g:syntastic_ocaml_use_ocamlc = 0 +endif + +if !exists('g:syntastic_ocaml_use_janestreet_core') + let g:syntastic_ocaml_use_ocamlc = 0 +endif + +if !exists('g:syntastic_ocaml_use_ocamlbuild') || !executable("ocamlbuild") + let g:syntastic_ocaml_use_ocamlbuild = 0 +endif + +function! SyntaxCheckers_ocaml_camlp4o_GetLocList() dict + let makeprg = s:GetMakeprg() + if makeprg == "" + return [] + endif + + let errorformat = + \ '%AFile "%f"\, line %l\, characters %c-%*\d:,'. + \ '%AFile "%f"\, line %l\, characters %c-%*\d (end at line %*\d\, character %*\d):,'. + \ '%AFile "%f"\, line %l\, character %c:,'. + \ '%AFile "%f"\, line %l\, character %c:%m,'. + \ '%-GPreprocessing error %.%#,'. + \ '%-GCommand exited %.%#,'. + \ '%C%tarning %n: %m,'. + \ '%C%m,'. + \ '%-G+%.%#' + + return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) +endfunction + +function! s:GetMakeprg() + if g:syntastic_ocaml_use_ocamlc + return s:GetOcamlcMakeprg() + endif + + if g:syntastic_ocaml_use_ocamlbuild && isdirectory('_build') + return s:GetOcamlBuildMakeprg() + endif + + return s:GetOtherMakeprg() +endfunction + +function! s:GetOcamlcMakeprg() + if g:syntastic_ocaml_use_janestreet_core + let build_cmd = "ocamlc -I " + let build_cmd .= expand(g:syntastic_ocaml_janestreet_core_dir) + let build_cmd .= " -c " . syntastic#util#shexpand('%') + return build_cmd + else + return "ocamlc -c " . syntastic#util#shexpand('%') + endif +endfunction + +function! s:GetOcamlBuildMakeprg() + return "ocamlbuild -quiet -no-log -tag annot," . s:ocamlpp . " -no-links -no-hygiene -no-sanitize " . + \ syntastic#util#shexpand('%:r') . ".cmi" +endfunction + +function! s:GetOtherMakeprg() + "TODO: give this function a better name? + " + "TODO: should use throw/catch instead of returning an empty makeprg + + let extension = expand('%:e') + let makeprg = "" + + if stridx(extension, 'mly') >= 0 && executable("menhir") + " ocamlyacc output can't be redirected, so use menhir + let makeprg = "menhir --only-preprocess " . syntastic#util#shexpand('%') . " >" . syntastic#util#DevNull() + elseif stridx(extension,'mll') >= 0 && executable("ocamllex") + let makeprg = "ocamllex -q " . syntastic#c#NullOutput() . " " . syntastic#util#shexpand('%') + else + let makeprg = "camlp4o " . syntastic#c#NullOutput() . " " . syntastic#util#shexpand('%') + endif + + return makeprg +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'ocaml', + \ 'name': 'camlp4o'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/perl/perl.vim b/sources_non_forked/syntastic/syntax_checkers/perl/perl.vim new file mode 100644 index 00000000..553c55a5 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/perl/perl.vim @@ -0,0 +1,109 @@ +"============================================================================ +"File: perl.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Anthony Carapetis , +" Eric Harmon +"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. +" +"============================================================================ +" +" Security: +" +" This checker runs 'perl -c' against your file, which in turn executes +" any BEGIN, UNITCHECK, and CHECK blocks, and any use statements in +" your file. This is probably fine if you wrote the file yourself, +" but it can be a problem if you're trying to check third party files. +" If you are 100% willing to let Vim run the code in your file, set +" g:syntastic_enable_perl_checker to 1 in your vimrc to enable this +" checker: +" +" let g:syntastic_enable_perl_checker = 1 +" +" References: +" +" - http://perldoc.perl.org/perlrun.html#*-c* +" +" Checker options: +" +" - g:syntastic_perl_interpreter (string; default: 'perl') +" The perl interpreter to use. +" +" - g:syntastic_perl_lib_path (list; default: []) +" List of include directories to be added to the perl command line. Example: +" +" let g:syntastic_perl_lib_path = [ './lib', './lib/auto' ] + +if exists('g:loaded_syntastic_perl_perl_checker') + finish +endif +let g:loaded_syntastic_perl_perl_checker = 1 + +if !exists('g:syntastic_perl_lib_path') + let g:syntastic_perl_lib_path = [] +endif + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_perl_perl_IsAvailable() dict + if !exists('g:syntastic_perl_perl_exec') && exists('g:syntastic_perl_interpreter') + let g:syntastic_perl_perl_exec = g:syntastic_perl_interpreter + endif + + " don't call executable() here, to allow things like + " let g:syntastic_perl_interpreter='/usr/bin/env perl' + silent! call system(self.getExecEscaped() . ' -e ' . syntastic#util#shescape('exit(0)')) + return v:shell_error == 0 +endfunction + +function! SyntaxCheckers_perl_perl_GetLocList() dict + if !exists('g:syntastic_enable_perl_checker') || !g:syntastic_enable_perl_checker + call syntastic#log#error('checker perl/perl: checks disabled for security reasons; ' . + \ 'set g:syntastic_enable_perl_checker to 1 to override') + return [] + endif + + if type(g:syntastic_perl_lib_path) == type('') + call syntastic#log#oneTimeWarn('variable g:syntastic_perl_lib_path should be a list') + let includes = split(g:syntastic_perl_lib_path, ',') + else + let includes = copy(syntastic#util#var('perl_lib_path')) + endif + let shebang = syntastic#util#parseShebang() + let extra = join(map(includes, '"-I" . v:val')) . + \ (index(shebang['args'], '-T') >= 0 ? ' -T' : '') . + \ (index(shebang['args'], '-t') >= 0 ? ' -t' : '') + let errorformat = '%f:%l:%m' + + let makeprg = self.makeprgBuild({ 'args_before': '-c -X ' . extra }) + + let errors = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'preprocess': 'perl', + \ 'defaults': {'type': 'E'} }) + if !empty(errors) + return errors + endif + + let makeprg = self.makeprgBuild({ 'args_before': '-c -Mwarnings ' . extra }) + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'preprocess': 'perl', + \ 'defaults': {'type': 'W'} }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'perl', + \ 'name': 'perl'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/perl/perlcritic.vim b/sources_non_forked/syntastic/syntax_checkers/perl/perlcritic.vim new file mode 100644 index 00000000..cd010945 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/perl/perlcritic.vim @@ -0,0 +1,66 @@ +"============================================================================ +"File: perlcritic.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: LCD 47 +"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. +" +"============================================================================ +" +" For details about perlcritic see: +" +" - http://perlcritic.tigris.org/ +" - https://metacpan.org/module/Perl::Critic +" +" Checker options: +" +" - g:syntastic_perl_perlcritic_thres (integer; default: 5) +" error threshold: policy violations with a severity above this +" value are highlighted as errors, the others are warnings +" +" - g:syntastic_perl_perlcritic_args (string; default: empty) +" command line options to pass to perlcritic + +if exists("g:loaded_syntastic_perl_perlcritic_checker") + finish +endif +let g:loaded_syntastic_perl_perlcritic_checker = 1 + +if !exists('g:syntastic_perl_perlcritic_thres') + let g:syntastic_perl_perlcritic_thres = 5 +endif + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_perl_perlcritic_GetLocList() dict + let makeprg = self.makeprgBuild({ + \ 'args_after': '--quiet --nocolor --verbose "\%s:\%f:\%l:\%c:(\%s) \%m (\%e)\n"' }) + + let errorformat = '%t:%f:%l:%c:%m' + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'returns': [0, 2], + \ 'subtype': 'Style' }) + + " change error types according to the prescribed threshold + for e in loclist + let e['type'] = e['type'] < g:syntastic_perl_perlcritic_thres ? 'W' : 'E' + endfor + + return loclist +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'perl', + \ 'name': 'perlcritic'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/perl/podchecker.vim b/sources_non_forked/syntastic/syntax_checkers/perl/podchecker.vim new file mode 100644 index 00000000..5ffc7365 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/perl/podchecker.vim @@ -0,0 +1,25 @@ +"============================================================================ +"File: podchecker.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: LCD 47 +"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_perl_podchecker_checker") + finish +endif +let g:loaded_syntastic_perl_podchecker_checker = 1 + +runtime! syntax_checkers/pod/*.vim + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'perl', + \ 'name': 'podchecker', + \ 'redirect': 'pod/podchecker'}) + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/php/php.vim b/sources_non_forked/syntastic/syntax_checkers/php/php.vim new file mode 100644 index 00000000..23c1db9e --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/php/php.vim @@ -0,0 +1,51 @@ +"============================================================================ +"File: php.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Martin Grenfell +"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_php_php_checker") + finish +endif +let g:loaded_syntastic_php_php_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_php_php_GetHighlightRegex(item) + let term = matchstr(a:item['text'], "\\munexpected '\\zs[^']\\+\\ze'") + return term != '' ? '\V' . escape(term, '\') : '' +endfunction + +function! SyntaxCheckers_php_php_GetLocList() dict + let makeprg = self.makeprgBuild({ + \ 'args': '-d error_reporting=E_ALL', + \ 'args_after': '-l -d display_errors=1 -d log_errors=0 -d xdebug.cli_color=0' }) + + let errorformat = + \ '%-GNo syntax errors detected in%.%#,'. + \ 'Parse error: %#syntax %trror\, %m in %f on line %l,'. + \ 'Parse %trror: %m in %f on line %l,'. + \ 'Fatal %trror: %m in %f on line %l,'. + \ '%-G\s%#,'. + \ '%-GErrors parsing %.%#' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'php', + \ 'name': 'php'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/php/phpcs.vim b/sources_non_forked/syntastic/syntax_checkers/php/phpcs.vim new file mode 100644 index 00000000..e6600ac6 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/php/phpcs.vim @@ -0,0 +1,46 @@ +"============================================================================ +"File: phpcs.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Martin Grenfell +"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. +" +"============================================================================ +" +" See here for details of phpcs +" - phpcs (see http://pear.php.net/package/PHP_CodeSniffer) + +if exists("g:loaded_syntastic_php_phpcs_checker") + finish +endif +let g:loaded_syntastic_php_phpcs_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_php_phpcs_GetLocList() dict + let makeprg = self.makeprgBuild({ + \ 'args': '--tab-width=' . &tabstop, + \ 'args_after': '--report=csv' }) + + let errorformat = + \ '%-GFile\,Line\,Column\,Type\,Message\,Source\,Severity%.%#,'. + \ '"%f"\,%l\,%v\,%t%*[a-zA-Z]\,"%m"\,%*[a-zA-Z0-9_.-]\,%*[0-9]%.%#' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'subtype': 'Style' }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'php', + \ 'name': 'phpcs' }) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/php/phpmd.vim b/sources_non_forked/syntastic/syntax_checkers/php/phpmd.vim new file mode 100644 index 00000000..6b6022ab --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/php/phpmd.vim @@ -0,0 +1,80 @@ +"============================================================================ +"File: phpmd.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Martin Grenfell +"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. +" +"============================================================================ +" +" See here for details of phpmd +" - phpmd (see http://phpmd.org) + +if exists("g:loaded_syntastic_php_phpmd_checker") + finish +endif +let g:loaded_syntastic_php_phpmd_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_php_phpmd_GetHighlightRegex(item) + let term = matchstr(a:item['text'], '\m\C^The \S\+ \w\+\(()\)\= \(has\|is not\|utilizes\)') + if term != '' + return '\V'.substitute(term, '\m\C^The \S\+ \(\w\+\)\(()\)\= .*', '\1', '') + endif + let term = matchstr(a:item['text'], '\m\C^Avoid \(variables with short\|excessively long variable\) names like \S\+\.') + if term != '' + return '\V'.substitute(term, '\m\C^Avoid \(variables with short\|excessively long variable\) names like \(\S\+\)\..*', '\2', '') + endif + let term = matchstr(a:item['text'], '\m\C^Avoid using short method names like \S\+::\S\+()\.') + if term != '' + return '\V'.substitute(term, '\m\C^Avoid using short method names like \S\+::\(\S\+\)()\..*', '\1', '') + endif + let term = matchstr(a:item['text'], '\m\C^\S\+ accesses the super-global variable ') + if term != '' + return '\V'.substitute(term, '\m\C accesses the super-global variable .*$', '', '') + endif + let term = matchstr(a:item['text'], '\m\C^Constant \S\+ should be defined in uppercase') + if term != '' + return '\V'.substitute(term, '\m\C^Constant \(\S\+\) should be defined in uppercase', '\1', '') + endif + let term = matchstr(a:item['text'], "\\m\\C^The '\\S\\+()' method which returns ") + if term != '' + return '\V'.substitute(term, "\\m\\C^The '\\(\\S\\+\\()' method which returns.*", '\1', '') + endif + let term = matchstr(a:item['text'], '\m\C variable \S\+ should begin with ') + if term != '' + return '\V'.substitute(term, '\m\C.* variable \(\S\+\) should begin with .*', '\1', '') + endif + let term = matchstr(a:item['text'], "\\m\\C^Avoid unused \\(private fields\\|local variables\\|private methods\\|parameters\\) such as '\\S\\+'") + if term != '' + return '\V'.substitute(term, "\\m\\C^Avoid unused \\(private fields\\|local variables\\|private methods\\|parameters\\) such as '\\(\\S\\+\\)'.*", '\2', '') + endif + return '' +endfunction + +function! SyntaxCheckers_php_phpmd_GetLocList() dict + let makeprg = self.makeprgBuild({ + \ 'post_args_before': 'text', + \ 'post_args': 'codesize,design,unusedcode,naming' }) + + let errorformat = '%E%f:%l%\s%#%m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'subtype' : 'Style' }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'php', + \ 'name': 'phpmd'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/po/msgfmt.vim b/sources_non_forked/syntastic/syntax_checkers/po/msgfmt.vim new file mode 100644 index 00000000..254aa91a --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/po/msgfmt.vim @@ -0,0 +1,50 @@ +"============================================================================ +"File: msgfmt.vim +"Description: Syntax checking plugin for po files of gettext +"Maintainer: Ryo Okubo +"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_po_msgfmt_checker") + finish +endif +let g:loaded_syntastic_po_msgfmt_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_po_msgfmt_GetHighlightRegex(item) + let term = matchstr(a:item['text'], '\mkeyword "\zs[^"]\+\ze" unknown') + return term != '' ? '\V' . escape(term, '\') : '' +endfunction + +function! SyntaxCheckers_po_msgfmt_GetLocList() dict + let makeprg = self.makeprgBuild({ 'args_after': '-c ' . syntastic#c#NullOutput() }) + + let errorformat = + \ '%W%f:%l: warning: %m,' . + \ '%E%f:%l:%v: %m,' . + \ '%E%f:%l: %m,' . + \ '%+C %.%#,' . + \ '%Z%p^,' . + \ '%-G%.%#' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'postprocess': ['compressWhitespace'] }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'po', + \ 'name': 'msgfmt'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/pod/podchecker.vim b/sources_non_forked/syntastic/syntax_checkers/pod/podchecker.vim new file mode 100644 index 00000000..34a37e55 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/pod/podchecker.vim @@ -0,0 +1,51 @@ +"============================================================================ +"File: podchecker.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: LCD 47 +"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_pod_podchecker_checker") + finish +endif +let g:loaded_syntastic_pod_podchecker_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_pod_podchecker_GetLocList() dict + let makeprg = self.makeprgBuild({}) + + let errorformat = + \ '%W%[%#]%[%#]%[%#] WARNING: %m at line %l in file %f,' . + \ '%W%[%#]%[%#]%[%#] WARNING: %m at line EOF in file %f,' . + \ '%E%[%#]%[%#]%[%#] ERROR: %m at line %l in file %f,' . + \ '%E%[%#]%[%#]%[%#] ERROR: %m at line EOF in file %f' + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'returns': [0, 1, 2] }) + + for e in loclist + if e['valid'] && e['lnum'] == 0 + let e['lnum'] = str2nr(matchstr(e['text'], '\m\ +"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_puppet_puppet_checker") + finish +endif +let g:loaded_syntastic_puppet_puppet_checker = 1 + +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 syntastic#util#versionIsAtLeast(ver, [2,7,0]) + let args = 'parser validate --color=false' + else + let args = '--color=false --parseonly' + endif + + let makeprg = self.makeprgBuild({ 'args_before': args }) + + let errorformat = + \ '%-Gerr: Try ''puppet help parser validate'' for usage,' . + \ '%-GError: Try ''puppet help parser validate'' for usage,' . + \ '%Eerr: Could not parse for environment %*[a-z]: %m at %f:%l,' . + \ '%EError: Could not parse for environment %*[a-z]: %m at %f:%l' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'puppet', + \ 'name': 'puppet'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/puppet/puppetlint.vim b/sources_non_forked/syntastic/syntax_checkers/puppet/puppetlint.vim new file mode 100644 index 00000000..ff4ba071 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/puppet/puppetlint.vim @@ -0,0 +1,50 @@ +"============================================================================ +"File: puppetlint.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Eivind Uggedal +"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_puppet_puppetlint_checker") + finish +endif +let g:loaded_syntastic_puppet_puppetlint_checker = 1 + +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]) +endfunction + +function! SyntaxCheckers_puppet_puppetlint_GetLocList() dict + call syntastic#log#deprecationWarn('puppet_lint_arguments', 'puppet_puppetlint_args') + + let makeprg = self.makeprgBuild({ + \ 'args_after': '--log-format "%{KIND} [%{check}] %{message} at %{fullpath}:%{linenumber}"' }) + + let errorformat = '%t%*[a-zA-Z] %m at %f:%l' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'puppet', + \ 'name': 'puppetlint', + \ 'exec': 'puppet-lint'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/python/compile.py b/sources_non_forked/syntastic/syntax_checkers/python/compile.py new file mode 100755 index 00000000..32f1413d --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/python/compile.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python + +from __future__ import print_function +from sys import argv, exit + + +if len(argv) != 2: + exit(1) + +try: + compile(open(argv[1]).read(), argv[1], 'exec', 0, 1) +except SyntaxError as err: + print('%s:%s:%s: %s' % (err.filename, err.lineno, err.offset, err.msg)) diff --git a/sources_non_forked/syntastic/syntax_checkers/python/flake8.vim b/sources_non_forked/syntastic/syntax_checkers/python/flake8.vim new file mode 100644 index 00000000..1e4f1c9b --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/python/flake8.vim @@ -0,0 +1,72 @@ +"============================================================================ +"File: flake8.vim +"Description: Syntax checking plugin for syntastic.vim +"Authors: Sylvain Soliman +" kstep +" +"============================================================================ + +if exists("g:loaded_syntastic_python_flake8_checker") + finish +endif +let g:loaded_syntastic_python_flake8_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_python_flake8_GetHighlightRegex(item) + return SyntaxCheckers_python_pyflakes_GetHighlightRegex(a:item) +endfunction + +function! SyntaxCheckers_python_flake8_GetLocList() dict + let makeprg = self.makeprgBuild({}) + + let errorformat = + \ '%E%f:%l: could not compile,%-Z%p^,' . + \ '%A%f:%l:%c: %t%n %m,' . + \ '%A%f:%l: %t%n %m,' . + \ '%-G%.%#' + + let env = syntastic#util#isRunningWindows() ? {} : { 'TERM': 'dumb' } + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'env': env }) + + for e in loclist + " E*** and W*** are pep8 errors + " F*** are PyFlakes codes + " C*** are McCabe complexity messages + " N*** are naming conventions from pep8-naming + + if has_key(e, 'nr') + let e['text'] .= printf(' [%s%03d]', e['type'], e['nr']) + " E901 are syntax errors + " E902 are I/O errors + if e['type'] ==? 'E' && e['nr'] !~ '\m^9' + let e['subtype'] = 'Style' + endif + call remove(e, 'nr') + endif + + if e['type'] =~? '\m^[CNW]' + let e['subtype'] = 'Style' + endif + + let e['type'] = e['type'] =~? '\m^[EFC]' ? 'E' : 'W' + endfor + + return loclist +endfunction + +runtime! syntax_checkers/python/pyflakes.vim + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'python', + \ 'name': 'flake8'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/python/frosted.vim b/sources_non_forked/syntastic/syntax_checkers/python/frosted.vim new file mode 100644 index 00000000..e1284e44 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/python/frosted.vim @@ -0,0 +1,63 @@ +"============================================================================ +"File: frosted.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: LCD 47 +"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_python_frosted_checker') + finish +endif +let g:loaded_syntastic_python_frosted_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_python_frosted_GetLocList() dict + let makeprg = self.makeprgBuild({ 'args_after': '-vb' }) + + let errorformat = + \ '%f:%l:%c:%m,' . + \ '%E%f:%l: %m,' . + \ '%-Z%p^,' . + \ '%-G%.%#' + + let env = syntastic#util#isRunningWindows() ? {} : { 'TERM': 'dumb' } + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'env': env, + \ 'returns': [0, 1] }) + + for e in loclist + let e["col"] += 1 + + let parts = matchlist(e.text, '\v^([EW]\d+):([^:]*):(.+)') + if len(parts) >= 4 + let e["type"] = parts[1][0] + let e["text"] = parts[3] . ' [' . parts[1] . ']' + let e["hl"] = '\V' . escape(parts[2], '\') + elseif e["text"] =~? '\v^I\d+:' + let e["valid"] = 0 + else + let e["vcol"] = 0 + endif + endfor + + return loclist +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'python', + \ 'name': 'frosted' }) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/python/pep257.vim b/sources_non_forked/syntastic/syntax_checkers/python/pep257.vim new file mode 100644 index 00000000..d4b16575 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/python/pep257.vim @@ -0,0 +1,62 @@ +"============================================================================ +"File: pep257.vim +"Description: Docstring style checking plugin for syntastic.vim +"============================================================================ +" +" For details about pep257 see: https://github.com/GreenSteam/pep257 + +if exists('g:loaded_syntastic_python_pep257_checker') + finish +endif +let g:loaded_syntastic_python_pep257_checker = 1 + +let s:save_cpo = &cpo +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]) + endif + + let makeprg = self.makeprgBuild({}) + + if s:pep257_new + let errorformat = + \ '%E%f:%l %.%#:,' . + \ '%+C %m' + else + let errorformat = + \ '%E%f:%l:%c%\%.%\%.%\d%\+:%\d%\+: %m,' . + \ '%E%f:%l:%c: %m,' . + \ '%+C %m' + endif + + let env = syntastic#util#isRunningWindows() ? {} : { 'TERM': 'dumb' } + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'env': env, + \ 'subtype': 'Style', + \ 'preprocess': 'killEmpty', + \ 'postprocess': ['compressWhitespace'] }) + + if s:pep257_new == 0 + " byte offsets rather than column numbers + for e in loclist + let e['col'] = get(e, 'col', 0) + 1 + endfor + endif + + return loclist +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'python', + \ 'name': 'pep257'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/python/pep8.vim b/sources_non_forked/syntastic/syntax_checkers/python/pep8.vim new file mode 100644 index 00000000..0f35c276 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/python/pep8.vim @@ -0,0 +1,50 @@ +"============================================================================ +"File: pep8.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: LCD 47 +"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. +" +"============================================================================ +" +" For details about pep8 see: https://github.com/jcrocholl/pep8 + +if exists("g:loaded_syntastic_python_pep8_checker") + finish +endif +let g:loaded_syntastic_python_pep8_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_python_pep8_GetLocList() dict + let makeprg = self.makeprgBuild({}) + + let errorformat = '%f:%l:%c: %m' + + let env = syntastic#util#isRunningWindows() ? {} : { 'TERM': 'dumb' } + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'env': env, + \ 'subtype': 'Style' }) + + for e in loclist + let e['type'] = e['text'] =~? '^W' ? 'W' : 'E' + endfor + + return loclist +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'python', + \ 'name': 'pep8'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/python/py3kwarn.vim b/sources_non_forked/syntastic/syntax_checkers/python/py3kwarn.vim new file mode 100644 index 00000000..69a3060f --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/python/py3kwarn.vim @@ -0,0 +1,36 @@ +"============================================================================ +"File: py3kwarn.vim +"Description: Syntax checking plugin for syntastic.vim +"Authors: Liam Curry +" +"============================================================================ + +if exists("g:loaded_syntastic_python_py3kwarn_checker") + finish +endif +let g:loaded_syntastic_python_py3kwarn_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_python_py3kwarn_GetLocList() dict + let makeprg = self.makeprgBuild({}) + + let errorformat = '%W%f:%l:%c: %m' + + let env = syntastic#util#isRunningWindows() ? {} : { 'TERM': 'dumb' } + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'env': env }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'python', + \ 'name': 'py3kwarn'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/python/pyflakes.vim b/sources_non_forked/syntastic/syntax_checkers/python/pyflakes.vim new file mode 100644 index 00000000..530a275c --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/python/pyflakes.vim @@ -0,0 +1,74 @@ +"============================================================================ +"File: pyflakes.vim +"Description: Syntax checking plugin for syntastic.vim +"Authors: Martin Grenfell +" kstep +" Parantapa Bhattacharya +" +"============================================================================ + +if exists("g:loaded_syntastic_python_pyflakes_checker") + finish +endif +let g:loaded_syntastic_python_pyflakes_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_python_pyflakes_GetHighlightRegex(i) + if stridx(a:i['text'], 'is assigned to but never used') >= 0 + \ || stridx(a:i['text'], 'imported but unused') >= 0 + \ || stridx(a:i['text'], 'undefined name') >= 0 + \ || stridx(a:i['text'], 'redefinition of') >= 0 + \ || stridx(a:i['text'], 'referenced before assignment') >= 0 + \ || stridx(a:i['text'], 'duplicate argument') >= 0 + \ || stridx(a:i['text'], 'after other statements') >= 0 + \ || stridx(a:i['text'], 'shadowed by loop variable') >= 0 + + " fun with Python's %r: try "..." first, then '...' + let term = matchstr(a:i['text'], '\m^.\{-}"\zs.\{-1,}\ze"') + if term != '' + return '\V\<' . escape(term, '\') . '\>' + endif + + let term = matchstr(a:i['text'], '\m^.\{-}''\zs.\{-1,}\ze''') + if term != '' + return '\V\<' . escape(term, '\') . '\>' + endif + endif + return '' +endfunction + +function! SyntaxCheckers_python_pyflakes_GetLocList() dict + let makeprg = self.makeprgBuild({}) + + let errorformat = + \ '%E%f:%l: could not compile,'. + \ '%-Z%p^,'. + \ '%E%f:%l:%c: %m,'. + \ '%E%f:%l: %m,'. + \ '%-G%.%#' + + let env = syntastic#util#isRunningWindows() ? {} : { 'TERM': 'dumb' } + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'env': env, + \ 'defaults': {'text': "Syntax error"} }) + + for e in loclist + let e['vcol'] = 0 + endfor + + return loclist +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'python', + \ 'name': 'pyflakes'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/python/pylama.vim b/sources_non_forked/syntastic/syntax_checkers/python/pylama.vim new file mode 100644 index 00000000..01c0ab62 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/python/pylama.vim @@ -0,0 +1,72 @@ +"============================================================================ +"File: pylama.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: LCD 47 +"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_python_pylama_checker') + finish +endif +let g:loaded_syntastic_python_pylama_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_python_pylama_GetHighlightRegex(item) + return SyntaxCheckers_python_pyflakes_GetHighlightRegex(a:item) +endfunction + +function! SyntaxCheckers_python_pylama_GetLocList() dict + let makeprg = self.makeprgBuild({ 'args_after': '-f pep8' }) + + " TODO: "WARNING:pylama:..." messages are probably a logging bug + let errorformat = + \ '%-GWARNING:pylama:%.%#,' . + \ '%A%f:%l:%c: %m' + + let env = syntastic#util#isRunningWindows() ? {} : { 'TERM': 'dumb' } + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'env': env }) + + " adjust for weirdness in each checker + for e in loclist + let e['type'] = e['text'] =~? '\m^[RCW]' ? 'W' : 'E' + if e['text'] =~# '\v\[%(mccabe|pep257|pylint)\]$' + if has_key(e, 'col') + let e['col'] += 1 + endif + endif + if e['text'] =~# '\v\[pylint\]$' + if has_key(e, 'vcol') + let e['vcol'] = 0 + endif + endif + if e['text'] =~# '\v\[%(mccabe|pep257|pep8)\]$' + let e['subtype'] = 'Style' + endif + endfor + + call self.setWantSort(1) + + return loclist +endfunction + +runtime! syntax_checkers/python/pyflakes.vim + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'python', + \ 'name': 'pylama' }) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/python/pylint.vim b/sources_non_forked/syntastic/syntax_checkers/python/pylint.vim new file mode 100644 index 00000000..88dff422 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/python/pylint.vim @@ -0,0 +1,90 @@ +"============================================================================ +"File: pylint.vim +"Description: Syntax checking plugin for syntastic.vim +"Author: Parantapa Bhattacharya +" +"============================================================================ + +if exists("g:loaded_syntastic_python_pylint_checker") + finish +endif +let g:loaded_syntastic_python_pylint_checker = 1 + +let s:pylint_new = -1 + +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 + 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') }) + + let errorformat = + \ '%A%f:%l:%c:%t: %m,' . + \ '%A%f:%l: %m,' . + \ '%A%f:(%l): %m,' . + \ '%-Z%p^%.%#,' . + \ '%-G%.%#' + + let env = syntastic#util#isRunningWindows() ? {} : { 'TERM': 'dumb' } + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'env': env, + \ 'returns': range(32) }) + + for e in loclist + if !s:pylint_new + let e['type'] = e['text'][1] + endif + + if e['type'] =~? '\m^[EF]' + let e['type'] = 'E' + elseif e['type'] =~? '\m^[CRW]' + let e['type'] = 'W' + else + let e['valid'] = 0 + endif + + let e['col'] += 1 + let e['vcol'] = 0 + endfor + + call self.setWantSort(1) + + 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". + " Have you guys considered switching to creative writing yet? ;) + let pylint_version = filter(split(system(exe . ' --version'), '\m, \=\|\n'), 'v:val =~# ''\m^\.\=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' }) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/python/python.vim b/sources_non_forked/syntastic/syntax_checkers/python/python.vim new file mode 100644 index 00000000..5023ee6c --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/python/python.vim @@ -0,0 +1,49 @@ +"============================================================================ +"File: python.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: LCD 47 +"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_python_python_checker") + finish +endif +let g:loaded_syntastic_python_python_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +let s:compiler = expand(':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]) +endfunction + +function! SyntaxCheckers_python_python_GetLocList() dict + let makeprg = self.makeprgBuild({ 'exe': [self.getExec(), s:compiler] }) + + let errorformat = '%E%f:%l:%c: %m' + + let env = syntastic#util#isRunningWindows() ? {} : { 'TERM': 'dumb' } + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'env': env, + \ 'returns': [0] }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'python', + \ 'name': 'python'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/r/lint.vim b/sources_non_forked/syntastic/syntax_checkers/r/lint.vim new file mode 100644 index 00000000..9112905b --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/r/lint.vim @@ -0,0 +1,81 @@ +"============================================================================ +"File: lint.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: LCD 47 +"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_r_lint_checker") + finish +endif +let g:loaded_syntastic_r_lint_checker = 1 + +if !exists('g:syntastic_r_lint_styles') + let g:syntastic_r_lint_styles = 'lint.style' +endif + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_r_lint_GetHighlightRegex(item) + let term = matchstr(a:item['text'], '\m`\zs[^`]\+\ze`') + if term == '' + let term = matchstr(a:item['text'], "\\m'\\zs[^']\\+\\ze'") + endif + return term != '' ? '\V' . escape(term, '\') : '' +endfunction + +function! SyntaxCheckers_r_lint_IsAvailable() dict + if !executable(self.getExec()) + return 0 + endif + call system(self.getExecEscaped() . ' --slave --restore --no-save -e ' . syntastic#util#shescape('library(lint)')) + return v:shell_error == 0 +endfunction + +function! SyntaxCheckers_r_lint_GetLocList() dict + let setwd = syntastic#util#isRunningWindows() ? 'setwd("' . escape(getcwd(), '"\') . '"); ' : '' + let setwd = 'setwd("' . escape(getcwd(), '"\') . '"); ' + let makeprg = self.getExecEscaped() . ' --slave --restore --no-save' . + \ ' -e ' . syntastic#util#shescape(setwd . 'library(lint); ' . + \ 'try(lint(commandArgs(TRUE), ' . g:syntastic_r_lint_styles . '))') . + \ ' --args ' . syntastic#util#shexpand('%') + + let errorformat = + \ '%t:%f:%l:%v: %m,' . + \ '%t:%f:%l: %m' + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'subtype': 'Style', + \ 'preprocess': 'rparse', + \ 'returns': [0] }) + + for e in loclist + if e['type'] == 'F' + " parse error + let e['type'] = 'E' + call remove(e, 'subtype') + endif + endfor + + call self.setWantSort(1) + + return loclist +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'r', + \ 'name': 'lint', + \ 'exec': 'R' }) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/r/svtools.vim b/sources_non_forked/syntastic/syntax_checkers/r/svtools.vim new file mode 100644 index 00000000..ec924c38 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/r/svtools.vim @@ -0,0 +1,78 @@ +"============================================================================ +"File: svtools.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: LCD 47 +"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. +" +"============================================================================ +" +" Security: +" +" This checker runs the code in your file. This is probably fine if you +" wrote the file yourself, but it can be a problem if you're trying to +" check third party files. If you are 100% willing to let Vim run the +" code in your file, set g:syntastic_enable_r_svtools_checker to 1 in +" your vimrc to enable this checker: +" +" let g:syntastic_enable_r_svtools_checker = 1 + +if exists("g:loaded_syntastic_r_svtools_checker") + finish +endif +let g:loaded_syntastic_r_svtools_checker = 1 + +if !exists('g:syntastic_r_svtools_styles') + let g:syntastic_r_svtools_styles = 'lint.style' +endif + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_r_svtools_GetHighlightRegex(item) + let term = matchstr(a:item['text'], "\\m'\\zs[^']\\+\\ze'") + return term != '' ? '\V' . escape(term, '\') : '' +endfunction + +function! SyntaxCheckers_r_svtools_IsAvailable() dict + if !executable(self.getExec()) + return 0 + endif + call system(self.getExecEscaped() . ' --slave --restore --no-save -e ' . syntastic#util#shescape('library(svTools)')) + return v:shell_error == 0 +endfunction + +function! SyntaxCheckers_r_svtools_GetLocList() dict + if !exists('g:syntastic_enable_r_svtools_checker') || !g:syntastic_enable_r_svtools_checker + call syntastic#log#error('checker r/svtools: checks disabled for security reasons; set g:syntastic_enable_r_svtools_checker to 1 to override') + return [] + endif + + let setwd = syntastic#util#isRunningWindows() ? 'setwd("' . escape(getcwd(), '"\') . '"); ' : '' + let makeprg = self.getExecEscaped() . ' --slave --restore --no-save' . + \ ' -e ' . syntastic#util#shescape(setwd . 'library(svTools); ' . + \ 'try(lint(commandArgs(TRUE), filename = commandArgs(TRUE), type = "flat", sep = ":"))') . + \ ' --args ' . syntastic#util#shexpand('%') + + let errorformat = + \ '%trror:%f:%\s%#%l:%\s%#%v:%m,' . + \ '%tarning:%f:%\s%#%l:%\s%#%v:%m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'returns': [0] }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'r', + \ 'name': 'svtools', + \ 'exec': 'R' }) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/racket/code-ayatollah.vim b/sources_non_forked/syntastic/syntax_checkers/racket/code-ayatollah.vim new file mode 100644 index 00000000..ffb02f7b --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/racket/code-ayatollah.vim @@ -0,0 +1,60 @@ +"============================================================================ +"File: code-ayatollah.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: LCD 47 +"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_racket_code_ayatollah_checker") + finish +endif +let g:loaded_syntastic_racket_code_ayatollah_checker = 1 + +if !exists('g:syntastic_racket_code_ayatollah_script') + let g:syntastic_racket_code_ayatollah_script = 'code-ayatollah.rkt' +endif + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_racket_code_ayatollah_IsAvailable() dict + let s:script = expand(g:syntastic_racket_code_ayatollah_script) + return executable(self.getExec()) && filereadable(s:script) +endfunction + +function! SyntaxCheckers_racket_code_ayatollah_GetLocList() dict + let makeprg = self.makeprgBuild({ 'exe': [self.getExec(), s:script] }) + + let errorformat = + \ ' %l:%v: %m,' . + \ '%PErrors in %f:,' . + \ '%-G%.%#' + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'subtype': 'Style' }) + + for e in loclist + let e['col'] += 1 + endfor + + call self.setWantSort(1) + + return loclist +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'racket', + \ 'name': 'code_ayatollah', + \ 'exec': 'racket' }) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/racket/racket.vim b/sources_non_forked/syntastic/syntax_checkers/racket/racket.vim new file mode 100644 index 00000000..71615205 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/racket/racket.vim @@ -0,0 +1,50 @@ +"============================================================================ +"File: racket.vim +"Description: Syntax checking plugin for syntastic.vim +"Author: Steve Bragg +" +"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_racket_racket_checker") + finish +endif +let g:loaded_syntastic_racket_racket_checker=1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_racket_racket_GetLocList() dict + let makeprg = self.makeprgBuild({}) + + " example of error message + "eval-apply.rkt:460:30: the-empty-environment: unbound identifier in module + " in: the-empty-environment + let errorformat = '%f:%l:%v: %m' + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) + + for e in loclist + if has_key(e, 'col') + let e['col'] += 1 + endif + endfor + + return loclist +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'racket', + \ 'name': 'racket'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/rst/rst2pseudoxml.vim b/sources_non_forked/syntastic/syntax_checkers/rst/rst2pseudoxml.vim new file mode 100644 index 00000000..e5fb0a1f --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/rst/rst2pseudoxml.vim @@ -0,0 +1,62 @@ +"============================================================================ +"File: rst.vim +"Description: Syntax checking plugin for docutil's reStructuredText files +"Maintainer: James Rowe +"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. +" +"============================================================================ + +" We use rst2pseudoxml.py, as it is ever so marginally faster than the other +" rst2${x} tools in docutils. + +if exists("g:loaded_syntastic_rst_rst2pseudoxml_checker") + finish +endif +let g:loaded_syntastic_rst_rst2pseudoxml_checker = 1 + +let s:rst2pseudoxml = executable('rst2pseudoxml.py') ? 'rst2pseudoxml.py' : 'rst2pseudoxml' + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_rst_rst2pseudoxml_GetLocList() dict + let makeprg = self.makeprgBuild({ + \ 'args_after': '--report=2 --exit-status=1', + \ 'tail': syntastic#util#DevNull() }) + + let errorformat = + \ '%f:%l: (%tNFO/1) %m,'. + \ '%f:%l: (%tARNING/2) %m,'. + \ '%f:%l: (%tRROR/3) %m,'. + \ '%f:%l: (%tEVERE/4) %m,'. + \ '%-G%.%#' + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) + + for e in loclist + if e['type'] ==? 'S' + let e['type'] = 'E' + elseif e['type'] ==? 'I' + let e['type'] = 'W' + let e['subtype'] = 'Style' + endif + endfor + + return loclist +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'rst', + \ 'name': 'rst2pseudoxml', + \ 'exec': s:rst2pseudoxml }) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/rst/rstcheck.vim b/sources_non_forked/syntastic/syntax_checkers/rst/rstcheck.vim new file mode 100644 index 00000000..5c831490 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/rst/rstcheck.vim @@ -0,0 +1,50 @@ +"============================================================================ +"File: rstcheck.vim +"Description: Syntax checking for reStructuredText and embedded code blocks +"Authors: Steven Myint +" +"============================================================================ + +if exists("g:loaded_syntastic_rst_rstcheck_checker") + finish +endif +let g:loaded_syntastic_rst_rstcheck_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_rst_rstcheck_GetLocList() dict + let makeprg = self.makeprgBuild({}) + + let errorformat = + \ '%f:%l: (%tNFO/1) %m,'. + \ '%f:%l: (%tARNING/2) %m,'. + \ '%f:%l: (%tRROR/3) %m,'. + \ '%f:%l: (%tEVERE/4) %m,'. + \ '%-G%.%#' + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'returns': [0, 1] }) + + for e in loclist + if e['type'] ==? 'S' + let e['type'] = 'E' + elseif e['type'] ==? 'I' + let e['type'] = 'W' + let e['subtype'] = 'Style' + endif + endfor + + return loclist +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'rst', + \ 'name': 'rstcheck'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/ruby/jruby.vim b/sources_non_forked/syntastic/syntax_checkers/ruby/jruby.vim new file mode 100644 index 00000000..bf57b091 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/ruby/jruby.vim @@ -0,0 +1,50 @@ +"============================================================================ +"File: jruby.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Leonid Shevtsov +"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_ruby_jruby_checker") + finish +endif +let g:loaded_syntastic_ruby_jruby_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_ruby_jruby_GetLocList() dict + let makeprg = self.makeprgBuild({ + \ 'args': (syntastic#util#isRunningWindows() ? '-T1' : ''), + \ 'args_after': '-W1 -c' }) + + let errorformat = + \ '%-GSyntax OK for %f,'. + \ '%ESyntaxError in %f:%l: syntax error\, %m,'. + \ '%Z%p^,'. + \ '%W%f:%l: warning: %m,'. + \ '%Z%p^,'. + \ '%W%f:%l: %m,'. + \ '%-C%.%#' + + let env = syntastic#util#isRunningWindows() ? {} : { 'RUBYOPT': '' } + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'env': env }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'ruby', + \ 'name': 'jruby'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/ruby/macruby.vim b/sources_non_forked/syntastic/syntax_checkers/ruby/macruby.vim new file mode 100644 index 00000000..54c8365f --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/ruby/macruby.vim @@ -0,0 +1,47 @@ +"============================================================================ +"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. +" +"============================================================================ + +if exists("g:loaded_syntastic_ruby_macruby_checker") + finish +endif +let g:loaded_syntastic_ruby_macruby_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_ruby_macruby_GetLocList() dict + let makeprg = self.makeprgBuild({ 'args_after': '-W1 -c' }) + + let errorformat = + \ '%-GSyntax OK,'. + \ '%E%f:%l: syntax error\, %m,'. + \ '%Z%p^,'. + \ '%W%f:%l: warning: %m,'. + \ '%Z%p^,'. + \ '%W%f:%l: %m,'. + \ '%-C%.%#' + + let env = { 'RUBYOPT': '' } + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'env': env }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'ruby', + \ 'name': 'macruby'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/ruby/mri.vim b/sources_non_forked/syntastic/syntax_checkers/ruby/mri.vim new file mode 100644 index 00000000..e55c493d --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/ruby/mri.vim @@ -0,0 +1,79 @@ +"============================================================================ +"File: mri.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Martin Grenfell +"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_ruby_mri_checker") + finish +endif +let g:loaded_syntastic_ruby_mri_checker = 1 + +let s:save_cpo = &cpo +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 + endif + return executable(self.getExec()) +endfunction + +function! SyntaxCheckers_ruby_mri_GetHighlightRegex(i) + if stridx(a:i['text'], 'assigned but unused variable') >= 0 + let term = split(a:i['text'], ' - ')[1] + return '\V\<' . escape(term, '\') . '\>' + endif + + return '' +endfunction + +function! SyntaxCheckers_ruby_mri_GetLocList() dict + let makeprg = self.makeprgBuild({ 'args_after': '-w -T1 -c' }) + + "this is a hack to filter out a repeated useless warning in rspec files + "containing lines like + " + " foo.should == 'bar' + " + "Which always generate the warning below. Note that ruby >= 1.9.3 includes + "the word "possibly" in the warning + let errorformat = '%-G%.%#warning: %\(possibly %\)%\?useless use of == in void context,' + + " filter out lines starting with ... + " long lines are truncated and wrapped in ... %p then returns the wrong + " column offset + let errorformat .= '%-G%\%.%\%.%\%.%.%#,' + + let errorformat .= + \ '%-GSyntax OK,'. + \ '%E%f:%l: syntax error\, %m,'. + \ '%Z%p^,'. + \ '%W%f:%l: warning: %m,'. + \ '%Z%p^,'. + \ '%W%f:%l: %m,'. + \ '%-C%.%#' + + let env = syntastic#util#isRunningWindows() ? {} : { 'RUBYOPT': '' } + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'env': env }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'ruby', + \ 'name': 'mri', + \ 'exec': 'ruby'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/ruby/rubocop.vim b/sources_non_forked/syntastic/syntax_checkers/ruby/rubocop.vim new file mode 100644 index 00000000..9177c563 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/ruby/rubocop.vim @@ -0,0 +1,59 @@ +"============================================================================ +"File: rubocop.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Recai Oktaş +"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. +" +"============================================================================ +" +" In order to use rubocop with the default ruby checker (mri): +" let g:syntastic_ruby_checkers = ['mri', 'rubocop'] + +if exists("g:loaded_syntastic_ruby_rubocop_checker") + finish +endif +let g:loaded_syntastic_ruby_rubocop_checker = 1 + +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]) +endfunction + +function! SyntaxCheckers_ruby_rubocop_GetLocList() dict + let makeprg = self.makeprgBuild({ 'args_after': '--format emacs --silent' }) + + let errorformat = '%f:%l:%c: %t: %m' + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'subtype': 'Style'}) + + " convert rubocop severities to error types recognized by syntastic + for e in loclist + if e['type'] ==# 'F' + let e['type'] = 'E' + elseif e['type'] !=# 'W' && e['type'] !=# 'E' + let e['type'] = 'W' + endif + endfor + + return loclist +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'ruby', + \ 'name': 'rubocop'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/ruby/rubylint.vim b/sources_non_forked/syntastic/syntax_checkers/ruby/rubylint.vim new file mode 100644 index 00000000..07f0d4f0 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/ruby/rubylint.vim @@ -0,0 +1,44 @@ +"============================================================================ +"File: rubylint.vim +"Description: Checks Ruby source code using ruby-lint +"Maintainer: Yorick Peterse +"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_ruby_rubylint_checker") + finish +endif + +let g:loaded_syntastic_ruby_rubylint_checker = 1 + +let s:save_cpo = &cpo +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]) + endif + let makeprg = self.makeprgBuild({ 'args': (s:rubylint_new ? '' : 'analyze ') . '--presenter=syntastic' }) + + let errorformat = '%f:%t:%l:%c: %m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'ruby', + \ 'name': 'rubylint', + \ 'exec': 'ruby-lint'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/sass/sass.vim b/sources_non_forked/syntastic/syntax_checkers/sass/sass.vim new file mode 100644 index 00000000..a515fe5f --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/sass/sass.vim @@ -0,0 +1,80 @@ +"============================================================================ +"File: sass.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Martin Grenfell +"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_sass_sass_checker") + finish +endif +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() +lockvar s:sass_cache_location + +"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 +endif + +"use compass imports if available +let s:imports = "" +if executable("compass") + let s:imports = "--compass" +endif + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_sass_sass_GetLocList() dict + if !g:syntastic_sass_check_partials && expand('%:t')[0] == '_' + return [] + endif + + let makeprg = self.makeprgBuild({ + \ 'args_before': '--cache-location ' . s:sass_cache_location . ' ' . s:imports . ' --check' }) + + let errorformat = + \ '%ESyntax %trror: %m,' . + \ '%+C %.%#,' . + \ '%C on line %l of %f\, %.%#,' . + \ '%C on line %l of %f,' . + \ '%-G %\+from line %.%#,' . + \ '%-G %\+Use --trace for backtrace.,' . + \ '%W%>DEPRECATION WARNING on line %l of %f:,' . + \ '%+C%> %.%#,' . + \ '%W%>WARNING: on line %l of %f:,' . + \ '%+C%> %.%#,' . + \ '%W%>WARNING on line %l of %f: %m,' . + \ '%+C%> %.%#,' . + \ '%W%>WARNING on line %l of %f:,' . + \ '%Z%m,' . + \ '%W%>WARNING: %m,' . + \ '%C on line %l of %f\, %.%#,' . + \ '%C on line %l of %f,' . + \ '%-G %\+from line %.%#,' . + \ 'Syntax %trror on line %l: %m,' . + \ '%-G%.%#' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'postprocess': ['compressWhitespace'] }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'sass', + \ 'name': 'sass'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/sass/sassc.vim b/sources_non_forked/syntastic/syntax_checkers/sass/sassc.vim new file mode 100644 index 00000000..731d1789 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/sass/sassc.vim @@ -0,0 +1,38 @@ +"============================================================================ +"File: sassc.vim +"Description: Syntax checking plugin for syntastic +"Maintainer: LCD 47 +"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_sass_sassc_checker") + finish +endif +let g:loaded_syntastic_sass_sassc_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_sass_sassc_GetLocList() dict + let makeprg = self.makeprgBuild({ 'fname_after': syntastic#util#DevNull() }) + + let errorformat = '%f:%l: %trror: %m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'sass', + \ 'name': 'sassc'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/scala/fsc.vim b/sources_non_forked/syntastic/syntax_checkers/scala/fsc.vim new file mode 100644 index 00000000..6f1fcf6d --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/scala/fsc.vim @@ -0,0 +1,48 @@ +"============================================================================ +"File: fsc.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Gregor Uhlenheuer +"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_scala_fsc_checker') + finish +endif +let g:loaded_syntastic_scala_fsc_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_scala_fsc_GetLocList() dict + call syntastic#log#deprecationWarn('scala_options', 'scala_fsc_args') + + " fsc has some serious problems with the + " working directory changing after being started + " that's why we better pass an absolute path + let makeprg = self.makeprgBuild({ + \ 'args_after': '-Ystop-after:parser', + \ 'fname': syntastic#util#shexpand('%:p') }) + + let errorformat = + \ '%E%f:%l: %trror: %m,' . + \ '%Z%p^,' . + \ '%-G%.%#' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'scala', + \ 'name': 'fsc'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/scala/scalac.vim b/sources_non_forked/syntastic/syntax_checkers/scala/scalac.vim new file mode 100644 index 00000000..0d0c15aa --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/scala/scalac.vim @@ -0,0 +1,43 @@ +"============================================================================ +"File: scala.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Rickey Visinski +"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_scala_scalac_checker") + finish +endif +let g:loaded_syntastic_scala_scalac_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_scala_scalac_GetLocList() dict + call syntastic#log#deprecationWarn('scala_options', 'scala_scalac_args') + + let makeprg = self.makeprgBuild({ 'args_after': '-Ystop-after:parser' }) + + let errorformat = + \ '%E%f:%l: %trror: %m,' . + \ '%Z%p^,' . + \ '%-G%.%#' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'scala', + \ 'name': 'scalac'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/scss/sass.vim b/sources_non_forked/syntastic/syntax_checkers/scss/sass.vim new file mode 100644 index 00000000..0f837ca5 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/scss/sass.vim @@ -0,0 +1,25 @@ +"============================================================================ +"File: scss.vim +"Description: scss syntax checking plugin for syntastic +"Maintainer: Martin Grenfell +"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_scss_sass_checker") + finish +endif +let g:loaded_syntastic_scss_sass_checker = 1 + +runtime! syntax_checkers/sass/*.vim + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'scss', + \ 'name': 'sass', + \ 'redirect': 'sass/sass'}) + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/scss/sassc.vim b/sources_non_forked/syntastic/syntax_checkers/scss/sassc.vim new file mode 100644 index 00000000..75fdc2aa --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/scss/sassc.vim @@ -0,0 +1,25 @@ +"============================================================================ +"File: sassc.vim +"Description: Syntax checking plugin for syntastic +"Maintainer: LCD 47 +"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_scss_sassc_checker") + finish +endif +let g:loaded_syntastic_scss_sassc_checker = 1 + +runtime! syntax_checkers/sass/*.vim + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'scss', + \ 'name': 'sassc', + \ 'redirect': 'sass/sassc'}) + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/scss/scss_lint.vim b/sources_non_forked/syntastic/syntax_checkers/scss/scss_lint.vim new file mode 100644 index 00000000..2f971dce --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/scss/scss_lint.vim @@ -0,0 +1,45 @@ +"============================================================================ +"File: scss_lint.vim +"Description: SCSS style and syntax checker plugin for Syntastic +"Maintainer: Shane da Silva +"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_scss_scss_lint_checker") + finish +endif +let g:loaded_syntastic_scss_scss_lint_checker = 1 + +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]) +endfunction + +function! SyntaxCheckers_scss_scss_lint_GetLocList() dict + let makeprg = self.makeprgBuild({}) + let errorformat = '%f:%l [%t] %m' + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'subtype': 'Style', + \ 'returns': [0, 1, 65] }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'scss', + \ 'name': 'scss_lint', + \ 'exec': 'scss-lint' }) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/sh/checkbashisms.vim b/sources_non_forked/syntastic/syntax_checkers/sh/checkbashisms.vim new file mode 100644 index 00000000..42751cf9 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/sh/checkbashisms.vim @@ -0,0 +1,42 @@ +"============================================================================ +"File: checkbashisms.vim +"Description: Shell script syntax/style checking plugin for syntastic.vim +"Notes: checkbashisms.pl can be downloaded from +" http://debian.inode.at/debian/pool/main/d/devscripts/ +" as part of the devscripts package. +"============================================================================ + +if exists("g:loaded_syntastic_sh_checkbashisms_checker") + finish +endif +let g:loaded_syntastic_sh_checkbashisms_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_sh_checkbashisms_GetLocList() dict + let makeprg = self.makeprgBuild({ 'args': '-fx' }) + + let errorformat = + \ '%-Gscript %f is already a bash script; skipping,' . + \ '%Eerror: %f: %m\, opened in line %l,' . + \ '%Eerror: %f: %m,' . + \ '%Ecannot open script %f for reading: %m,' . + \ '%Wscript %f %m,%C%.# lines,' . + \ '%Wpossible bashism in %f line %l (%m):,%C%.%#,%Z.%#,' . + \ '%-G%.%#' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'subtype': 'Style' }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'sh', + \ 'name': 'checkbashisms' }) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/sh/sh.vim b/sources_non_forked/syntastic/syntax_checkers/sh/sh.vim new file mode 100644 index 00000000..d736f296 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/sh/sh.vim @@ -0,0 +1,88 @@ +"============================================================================ +"File: sh.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Gregor Uhlenheuer +"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_sh_sh_checker") + finish +endif +let g:loaded_syntastic_sh_sh_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_sh_sh_IsAvailable() dict + return s:IsShellValid() +endfunction + +function! SyntaxCheckers_sh_sh_GetLocList() dict + if s:GetShell() ==# 'zsh' + return s:ForwardToZshChecker() + endif + + if !s:IsShellValid() + return [] + endif + + let makeprg = self.makeprgBuild({ + \ 'exe': s:GetShell(), + \ 'args_after': '-n' }) + + let errorformat = '%f: line %l: %m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +function! s:GetShell() + if !exists('b:shell') || b:shell == '' + let b:shell = '' + let shebang = syntastic#util#parseShebang()['exe'] + if shebang != '' + if shebang[-strlen('bash'):-1] ==# 'bash' + let b:shell = 'bash' + elseif shebang[-strlen('zsh'):-1] ==# 'zsh' + let b:shell = 'zsh' + elseif shebang[-strlen('sh'):-1] ==# 'sh' + let b:shell = 'sh' + endif + endif + " try to use env variable in case no shebang could be found + if b:shell == '' + let b:shell = fnamemodify(expand('$SHELL'), ':t') + endif + endif + return b:shell +endfunction + +function! s:IsShellValid() + let shell = s:GetShell() + return shell != '' && executable(shell) +endfunction + +function! s:ForwardToZshChecker() + let registry = g:SyntasticRegistry.Instance() + let zsh_checkers = registry.getCheckersAvailable('zsh', ['zsh']) + if !empty(zsh_checkers) + return zsh_checkers[0].getLocListRaw() + else + return [] + endif +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'sh', + \ 'name': 'sh' }) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/sh/shellcheck.vim b/sources_non_forked/syntastic/syntax_checkers/sh/shellcheck.vim new file mode 100644 index 00000000..de69683c --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/sh/shellcheck.vim @@ -0,0 +1,44 @@ +"============================================================================ +"File: shellcheck.vim +"Description: Shell script syntax/style checking plugin for syntastic.vim +"============================================================================ + +if exists("g:loaded_syntastic_sh_shellcheck_checker") + finish +endif +let g:loaded_syntastic_sh_shellcheck_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_sh_shellcheck_GetLocList() dict + let makeprg = self.makeprgBuild({ 'args_after': '-f gcc' }) + + let errorformat = + \ '%f:%l:%c: %trror: %m,' . + \ '%f:%l:%c: %tarning: %m,' . + \ '%f:%l:%c: %tote: %m' + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'returns': [0, 1] }) + + for e in loclist + if e['type'] ==? 'n' + let e['type'] = 'w' + let e['subtype'] = 'Style' + endif + endfor + + return loclist +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'sh', + \ 'name': 'shellcheck' }) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/slim/slimrb.vim b/sources_non_forked/syntastic/syntax_checkers/slim/slimrb.vim new file mode 100644 index 00000000..8cc2bfc0 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/slim/slimrb.vim @@ -0,0 +1,55 @@ +"============================================================================ +"File: slim.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Martin Grenfell +"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_slim_slimrb_checker") + finish +endif +let g:loaded_syntastic_slim_slimrb_checker = 1 + +let s:save_cpo = &cpo +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]) + endif + + let makeprg = self.makeprgBuild({ 'args_after': '-c' }) + + if s:slimrb_new + let errorformat = + \ '%C\ %#%f\, Line %l\, Column %c,'. + \ '%-G\ %.%#,'. + \ '%ESlim::Parser::SyntaxError: %m,'. + \ '%+C%.%#' + else + let errorformat = + \ '%C\ %#%f\, Line %l,'. + \ '%-G\ %.%#,'. + \ '%ESlim::Parser::SyntaxError: %m,'. + \ '%+C%.%#' + endif + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'slim', + \ 'name': 'slimrb'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/tcl/nagelfar.vim b/sources_non_forked/syntastic/syntax_checkers/tcl/nagelfar.vim new file mode 100644 index 00000000..0797690e --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/tcl/nagelfar.vim @@ -0,0 +1,43 @@ +"============================================================================ +"File: nagelfar.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: James Pickard +"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. +"Notes: Requires nagelfar v1.1.12 or later with support for -H option. +" See nagelfar homepage http://nagelfar.berlios.de/. +" +"============================================================================ + +if exists("g:loaded_syntastic_tcl_nagelfar_checker") + finish +endif +let g:loaded_syntastic_tcl_nagelfar_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_tcl_nagelfar_GetLocList() dict + let makeprg = self.makeprgBuild({ 'args_after': '-H' }) + + let errorformat = + \ '%I%f: %l: N %m,'. + \ '%f: %l: %t %m,'. + \ '%-GChecking file %f' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'tcl', + \ 'name': 'nagelfar'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/tex/chktex.vim b/sources_non_forked/syntastic/syntax_checkers/tex/chktex.vim new file mode 100644 index 00000000..23392360 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/tex/chktex.vim @@ -0,0 +1,65 @@ +"============================================================================ +"File: chktex.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: LCD 47 +"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. +" +"============================================================================ +" +" 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 +endif +let g:loaded_syntastic_tex_chktex_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +if !exists('g:syntastic_tex_chktex_showmsgs') + let g:syntastic_tex_chktex_showmsgs = 1 +endif + +function! SyntaxCheckers_tex_chktex_GetLocList() dict + let makeprg = self.makeprgBuild({ 'args_after': '-q -v1' }) + + let errorformat = + \ '%EError %n in %f line %l: %m,' . + \ '%WWarning %n in %f line %l: %m,' . + \ (g:syntastic_tex_chktex_showmsgs ? '%WMessage %n in %f line %l: %m,' : '') . + \ '%Z%p^,' . + \ '%-G%.%#' + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'subtype': 'Style' }) + + call self.setWantSort(1) + + return loclist +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'tex', + \ 'name': 'chktex'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/tex/lacheck.vim b/sources_non_forked/syntastic/syntax_checkers/tex/lacheck.vim new file mode 100644 index 00000000..0896919c --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/tex/lacheck.vim @@ -0,0 +1,40 @@ +"============================================================================ +"File: tex.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Martin Grenfell +"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_tex_lacheck_checker') + finish +endif +let g:loaded_syntastic_tex_lacheck_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_tex_lacheck_GetLocList() dict + let makeprg = self.makeprgBuild({}) + + let errorformat = + \ '%-G** %f:,' . + \ '%E"%f"\, line %l: %m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'tex', + \ 'name': 'lacheck'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/texinfo/makeinfo.vim b/sources_non_forked/syntastic/syntax_checkers/texinfo/makeinfo.vim new file mode 100644 index 00000000..63cae936 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/texinfo/makeinfo.vim @@ -0,0 +1,47 @@ +"============================================================================ +"File: makeinfo.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: LCD 47 +"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_texinfo_makeinfo_checker") + finish +endif +let g:loaded_syntastic_texinfo_makeinfo_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_texinfo_makeinfo_GetHighlightRegex(item) + let term = matchstr(a:item['text'], "\\m`\\zs[^']\\+\\ze'") + return term != '' ? '\V' . escape(term, '\') : '' +endfunction + +function! SyntaxCheckers_texinfo_makeinfo_GetLocList() dict + let makeprg = self.makeprgBuild({ 'args_after': syntastic#c#NullOutput() }) + + let errorformat = + \ '%f:%l: %tarning: %m,' . + \ '%f:%l: %m,' . + \ '%-G%.%#' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'type': 'e' }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'texinfo', + \ 'name': 'makeinfo'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/text/atdtool.vim b/sources_non_forked/syntastic/syntax_checkers/text/atdtool.vim new file mode 100644 index 00000000..b0f32c11 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/text/atdtool.vim @@ -0,0 +1,57 @@ +"============================================================================ +"File: atdtool.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: LCD 47 +"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_atdtool_checker") + finish +endif +let g:loaded_syntastic_text_atdtool_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_text_atdtool_GetHighlightRegex(item) + let term = matchstr(a:item['text'], '\m "\zs[^"]\+\ze"\($\| | suggestions:\)') + if term != '' + let col = get(a:item, 'col', 0) + let term = (col != 0 ? '\%' . col . 'c' : '') . '\V' . escape(term, '\') + endif + return term +endfunction + +function! SyntaxCheckers_text_atdtool_GetLocList() dict + let makeprg = self.makeprgBuild({ 'tail': '2> ' . syntastic#util#DevNull() }) + + let errorformat = + \ '%W%f:%l:%c: %m,'. + \ '%+C suggestions:%.%#' + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'returns': [0], + \ 'subtype': 'Style' }) + + for e in loclist + let e['text'] = substitute(e['text'], '\m\n\s\+', ' | ', 'g') + endfor + + return loclist +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'text', + \ 'name': 'atdtool'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/text/language_check.vim b/sources_non_forked/syntastic/syntax_checkers/text/language_check.vim new file mode 100644 index 00000000..20111468 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/text/language_check.vim @@ -0,0 +1,37 @@ +"============================================================================ +"File: language_check.vim +"Description: Grammar checker (https://github.com/myint/language-check) +"Authors: Steven Myint +" +"============================================================================ + +if exists("g:loaded_syntastic_text_language_check_checker") + finish +endif +let g:loaded_syntastic_text_language_check_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_text_language_check_GetLocList() dict + let makeprg = self.makeprgBuild({}) + + let errorformat = + \ '%f:%l:%c: %m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'subtype': 'Style', + \ 'returns': [0, 2] }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'text', + \ 'name': 'language_check', + \ 'exec': 'language-check'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/twig/twiglint.vim b/sources_non_forked/syntastic/syntax_checkers/twig/twiglint.vim new file mode 100644 index 00000000..36e264bf --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/twig/twiglint.vim @@ -0,0 +1,41 @@ +"============================================================================ +"File: twig.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Alexander +"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_twig_twiglint_checker") + finish +endif +let g:loaded_syntastic_twig_twiglint_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_twig_twiglint_GetLocList() dict + let makeprg = self.makeprgBuild({ + \ 'args_before': 'lint', + \ 'args_after': '--format=csv' }) + + let errorformat = '"%f"\,%l\,%m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat}) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'twig', + \ 'name': 'twiglint', + \ 'exec': 'twig-lint'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/typescript/tsc.vim b/sources_non_forked/syntastic/syntax_checkers/typescript/tsc.vim new file mode 100644 index 00000000..d2e7349d --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/typescript/tsc.vim @@ -0,0 +1,43 @@ +"============================================================================ +"File: typescript.vim +"Description: TypeScript syntax checker +"Maintainer: Bill Casarin +"============================================================================ + +if exists("g:loaded_syntastic_typescript_tsc_checker") + finish +endif +let g:loaded_syntastic_typescript_tsc_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_typescript_tsc_GetLocList() dict + let makeprg = self.makeprgBuild({ + \ 'args': '--module commonjs', + \ 'args_after': '--out ' . syntastic#util#DevNull() }) + + let errorformat = + \ '%E%f %#(%l\,%c): error %m,' . + \ '%E%f %#(%l\,%c): %m,' . + \ '%Eerror %m,' . + \ '%C%\s%\+%m' + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'defaults': {'bufnr': bufnr("")} }) + + call self.setWantSort(1) + + return loclist +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'typescript', + \ 'name': 'tsc'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/typescript/tslint.vim b/sources_non_forked/syntastic/syntax_checkers/typescript/tslint.vim new file mode 100644 index 00000000..80ca8817 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/typescript/tslint.vim @@ -0,0 +1,46 @@ +"============================================================================ +"File: typescript/tslint.vim +"Description: TypeScript linter +"Maintainer: Seon-Wook Park +"============================================================================ + +if exists("g:loaded_syntastic_typescript_tslint_checker") + finish +endif +let g:loaded_syntastic_typescript_tslint_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_typescript_tslint_GetHighlightRegex(item) + let term = matchstr(a:item['text'], "\\m\\s'\\zs.\\{-}\\ze'\\s") + return term != '' ? '\V' . escape(term, '\') : '' +endfunction + +function! SyntaxCheckers_typescript_tslint_GetLocList() dict + let makeprg = self.makeprgBuild({ + \ 'args_after': '--format verbose', + \ 'fname_before': '-f' }) + + " (comment-format) ts/app.ts[12, 36]: comment must start with lowercase letter + let errorformat = '%f[%l\, %c]: %m' + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'preprocess': 'tslint', + \ 'returns': [0, 2] }) + + call self.setWantSort(1) + + return loclist +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'typescript', + \ 'name': 'tslint'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/vala/valac.vim b/sources_non_forked/syntastic/syntax_checkers/vala/valac.vim new file mode 100644 index 00000000..912e298d --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/vala/valac.vim @@ -0,0 +1,97 @@ +"============================================================================ +"File: vala.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Konstantin Stepanov (me@kstep.me) +"Notes: Add special comment line into your vala file starting with +" "// modules: " and containing space delimited list of vala +" modules, used by the file, so this script can build correct +" --pkg arguments. +" Add another special comment line into your vala file starting +" with "// vapidirs: " followed by a space delimited list of +" the vapi directories so this script can build with the correct +" --vapidir arguments +" Alternatively you can set the g:syntastic_vala_modules array +" and/or the g:syntastic_vala_vapidirs array +" in your .vimrc or .lvimrc with localvimrc plugin +" (http://www.vim.org/scripts/script.php?script_id=441). +" Valac compiler is not the fastest thing in the world, so you +" may want to disable this plugin with +" let g:syntastic_vala_check_disabled = 1 command in your .vimrc or +" command line. Unlet this variable to set it to 0 to reenable +" this checker. +"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_vala_valac_checker") + finish +endif +let g:loaded_syntastic_vala_valac_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_vala_valac_GetHighlightRegex(pos) + let length = strlen(matchstr(a:pos['text'], '\m\^\+$')) + return '\%>' . (a:pos['col'] - 1) . 'c\%<' . (a:pos['col'] + length) . 'c' +endfunction + +function! s:GetValaModules() + if exists('g:syntastic_vala_modules') + if type(g:syntastic_vala_modules) == type('') + return split(g:syntastic_vala_modules, '\s\+') + elseif type(g:syntastic_vala_modules) == type([]) + return copy(g:syntastic_vala_modules) + else + echoerr 'g:syntastic_vala_modules must be either list or string: fallback to in file modules string' + endif + endif + + let modules_line = search('^// modules: ', 'n') + let modules_str = getline(modules_line) + return split(strpart(modules_str, 12), '\s\+') +endfunction + +function! s:GetValaVapiDirs() + if exists('g:syntastic_vala_vapi_dirs') + if type(g:syntastic_vala_vapi_dirs) == type('') + return split(g:syntastic_vala_vapi_dirs, '\s\+') + 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' + endif + endif + + let vapi_line = search('^//\s*vapidirs:\s*','n') + let vapi_str = getline(vapi_line) + return split( substitute( vapi_str, '^//\s*vapidirs:\s*', '', 'g' ), '\s\+' ) +endfunction + +function! SyntaxCheckers_vala_valac_GetLocList() dict + let vala_pkg_args = join(map(s:GetValaModules(), '"--pkg ".v:val'), ' ') + let vala_vapi_args = join(map(s:GetValaVapiDirs(), '"--vapidir ".v:val'), ' ') + let makeprg = self.makeprgBuild({ 'args': '-C ' . vala_pkg_args . " " . vala_vapi_args }) + + let errorformat = + \ '%A%f:%l.%c-%\d%\+.%\d%\+: %t%[a-z]%\+: %m,'. + \ '%C%m,'. + \ '%Z%m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'vala', + \ 'name': 'valac'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/verilog/verilator.vim b/sources_non_forked/syntastic/syntax_checkers/verilog/verilator.vim new file mode 100644 index 00000000..396d72e5 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/verilog/verilator.vim @@ -0,0 +1,41 @@ +"============================================================================ +"File: verilator.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Kocha +"============================================================================ + +if exists("g:loaded_syntastic_verilog_verilator_checker") + finish +endif +let g:loaded_syntastic_verilog_verilator_checker = 1 + +if !exists('g:syntastic_verilog_compiler_options') + let g:syntastic_verilog_compiler_options = '-Wall' +endif + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_verilog_verilator_IsAvailable() dict + if !exists('g:syntastic_verilog_compiler') + let g:syntastic_verilog_compiler = self.getExec() + endif + return executable(expand(g:syntastic_verilog_compiler)) +endfunction + +function! SyntaxCheckers_verilog_verilator_GetLocList() dict + return syntastic#c#GetLocList('verilog', 'verilator', { + \ 'errorformat': + \ '%%%trror-%\=%\w%#: %f:%l: %m,' . + \ '%%%tarning-%\=%\w%#: %f:%l: %m', + \ 'main_flags': '--lint-only' }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'verilog', + \ 'name': 'verilator' }) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/vhdl/ghdl.vim b/sources_non_forked/syntastic/syntax_checkers/vhdl/ghdl.vim new file mode 100644 index 00000000..ff02224a --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/vhdl/ghdl.vim @@ -0,0 +1,38 @@ +"============================================================================ +"File: ghdl.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Jan Wagner +"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_vhdl_ghdl_checker") + finish +endif +let g:loaded_syntastic_vhdl_ghdl_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_vhdl_ghdl_GetLocList() dict + let makeprg = self.makeprgBuild({ 'args_before': '-s' }) + + let errorformat = '%f:%l:%c: %m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'vhdl', + \ 'name': 'ghdl'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/vim/vimlint.vim b/sources_non_forked/syntastic/syntax_checkers/vim/vimlint.vim new file mode 100644 index 00000000..7122de1f --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/vim/vimlint.vim @@ -0,0 +1,99 @@ +"============================================================================ +"File: vimlint.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: LCD 47 +"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_vim_vimlint_checker") + finish +endif +let g:loaded_syntastic_vim_vimlint_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_vim_vimlint_GetHighlightRegex(item) + let term = matchstr(a:item['text'], '\m `\zs[^`]\+\ze`') + if term != '' + let col = get(a:item, 'col', 0) + + if col && term[0:1] ==# 'l:' + if getline(a:item.lnum)[col-1:col] !=# 'l:' + let term = term[2:] + endif + endif + + return col ? '\%>' . (col - 1) . 'c\%<' . (col + strlen(term)) . 'c' : '\V' . escape(term, '\') + endif + + return '' +endfunction + +function! SyntaxCheckers_vim_vimlint_IsAvailable() dict + return + \ globpath(&runtimepath, 'autoload/vimlparser.vim') != '' && + \ globpath(&runtimepath, 'autoload/vimlint.vim') != '' +endfunction + +function! SyntaxCheckers_vim_vimlint_GetLocList() dict + " EVL102: unused variable v + " EVL103: unused argument v + " EVL104: variable may not be initialized on some execution path: v + " EVL105: global variable v is defined without g: + " EVL106: local variable v is used without l: + " EVL201: unreachable code + " EVL204: constant in conditional context + " EVL205: missing scriptencoding + " value 3: the message is a warning + " + " References: :help vimlint-errorcode and :help vimlint-variables + let param = { + \ 'output': function('s:vimlintOutput'), + \ 'quiet': 1, + \ 'EVL102': 3, + \ 'EVL103': 3, + \ 'EVL104': 3, + \ 'EVL105': 3, + \ 'EVL106': 3, + \ 'EVL201': 3, + \ 'EVL204': 3, + \ 'EVL205': 3 } + + if exists('g:syntastic_vimlint_options') + if type(g:syntastic_vimlint_options) == type({}) + let options = filter(copy(g:syntastic_vimlint_options), 'v:key =~# "\\m^EVL"') + call extend(param, options, 'force') + endif + endif + + return vimlint#vimlint(expand('%'), param) +endfunction + +" @vimlint(EVL103, 1, a:filename) +function! s:vimlintOutput(filename, pos, ev, eid, mes, obj) + call add(a:obj.error, { + \ 'bufnr': bufnr(''), + \ 'lnum': a:pos.lnum, + \ 'col': a:pos.col, + \ 'vcol': 0, + \ 'type': a:ev[0], + \ 'text': '[' . a:eid . '] ' . a:mes, + \ 'valid': a:pos.lnum > 0 }) +endfunction +" @vimlint(EVL103, 0, a:filename) + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'vim', + \ 'name': 'vimlint', + \ 'exec': 'vim' }) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/xhtml/jshint.vim b/sources_non_forked/syntastic/syntax_checkers/xhtml/jshint.vim new file mode 100644 index 00000000..3312ccef --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/xhtml/jshint.vim @@ -0,0 +1,25 @@ +"============================================================================ +"File: jshint.vim +"Description: Javascript syntax checker for xHTML - using jshint +"Maintainer: LCD 47 +"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_xhtml_jshint_checker") + finish +endif +let g:loaded_syntastic_xhtml_jshint_checker = 1 + +runtime! syntax_checkers/html/*.vim + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'xhtml', + \ 'name': 'jshint', + \ 'redirect': 'html/jshint'}) + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/xhtml/tidy.vim b/sources_non_forked/syntastic/syntax_checkers/xhtml/tidy.vim new file mode 100644 index 00000000..a3e2d47a --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/xhtml/tidy.vim @@ -0,0 +1,89 @@ +"============================================================================ +"File: xhtml.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Martin Grenfell +"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. +" +"============================================================================ +" +" Checker option: +" +" - g:syntastic_xhtml_tidy_ignore_errors (list; default: []) +" list of errors to ignore + +if exists("g:loaded_syntastic_xhtml_tidy_checker") + finish +endif +let g:loaded_syntastic_xhtml_tidy_checker = 1 + +if !exists('g:syntastic_xhtml_tidy_ignore_errors') + let g:syntastic_xhtml_tidy_ignore_errors = [] +endif + +let s:save_cpo = &cpo +set cpo&vim + +" TODO: join this with html.vim 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', + \ 'cp932': '-shiftjis', + \ 'sjis': '-shiftjis', + \ 'cp850': '-ibm858', + \ } + return get(tidy_opts, &fileencoding, '-utf8') +endfunction + +function! s:IgnoreError(text) + for i in g:syntastic_xhtml_tidy_ignore_errors + if stridx(a:text, i) != -1 + return 1 + endif + endfor + return 0 +endfunction + +function! SyntaxCheckers_xhtml_tidy_GetLocList() dict + let encopt = s:TidyEncOptByFenc() + let makeprg = self.makeprgBuild({ 'args_after': encopt . ' -xml -e' }) + + let errorformat= + \ '%Wline %l column %v - Warning: %m,' . + \ '%Eline %l column %v - Error: %m,' . + \ '%-G%.%#' + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'defaults': {'bufnr': bufnr("")}, + \ 'returns': [0, 1, 2] }) + + for e in loclist + if e['valid'] && s:IgnoreError(e['text']) == 1 + let e['valid'] = 0 + endif + endfor + + return loclist +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'xhtml', + \ 'name': 'tidy'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/xml/plutil.vim b/sources_non_forked/syntastic/syntax_checkers/xml/plutil.vim new file mode 100644 index 00000000..a9ad1451 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/xml/plutil.vim @@ -0,0 +1,42 @@ +"============================================================================ +"File: plutil.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: LCD 47 +"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_xml_plutil_checker") + finish +endif +let g:loaded_syntastic_xml_plutil_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_xml_plutil_GetLocList() dict + let makeprg = self.makeprgBuild({ + \ 'args_before': '-lint -s', + \ 'fname_before': '--' }) + + let errorformat = + \ '%E%f: %m at line %l' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'returns': [0, 1] }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'xml', + \ 'name': 'plutil'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/xml/xmllint.vim b/sources_non_forked/syntastic/syntax_checkers/xml/xmllint.vim new file mode 100644 index 00000000..3076cabb --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/xml/xmllint.vim @@ -0,0 +1,52 @@ +"============================================================================ +"File: xml.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Sebastian Kusnier +"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_xml_xmllint_checker") + finish +endif +let g:loaded_syntastic_xml_xmllint_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +" You can use a local installation of DTDs to significantly speed up validation +" and allow you to validate XML data without network access, see xmlcatalog(1) +" and http://www.xmlsoft.org/catalog.html for more information. + +function! SyntaxCheckers_xml_xmllint_GetLocList() dict + let makeprg = self.makeprgBuild({ 'args_after': '--xinclude --noout --postvalid' }) + + let errorformat= + \ '%E%f:%l: error : %m,' . + \ '%-G%f:%l: validity error : Validation failed: no DTD found %m,' . + \ '%W%f:%l: warning : %m,' . + \ '%W%f:%l: validity warning : %m,' . + \ '%E%f:%l: validity error : %m,' . + \ '%E%f:%l: parser error : %m,' . + \ '%E%f:%l: %m,' . + \ '%-Z%p^,' . + \ '%-G%.%#' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'returns': [0, 1, 2, 3, 4, 5] }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'xml', + \ 'name': 'xmllint'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/xslt/xmllint.vim b/sources_non_forked/syntastic/syntax_checkers/xslt/xmllint.vim new file mode 100644 index 00000000..e224c256 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/xslt/xmllint.vim @@ -0,0 +1,25 @@ +"============================================================================ +"File: xslt.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Sebastian Kusnier +"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_xslt_xmllint_checker") + finish +endif +let g:loaded_syntastic_xslt_xmllint_checker = 1 + +runtime! syntax_checkers/xml/*.vim + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'xslt', + \ 'name': 'xmllint', + \ 'redirect': 'xml/xmllint'}) + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/yacc/bison.vim b/sources_non_forked/syntastic/syntax_checkers/yacc/bison.vim new file mode 100644 index 00000000..8444879e --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/yacc/bison.vim @@ -0,0 +1,55 @@ +"============================================================================ +"File: yacc.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: LCD 47 +"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_yacc_bison_checker") + finish +endif +let g:loaded_syntastic_yacc_bison_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_yacc_bison_GetLocList() dict + let makeprg = self.makeprgBuild({ + \ 'args_after': syntastic#c#NullOutput() }) + + let errorformat = + \ '%E%f:%l%.%v-%.%\{-}: %trror: %m,' . + \ '%E%f:%l%.%v: %trror: %m,' . + \ '%W%f:%l%.%v-%.%\{-}: %tarning: %m,' . + \ '%W%f:%l%.%v: %tarning: %m,' . + \ '%I%f:%l%.%v-%.%\{-}: %\s%\+%m,' . + \ '%I%f:%l%.%v: %\s%\+%m' + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) + + let last_type = 'E' + for e in loclist + if e['type'] ==? 'I' + let e['type'] = last_type + endif + let last_type = e['type'] + endfor + + return loclist +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'yacc', + \ 'name': 'bison'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/yaml/jsyaml.vim b/sources_non_forked/syntastic/syntax_checkers/yaml/jsyaml.vim new file mode 100644 index 00000000..a0c6dba0 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/yaml/jsyaml.vim @@ -0,0 +1,51 @@ +"============================================================================ +"File: yaml.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Martin Grenfell +"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. +" +" +"Installation: $ npm install -g js-yaml +" +"============================================================================ + +if exists("g:loaded_syntastic_yaml_jsyaml_checker") + finish +endif +let g:loaded_syntastic_yaml_jsyaml_checker = 1 + +let s:save_cpo = &cpo +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]) + endif + + let makeprg = self.makeprgBuild({ 'args_after': (s:js_yaml_new ? '' : '--compact') }) + + let errorformat = + \ 'Error on line %l\, col %c:%m,' . + \ 'JS-YAML: %m at line %l\, column %c:,' . + \ '%-G%.%#' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'defaults': {'bufnr': bufnr("")} }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'yaml', + \ 'name': 'jsyaml', + \ 'exec': 'js-yaml'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/yaml/yamlxs.vim b/sources_non_forked/syntastic/syntax_checkers/yaml/yamlxs.vim new file mode 100644 index 00000000..6c12a627 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/yaml/yamlxs.vim @@ -0,0 +1,73 @@ +"============================================================================ +"File: yamlxs.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: LCD 47 +"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. +"Installation: cpanm YAML::XS +" +"============================================================================ + +if exists("g:loaded_syntastic_yaml_yamlxs_checker") + finish +endif +let g:loaded_syntastic_yaml_yamlxs_checker = 1 + +if !exists('g:syntastic_perl_lib_path') + let g:syntastic_perl_lib_path = [] +endif + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_yaml_yamlxs_IsAvailable() dict + if !exists('g:syntastic_yaml_yamlxs_exec') && exists('g:syntastic_perl_interpreter') + let g:syntastic_yaml_yamlxs_exec = g:syntastic_perl_interpreter + endif + + " don't call executable() here, to allow things like + " let g:syntastic_perl_interpreter='/usr/bin/env perl' + silent! call system(self.getExecEscaped() . ' ' . s:Modules() . ' -e ' . syntastic#util#shescape('exit(0)')) + return v:shell_error == 0 +endfunction + +function! SyntaxCheckers_yaml_yamlxs_GetLocList() dict + let makeprg = self.makeprgBuild({ + \ 'args_before': s:Modules() . ' -e ' . syntastic#util#shescape('YAML::XS::LoadFile($ARGV[0])') }) + + let errorformat = + \ '%EYAML::XS::Load Error: The problem:,' . + \ '%-C,' . + \ '%C %m,' . + \ '%Cwas found at document: %\d%\+\, line: %l\, column: %c,' . + \ '%-G%.%#' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'postprocess': ['compressWhitespace'], + \ 'defaults': {'bufnr': bufnr("")} }) +endfunction + +function s:Modules() + if type(g:syntastic_perl_lib_path) == type('') + call syntastic#log#oneTimeWarn('variable g:syntastic_perl_lib_path should be a list') + let includes = split(g:syntastic_perl_lib_path, ',') + else + let includes = copy(syntastic#util#var('perl_lib_path')) + endif + return join(map(includes, '"-I" . v:val') + ['-MYAML::XS']) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'yaml', + \ 'name': 'yamlxs', + \ 'exec': 'perl' }) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/z80/z80syntaxchecker.vim b/sources_non_forked/syntastic/syntax_checkers/z80/z80syntaxchecker.vim new file mode 100644 index 00000000..6a3998a3 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/z80/z80syntaxchecker.vim @@ -0,0 +1,45 @@ +"============================================================================ +"File: z80.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Romain Giot +"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. +" +"============================================================================ +" +" To obtain this application there are two solutions: +" - Install this python package: +" https://github.com/rgiot/pycpcdemotools +" - Copy/paste this script in your search path: +" https://raw.githubusercontent.com/rgiot/pycpcdemotools/master/cpcdemotools/source_checker/z80_syntax_checker.py + +if exists("g:loaded_syntastic_z80_z80syntaxchecker_checker") + finish +endif +let g:loaded_syntastic_z80_z80syntaxchecker_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_z80_z80syntaxchecker_GetLocList() dict + let makeprg = self.makeprgBuild({}) + + let errorformat = '%f:%l %m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'z80', + \ 'name': 'z80syntaxchecker', + \ 'exec': 'z80_syntax_checker.py'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/zpt/zptlint.vim b/sources_non_forked/syntastic/syntax_checkers/zpt/zptlint.vim new file mode 100644 index 00000000..6769b55b --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/zpt/zptlint.vim @@ -0,0 +1,51 @@ +"============================================================================ +"File: zpt.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: claytron +"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. +" +"============================================================================ +" +" In order for this plugin to be useful, you will need to set up the +" zpt filetype in your vimrc +" +" " set up zope page templates as the zpt filetype +" au BufNewFile,BufRead *.pt,*.cpt,*.zpt set filetype=zpt syntax=xml +" +" Then install the zptlint program, found on pypi: +" http://pypi.python.org/pypi/zptlint + +if exists("g:loaded_syntastic_zpt_zptlint_checker") + finish +endif +let g:loaded_syntastic_zpt_zptlint_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_zpt_zptlint_GetLocList() dict + let makeprg = self.makeprgBuild({}) + + let errorformat= + \ '%-P*** Error in: %f,'. + \ '%Z%*\s\, at line %l\, column %c,'. + \ '%E%*\s%m,'. + \ '%-Q' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'zpt', + \ 'name': 'zptlint'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/zsh/shellcheck.vim b/sources_non_forked/syntastic/syntax_checkers/zsh/shellcheck.vim new file mode 100644 index 00000000..42f6fcf1 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/zsh/shellcheck.vim @@ -0,0 +1,25 @@ +"============================================================================ +"File: shellcheck.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: LCD 47 +"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_zsh_shellcheck_checker") + finish +endif +let g:loaded_syntastic_zsh_shellcheck_checker = 1 + +runtime! syntax_checkers/sh/*.vim + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'zsh', + \ 'name': 'shellcheck', + \ 'redirect': 'sh/shellcheck'}) + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/zsh/zsh.vim b/sources_non_forked/syntastic/syntax_checkers/zsh/zsh.vim new file mode 100644 index 00000000..48057631 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/zsh/zsh.vim @@ -0,0 +1,38 @@ +"============================================================================ +"File: zsh.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Martin Grenfell +"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_zsh_zsh_checker") + finish +endif +let g:loaded_syntastic_zsh_zsh_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_zsh_zsh_GetLocList() dict + let makeprg = self.makeprgBuild({ 'args_after': '-n' }) + + let errorformat = '%f:%l: %m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat}) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'zsh', + \ 'name': 'zsh'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/vim-colors-solarized/doc/tags b/sources_non_forked/vim-colors-solarized/doc/tags deleted file mode 100644 index 3785a094..00000000 --- a/sources_non_forked/vim-colors-solarized/doc/tags +++ /dev/null @@ -1,27 +0,0 @@ -'solarized_bold' solarized.txt /*'solarized_bold'* -'solarized_contrast' solarized.txt /*'solarized_contrast'* -'solarized_degrade' solarized.txt /*'solarized_degrade'* -'solarized_hitrail' solarized.txt /*'solarized_hitrail'* -'solarized_italic' solarized.txt /*'solarized_italic'* -'solarized_menu' solarized.txt /*'solarized_menu'* -'solarized_termcolors' solarized.txt /*'solarized_termcolors'* -'solarized_termtrans' solarized.txt /*'solarized_termtrans'* -'solarized_underline' solarized.txt /*'solarized_underline'* -'solarized_visibility' solarized.txt /*'solarized_visibility'* -before solarized.txt /*before* -solarized solarized.txt /*solarized* -solarized-colors solarized.txt /*solarized-colors* -solarized-colorscheme solarized.txt /*solarized-colorscheme* -solarized-help solarized.txt /*solarized-help* -solarized-install solarized.txt /*solarized-install* -solarized-menu solarized.txt /*solarized-menu* -solarized-options solarized.txt /*solarized-options* -solarized-term solarized.txt /*solarized-term* -solarized-togglebg solarized.txt /*solarized-togglebg* -solarized.vim solarized.txt /*solarized.vim* -toggle-background solarized.txt /*toggle-background* -toggle-bg solarized.txt /*toggle-bg* -togglebg solarized.txt /*togglebg* -urxvt solarized.txt /*urxvt* -vim-colors-solarized solarized.txt /*vim-colors-solarized* -without solarized.txt /*without* diff --git a/sources_non_forked/vim-marked b/sources_non_forked/vim-marked deleted file mode 160000 index a7c1cba2..00000000 --- a/sources_non_forked/vim-marked +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a7c1cba232cabd96af800f82aad21cc180a09764 diff --git a/sources_non_forked/vim-marked/README.markdown b/sources_non_forked/vim-marked/README.markdown new file mode 100644 index 00000000..2ce98952 --- /dev/null +++ b/sources_non_forked/vim-marked/README.markdown @@ -0,0 +1,22 @@ +# marked.vim + +Open the current Markdown buffer in [Marked.app](http://markedapp.com/). + +## Usage + +This plugin adds the following commands to Markdown buffers: + + :MarkedOpen[!] Open the current Markdown buffer in Marked.app. + Call with a bang to prevent Marked.app from stealing + focus from Vim. + + :MarkedQuit Close the current Markdown buffer in Marked.app. + Quit Marked.app if no other documents are open. + +If you run `:MarkedOpen`, the document in Marked.app will be automatically +closed when Vim exists, and Marked.app will quit if no other documents are +open. + +## License + +Same as Vim itself, see `:help license`. diff --git a/sources_non_forked/vim-marked/plugin/marked.vim b/sources_non_forked/vim-marked/plugin/marked.vim new file mode 100644 index 00000000..1009d513 --- /dev/null +++ b/sources_non_forked/vim-marked/plugin/marked.vim @@ -0,0 +1,55 @@ +" marked.vim +" Author: Joshua Priddle +" URL: https://github.com/itspriddle/vim-marked +" Version: 0.4.0 +" License: Same as Vim itself (see :help license) + +if &cp || exists("g:marked_loaded") && g:marked_loaded + finish +endif +let g:marked_loaded = 1 +let s:save_cpo = &cpo +set cpo&vim + +function s:OpenMarked(background) + let l:filename = expand("%:p") + silent exe "!open -a Marked.app ".(a:background ? '-g' : '')." '".l:filename."'" + + silent exe "augroup marked_autoclose_".l:filename + autocmd! + silent exe 'autocmd VimLeavePre * call s:QuitMarked("'.l:filename.'")' + augroup END + redraw! +endfunction + +function s:QuitMarked(path) + silent exe "augroup marked_autoclose_".a:path + autocmd! + augroup END + silent exe "augroup! marked_autoclose_".a:path + + let cmd = " -e 'try'" + let cmd .= " -e 'if application \"Marked\" is running then'" + let cmd .= " -e 'tell application \"Marked\"'" + let cmd .= " -e 'close (first document whose path is equal to \"".a:path."\")'" + let cmd .= " -e 'if count of every window is equal to 0 then'" + let cmd .= " -e 'quit'" + let cmd .= " -e 'end if'" + let cmd .= " -e 'end tell'" + let cmd .= " -e 'end if'" + let cmd .= " -e 'end try'" + + silent exe "!osascript ".cmd + redraw! +endfunction + +augroup marked_commands + autocmd! + autocmd FileType markdown,mkd command! -buffer -bang MarkedOpen :call s:OpenMarked(0) + autocmd FileType markdown,mkd command! -buffer MarkedQuit :call s:QuitMarked(expand('%:p')) +augroup END + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim:ft=vim:fdm=marker:ts=2:sw=2:sts=2:et diff --git a/sources_non_forked/vim-misc b/sources_non_forked/vim-misc deleted file mode 160000 index 8551f2b9..00000000 --- a/sources_non_forked/vim-misc +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8551f2b9dec7fd17dd5c3476d7869957185d692d diff --git a/sources_non_forked/vim-misc/.gitignore b/sources_non_forked/vim-misc/.gitignore new file mode 100644 index 00000000..926ccaaf --- /dev/null +++ b/sources_non_forked/vim-misc/.gitignore @@ -0,0 +1 @@ +doc/tags diff --git a/sources_non_forked/vim-misc/README.md b/sources_non_forked/vim-misc/README.md new file mode 100644 index 00000000..2a9949b0 --- /dev/null +++ b/sources_non_forked/vim-misc/README.md @@ -0,0 +1,672 @@ +# Miscellaneous auto-load Vim scripts + +The vim-misc plug-in contains Vim scripts that are used by most of the [Vim +plug-ins I've written] [plugins] yet don't really belong with any single one of +the plug-ins. Basically it's an extended standard library of Vim script +functions that I wrote during the development of my Vim profile and plug-ins. + +In the past these scripts were bundled with each plug-in, however that turned +out to be a maintenance nightmare for me. That's why the miscellaneous scripts +are now a proper plug-in with their own page on Vim Online. + +Because the miscellaneous scripts are no longer bundled with my Vim plug-ins, +users are now required to install the miscellaneous scripts separately. This is +unfortunate for users who are upgrading from a previous release that did bundle +the miscellaneous scripts, but I don't see any way around this. Sorry! + +## Installation + +Unzip the most recent [ZIP archive] [] file inside your Vim profile +directory (usually this is `~/.vim` on UNIX and `%USERPROFILE%\vimfiles` on +Windows), restart Vim and execute the command `:helptags ~/.vim/doc` (use +`:helptags ~\vimfiles\doc` instead on Windows). + +If you prefer you can also use [Pathogen] [], [Vundle] [] or a similar tool to +install & update the plug-in using a local clone of the git repository. + +## Function documentation + +Below is the documentation for the functions included in the miscellaneous +scripts. Anyone is free to use these functions in their own Vim profile and/or +plug-ins. I care about backwards compatibility so won't break it without a good +reason to do so. + +For those who are curious: The function descriptions given below were extracted +from the source code of the miscellaneous scripts using the Python module +`vimdoctool.py` included in [vim-tools] []. + + + +The documentation of the 80 functions below was extracted from +15 Vim scripts on July 20, 2013 at 10:41. + +### Handling of special buffers + +The functions defined here make it easier to deal with special Vim buffers +that contain text generated by a Vim plug-in. For example my [vim-notes +plug-in] [vim-notes] generates several such buffers: + +- [:RecentNotes] [RecentNotes] lists recently modified notes +- [:ShowTaggedNotes] [ShowTaggedNotes] lists notes grouped by tags +- etc. + +Because the text in these buffers is generated, Vim shouldn't bother with +swap files and it should never prompt the user whether to save changes to +the generated text. + +[vim-notes]: http://peterodding.com/code/vim/notes/ +[RecentNotes]: http://peterodding.com/code/vim/notes/#recentnotes_command +[ShowTaggedNotes]: http://peterodding.com/code/vim/notes/#showtaggednotes_command + +#### The `xolox#misc#buffer#is_empty()` function + +Checks if the current buffer is an empty, unchanged buffer which can be +reused. Returns 1 if an empty buffer is found, 0 otherwise. + +#### The `xolox#misc#buffer#prepare()` function + +Open a special buffer, i.e. a buffer that will hold generated contents, +not directly edited by the user. The buffer can be customized by passing a +dictionary with the following key/value pairs as the first argument: + +- **name** (required): The base name of the buffer (i.e. the base name of + the file loaded in the buffer, even though it isn't really a file and + nothing is really 'loaded' :-) +- **path** (required): The pathname of the buffer. May be relevant if + [:lcd] [lcd] or ['autochdir'] [acd] is being used. + +[lcd]: http://vimdoc.sourceforge.net/htmldoc/editing.html#:lcd +[acd]: http://vimdoc.sourceforge.net/htmldoc/options.html#'autochdir' + +#### The `xolox#misc#buffer#lock()` function + +Lock a special buffer so that its contents can no longer be edited. + +#### The `xolox#misc#buffer#unlock()` function + +Unlock a special buffer so that its content can be updated. + +### Tab completion for user defined commands + +#### The `xolox#misc#complete#keywords()` function + +This function can be used to perform keyword completion for user defined +Vim commands based on the contents of the current buffer. Here's an +example of how you would use it: + + :command -nargs=* -complete=customlist,xolox#misc#complete#keywords MyCmd call s:MyCmd() + +### String escaping functions + +#### The `xolox#misc#escape#pattern()` function + +Takes a single string argument and converts it into a [:substitute] +[subcmd] / [substitute()] [subfun] pattern string that matches the given +string literally. + +[subfun]: http://vimdoc.sourceforge.net/htmldoc/eval.html#substitute() +[subcmd]: http://vimdoc.sourceforge.net/htmldoc/change.html#:substitute + +#### The `xolox#misc#escape#substitute()` function + +Takes a single string argument and converts it into a [:substitute] +[subcmd] / [substitute()] [subfun] replacement string that inserts the +given string literally. + +#### The `xolox#misc#escape#shell()` function + +Takes a single string argument and converts it into a quoted command line +argument. + +I was going to add a long rant here about Vim's ['shellslash' option] +[shellslash], but really, it won't make any difference. Let's just suffice +to say that I have yet to encounter a single person out there who uses +this option for its intended purpose (running a UNIX style shell on +Microsoft Windows). + +[shellslash]: http://vimdoc.sourceforge.net/htmldoc/options.html#'shellslash' + +### Human friendly string formatting for Vim + +#### The `xolox#misc#format#pluralize()` function + +Concatenate a counter (the first argument, expected to be an integer) with +a singular or plural label (the second and third arguments, both expected +to be strings). + +#### The `xolox#misc#format#timestamp()` function + +Format a time stamp (a string containing a formatted floating point +number) into a human friendly format, for example 70 seconds is phrased as +"1 minute and 10 seconds". + +### List handling functions + +#### The `xolox#misc#list#unique()` function + +Remove duplicate values from the given list in-place (preserves order). + +#### The `xolox#misc#list#binsert()` function + +Performs in-place binary insertion, which depending on your use case can +be more efficient than calling Vim's [sort()] [sort] function after each +insertion (in cases where a single, final sort is not an option). Expects +three arguments: + +1. A list +2. A value to insert +3. 1 (true) when case should be ignored, 0 (false) otherwise + +[sort]: http://vimdoc.sourceforge.net/htmldoc/eval.html#sort() + +### Functions to interact with the user + +#### The `xolox#misc#msg#info()` function + +Show a formatted informational message to the user. + +This function has the same argument handling as Vim's [printf()] [] +function with one notable difference: Any arguments which are not numbers +or strings are coerced to strings using Vim's [string()] [] function. + +In the case of `xolox#misc#msg#info()`, automatic string coercion simply +makes the function a bit easier to use. + +[printf()]: http://vimdoc.sourceforge.net/htmldoc/eval.html#printf() +[string()]: http://vimdoc.sourceforge.net/htmldoc/eval.html#string() + +#### The `xolox#misc#msg#warn()` function + +Show a formatted warning message to the user. + +This function has the same argument handling as the +`xolox#misc#msg#info()` function. + +#### The `xolox#misc#msg#debug()` function + +Show a formatted debugging message to the user, *if the user has enabled +increased verbosity by setting Vim's ['verbose'] [] option to one +(1) or higher*. + +This function has the same argument handling as the +`xolox#misc#msg#info()` function. + +In the case of `xolox#misc#msg#debug()`, automatic string coercion +provides lazy evaluation in the sense that complex data structures are +only converted to strings when the user has enabled increased verbosity. + +['verbose']: http://vimdoc.sourceforge.net/htmldoc/options.html#'verbose' + +### Integration between Vim and its environment + +#### The `xolox#misc#open#file()` function + +Given a pathname or URL as the first argument, this opens the file with +the program associated with the file type. So for example a text file +might open in Vim, an `*.html` file would probably open in your web +browser and a media file would open in a media player. + +This should work on Windows, Mac OS X and most Linux distributions. If +this fails to find a file association, you can pass one or more external +commands to try as additional arguments. For example: + + :call xolox#misc#open#file('/path/to/my/file', 'firefox', 'google-chrome') + +This generally shouldn't be necessary but it might come in handy now and +then. + +#### The `xolox#misc#open#url()` function + +Given a URL as the first argument, this opens the URL in your preferred or +best available web browser: + +- In GUI environments a graphical web browser will open (or a new tab will + be created in an existing window) +- In console Vim without a GUI environment, when you have any of `lynx`, + `links` or `w3m` installed it will launch a command line web browser in + front of Vim (temporarily suspending Vim) + +### Vim and plug-in option handling + +#### The `xolox#misc#option#get()` function + +Expects one or two arguments: 1. The name of a variable and 2. the default +value if the variable does not exist. + +Returns the value of the variable from a buffer local variable, global +variable or the default value, depending on which is defined. + +This is used by some of my Vim plug-ins for option handling, so that users +can customize options for specific buffers. + +#### The `xolox#misc#option#split()` function + +Given a multi-value Vim option like ['runtimepath'] [rtp] this returns a +list of strings. For example: + + :echo xolox#misc#option#split(&runtimepath) + ['/home/peter/Projects/Vim/misc', + '/home/peter/Projects/Vim/colorscheme-switcher', + '/home/peter/Projects/Vim/easytags', + ...] + +[rtp]: http://vimdoc.sourceforge.net/htmldoc/options.html#'runtimepath' + +#### The `xolox#misc#option#join()` function + +Given a list of strings like the ones returned by +`xolox#misc#option#split()`, this joins the strings together into a +single value that can be used to set a Vim option. + +#### The `xolox#misc#option#split_tags()` function + +Customized version of `xolox#misc#option#split()` with specialized +handling for Vim's ['tags' option] [tags]. + +[tags]: http://vimdoc.sourceforge.net/htmldoc/options.html#'tags' + +#### The `xolox#misc#option#join_tags()` function + +Customized version of `xolox#misc#option#join()` with specialized +handling for Vim's ['tags' option] [tags]. + +#### The `xolox#misc#option#eval_tags()` function + +Evaluate Vim's ['tags' option] [tags] without looking at the file +system, i.e. this will report tags files that don't exist yet. Expects +the value of the ['tags' option] [tags] as the first argument. If the +optional second argument is 1 (true) only the first match is returned, +otherwise (so by default) a list with all matches is returned. + +### Operating system interfaces + +#### The `xolox#misc#os#is_mac()` function + +Returns 1 (true) when on Mac OS X, 0 (false) otherwise. You would expect +this to simply check the Vim feature list, but for some obscure reason the +`/usr/bin/vim` included in Mac OS X (verified on version 10.7.5) returns 0 +(false) in response to `has('mac')`, so we check the output of `uname` +to avoid false negatives. + +#### The `xolox#misc#os#is_win()` function + +Returns 1 (true) when on Microsoft Windows, 0 (false) otherwise. + +#### The `xolox#misc#os#find_vim()` function + +Returns the program name of Vim as a string. On Windows and UNIX this just +[v:progname] [] as an absolute pathname while on Mac OS X there is +some special magic to find MacVim's executable even though it's usually +not on the executable search path. If you want, you can override the +value returned from this function by setting the global variable +`g:xolox#misc#os#vim_progname`. + +By default the choice of console Vim vs graphical Vim is made based on +the value of [v:progname] [], but if you have a preference you can pass +the string `vim` or `gvim` as the first and only argument. + +[v:progname]: http://vimdoc.sourceforge.net/htmldoc/eval.html#v:progname + +#### The `xolox#misc#os#exec()` function + +Execute an external command (hiding the console on Microsoft Windows when +my [vim-shell plug-in] [vim-shell] is installed). + +Expects a dictionary with the following key/value pairs as the first +argument: + +- **command** (required): The command line to execute +- **async** (optional): set this to 1 (true) to execute the command in the + background (asynchronously) +- **stdin** (optional): a string or list of strings with the input for the + external command +- **check** (optional): set this to 0 (false) to disable checking of the + exit code of the external command (by default an exception will be + raised when the command fails) + +Returns a dictionary with one or more of the following key/value pairs: + +- **command** (always available): the generated command line that was used + to run the external command +- **exit_code** (only in synchronous mode): the exit status of the + external command (an integer, zero on success) +- **stdout** (only in synchronous mode): the output of the command on the + standard output stream (a list of strings, one for each line) +- **stderr** (only in synchronous mode): the output of the command on the + standard error stream (as a list of strings, one for each line) + +[vim-shell]: http://peterodding.com/code/vim/shell/ + +#### The `xolox#misc#os#can_use_dll()` function + +If a) we're on Microsoft Windows, b) the vim-shell plug-in is installed +and c) the compiled DLL included in vim-shell works, we can use the +vim-shell plug-in to execute external commands! Returns 1 (true) +if we can use the DLL, 0 (false) otherwise. + +### Pathname manipulation functions + +#### The `xolox#misc#path#which()` function + +Scan the executable search path (`$PATH`) for one or more external +programs. Expects one or more string arguments with program names. Returns +a list with the absolute pathnames of all found programs. Here's an +example: + + :echo xolox#misc#path#which('gvim', 'vim') + ['/usr/local/bin/gvim', + '/usr/bin/gvim', + '/usr/local/bin/vim', + '/usr/bin/vim'] + +#### The `xolox#misc#path#split()` function + +Split a pathname (the first and only argument) into a list of pathname +components. + +On Windows, pathnames starting with two slashes or backslashes are UNC +paths where the leading slashes are significant... In this case we split +like this: + +- Input: `'//server/share/directory'` +- Result: `['//server', 'share', 'directory']` + +Everything except Windows is treated like UNIX until someone has a better +suggestion :-). In this case we split like this: + +- Input: `'/foo/bar/baz'` +- Result: `['/', 'foo', 'bar', 'baz']` + +To join a list of pathname components back into a single pathname string, +use the `xolox#misc#path#join()` function. + +#### The `xolox#misc#path#join()` function + +Join a list of pathname components (the first and only argument) into a +single pathname string. This is the counterpart to the +`xolox#misc#path#split()` function and it expects a list of pathname +components as returned by `xolox#misc#path#split()`. + +#### The `xolox#misc#path#directory_separator()` function + +Find the preferred directory separator for the platform and settings. + +#### The `xolox#misc#path#absolute()` function + +Canonicalize and resolve a pathname, *regardless of whether it exists*. +This is intended to support string comparison to determine whether two +pathnames point to the same directory or file. + +#### The `xolox#misc#path#relative()` function + +Make an absolute pathname (the first argument) relative to a directory +(the second argument). + +#### The `xolox#misc#path#merge()` function + +Join a directory pathname and filename into a single pathname. + +#### The `xolox#misc#path#commonprefix()` function + +Find the common prefix of path components in a list of pathnames. + +#### The `xolox#misc#path#encode()` function + +Encode a pathname so it can be used as a filename. This uses URL encoding +to encode special characters. + +#### The `xolox#misc#path#decode()` function + +Decode a pathname previously encoded with `xolox#misc#path#encode()`. + +#### The `xolox#misc#path#is_relative()` function + +Returns true (1) when the pathname given as the first argument is +relative, false (0) otherwise. + +#### The `xolox#misc#path#tempdir()` function + +Create a temporary directory and return the pathname of the directory. + +### String handling + +#### The `xolox#misc#str#slug()` function + +Convert a string to a "slug" - something that can be safely used in +filenames and URLs without worrying about quoting/escaping of special +characters. + +#### The `xolox#misc#str#ucfirst()` function + +Uppercase the first character in a string (the first argument). + +#### The `xolox#misc#str#compact()` function + +Compact whitespace in a string (the first argument). + +#### The `xolox#misc#str#trim()` function + +Trim all whitespace from the start and end of a string (the first +argument). + +#### The `xolox#misc#str#indent()` function + +Indent all lines in a multi-line string (the first argument) with a +specific number of *space characters* (the second argument, an integer). + +#### The `xolox#misc#str#dedent()` function + +Remove common whitespace from a multi line string. + +### Test runner & infrastructure for Vim plug-ins + +The Vim auto-load script `autoload/xolox/misc/test.vim` contains +infrastructure that can be used to run an automated Vim plug-in test suite. +It provides a framework for running test functions, keeping track of the +test status, making assertions and reporting test results to the user. + +#### The `xolox#misc#test#reset()` function + +Reset counters for executed tests and passed/failed assertions. + +#### The `xolox#misc#test#summarize()` function + +Print a summary of test results, to be interpreted interactively. + +#### The `xolox#misc#test#wrap()` function + +Call a function in a try/catch block and prevent exceptions from bubbling. +The name of the function should be passed as the first and only argument; +it should be a string containing the name of a Vim auto-load function. + +#### The `xolox#misc#test#passed()` function + +Record a test which succeeded. + +#### The `xolox#misc#test#failed()` function + +Record a test which failed. + +#### The `xolox#misc#test#assert_true()` function + +Check whether an expression is true. + +#### The `xolox#misc#test#assert_equals()` function + +Check whether two values are the same. + +#### The `xolox#misc#test#assert_same_type()` function + +Check whether two values are of the same type. + +### Tests for the miscellaneous Vim scripts + +The Vim auto-load script `autoload/xolox/misc/tests.vim` contains the +automated test suite of the miscellaneous Vim scripts. Right now the +coverage is not very high yet, but this will improve over time. + +#### The `xolox#misc#tests#run()` function + +Run the automated test suite of the miscellaneous Vim scripts. To be used +interactively. Intended to be safe to execute irrespective of context. + +#### The `xolox#misc#tests#pattern_escaping()` function + +Test escaping of regular expression patterns with +`xolox#misc#escape#pattern()`. + +#### The `xolox#misc#tests#substitute_escaping()` function + +Test escaping of substitution strings with +`xolox#misc#escape#substitute()`. + +#### The `xolox#misc#tests#shell_escaping()` function + +Test escaping of shell arguments with `xolox#misc#escape#shell()`. + +#### The `xolox#misc#tests#making_a_list_unique()` function + +Test removing of duplicate values from lists with +`xolox#misc#list#unique()`. + +#### The `xolox#misc#tests#binary_insertion()` function + +Test the binary insertion algorithm implemented in +`xolox#misc#list#binsert()`. + +#### The `xolox#misc#tests#getting_configuration_options()` function + +Test getting of scoped plug-in configuration "options" with +`xolox#misc#option#get()`. + +#### The `xolox#misc#tests#splitting_of_multi_valued_options()` function + +Test splitting of multi-valued Vim options with +`xolox#misc#option#split()`. + +#### The `xolox#misc#tests#joining_of_multi_valued_options()` function + +Test joining of multi-valued Vim options with `xolox#misc#option#join()`. + +#### The `xolox#misc#tests#finding_vim_on_the_search_path()` function + +Test looking up Vim's executable on the search path using [v:progname] [] +with `xolox#misc#os#find_vim()`. + +[v:progname]: http://vimdoc.sourceforge.net/htmldoc/eval.html#v:progname + +#### The `xolox#misc#tests#synchronous_command_execution()` function + +Test basic functionality of synchronous command execution with +`xolox#misc#os#exec()`. + +#### The `xolox#misc#tests#synchronous_command_execution_with_stderr()` function + +Test basic functionality of synchronous command execution with +`xolox#misc#os#exec()` including the standard error stream (not available +on Windows when vim-shell is not installed). + +#### The `xolox#misc#tests#synchronous_command_execution_with_raising_of_errors()` function + +Test raising of errors during synchronous command execution with +`xolox#misc#os#exec()`. + +#### The `xolox#misc#tests#synchronous_command_execution_without_raising_errors()` function + +Test synchronous command execution without raising of errors with +`xolox#misc#os#exec()`. + +#### The `xolox#misc#tests#asynchronous_command_execution()` function + +Test the basic functionality of asynchronous command execution with +`xolox#misc#os#exec()`. This runs the external command `mkdir` and tests +that the side effect of creating the directory takes place. This might +seem like a peculiar choice, but it's one of the few 100% portable +commands (Windows + UNIX) that doesn't involve input/output streams. + +#### The `xolox#misc#tests#string_case_transformation()` function + +Test string case transformation with `xolox#misc#str#ucfirst()`. + +#### The `xolox#misc#tests#string_whitespace_compaction()` function + +Test compaction of whitespace in strings with `xolox#misc#str#compact()`. + +#### The `xolox#misc#tests#string_whitespace_trimming()` function + +Test trimming of whitespace in strings with `xolox#misc#str#trim()`. + +#### The `xolox#misc#tests#multiline_string_dedent()` function + +Test dedenting of multi-line strings with `xolox#misc#str#dedent()`. + +#### The `xolox#misc#tests#version_string_parsing()` function + +Test parsing of version strings with `xolox#misc#version#parse()`. + +#### The `xolox#misc#tests#version_string_comparison()` function + +Test comparison of version strings with `xolox#misc#version#at_least()`. + +### Timing of long during operations + +#### The `xolox#misc#timer#start()` function + +Start a timer. This returns a list which can later be passed to +`xolox#misc#timer#stop()`. + +#### The `xolox#misc#timer#stop()` function + +Show a formatted debugging message to the user, if the user has enabled +increased verbosity by setting Vim's ['verbose'] [verbose] option to one +(1) or higher. + +This function has the same argument handling as Vim's [printf()] [printf] +function with one difference: At the point where you want the elapsed time +to be embedded, you write `%s` and you pass the list returned by +`xolox#misc#timer#start()` as an argument. + +[verbose]: http://vimdoc.sourceforge.net/htmldoc/options.html#'verbose' +[printf]: http://vimdoc.sourceforge.net/htmldoc/eval.html#printf() + +#### The `xolox#misc#timer#force()` function + +Show a formatted message to the user. This function has the same argument +handling as Vim's [printf()] [printf] function with one difference: At the +point where you want the elapsed time to be embedded, you write `%s` and +you pass the list returned by `xolox#misc#timer#start()` as an argument. + +### Version string handling + +#### The `xolox#misc#version#parse()` function + +Convert a version string to a list of integers. + +#### The `xolox#misc#version#at_least()` function + +Check whether the second version string is equal to or greater than the +first version string. Returns 1 (true) when it is, 0 (false) otherwise. + + + +## Contact + +If you have questions, bug reports, suggestions, etc. the author can be +contacted at . The latest version is available at + and . +If you like the script please vote for it on [Vim Online] []. + +## License + +This software is licensed under the [MIT license] []. +© 2013 Peter Odding <>. + + +[MIT license]: http://en.wikipedia.org/wiki/MIT_License +[Pathogen]: http://www.vim.org/scripts/script.php?script_id=2332 +[plugins]: http://peterodding.com/code/vim/ +[repository]: https://github.com/xolox/vim-misc +[Vim Online]: http://www.vim.org/scripts/script.php?script_id=4597 +[vim-tools]: http://peterodding.com/code/vim/tools/ +[Vundle]: https://github.com/gmarik/vundle +[ZIP archive]: http://peterodding.com/code/vim/downloads/misc.zip diff --git a/sources_non_forked/vim-misc/addon-info.json b/sources_non_forked/vim-misc/addon-info.json new file mode 100644 index 00000000..934bcf72 --- /dev/null +++ b/sources_non_forked/vim-misc/addon-info.json @@ -0,0 +1 @@ +{"vim_script_nr": 4597, "dependencies": {}, "homepage": "http://peterodding.com/code/vim/misc", "name": "vim-misc"} \ No newline at end of file diff --git a/sources_non_forked/vim-misc/autoload/xolox/misc.vim b/sources_non_forked/vim-misc/autoload/xolox/misc.vim new file mode 100644 index 00000000..f7de4f38 --- /dev/null +++ b/sources_non_forked/vim-misc/autoload/xolox/misc.vim @@ -0,0 +1,7 @@ +" The version of my miscellaneous scripts. +" +" Author: Peter Odding +" Last Change: July 20, 2013 +" URL: http://peterodding.com/code/vim/misc/ + +let g:xolox#misc#version = '1.8.5' diff --git a/sources_non_forked/vim-misc/autoload/xolox/misc/buffer.vim b/sources_non_forked/vim-misc/autoload/xolox/misc/buffer.vim new file mode 100644 index 00000000..01dca6ef --- /dev/null +++ b/sources_non_forked/vim-misc/autoload/xolox/misc/buffer.vim @@ -0,0 +1,80 @@ +" Handling of special buffers +" +" Author: Peter Odding +" Last Change: May 19, 2013 +" URL: http://peterodding.com/code/vim/misc/ +" +" The functions defined here make it easier to deal with special Vim buffers +" that contain text generated by a Vim plug-in. For example my [vim-notes +" plug-in] [vim-notes] generates several such buffers: +" +" - [:RecentNotes] [RecentNotes] lists recently modified notes +" - [:ShowTaggedNotes] [ShowTaggedNotes] lists notes grouped by tags +" - etc. +" +" Because the text in these buffers is generated, Vim shouldn't bother with +" swap files and it should never prompt the user whether to save changes to +" the generated text. +" +" [vim-notes]: http://peterodding.com/code/vim/notes/ +" [RecentNotes]: http://peterodding.com/code/vim/notes/#recentnotes_command +" [ShowTaggedNotes]: http://peterodding.com/code/vim/notes/#showtaggednotes_command + +function! xolox#misc#buffer#is_empty() " {{{1 + " Checks if the current buffer is an empty, unchanged buffer which can be + " reused. Returns 1 if an empty buffer is found, 0 otherwise. + return !&modified && expand('%') == '' && line('$') <= 1 && getline(1) == '' +endfunction + +function! xolox#misc#buffer#prepare(...) " {{{1 + " Open a special buffer, i.e. a buffer that will hold generated contents, + " not directly edited by the user. The buffer can be customized by passing a + " dictionary with the following key/value pairs as the first argument: + " + " - **name** (required): The base name of the buffer (i.e. the base name of + " the file loaded in the buffer, even though it isn't really a file and + " nothing is really 'loaded' :-) + " - **path** (required): The pathname of the buffer. May be relevant if + " [:lcd] [lcd] or ['autochdir'] [acd] is being used. + " + " [lcd]: http://vimdoc.sourceforge.net/htmldoc/editing.html#:lcd + " [acd]: http://vimdoc.sourceforge.net/htmldoc/options.html#'autochdir' + if a:0 == 1 && type(a:1) == type('') + " Backwards compatibility with old interface. + let options = {'name': a:1, 'path': a:1} + elseif type(a:1) == type({}) + let options = a:1 + else + throw "Invalid arguments" + endif + let winnr = 1 + let found = 0 + for bufnr in tabpagebuflist() + if xolox#misc#path#equals(options['path'], bufname(bufnr)) + execute winnr . 'wincmd w' + let found = 1 + break + else + let winnr += 1 + endif + endfor + if !(found || xolox#misc#buffer#is_empty()) + vsplit + endif + silent execute 'edit' fnameescape(options['path']) + lcd " clear working directory + setlocal buftype=nofile bufhidden=hide noswapfile + let &l:statusline = '[' . options['name'] . ']' + call xolox#misc#buffer#unlock() + silent %delete +endfunction + +function! xolox#misc#buffer#lock() " {{{1 + " Lock a special buffer so that its contents can no longer be edited. + setlocal readonly nomodifiable nomodified +endfunction + +function! xolox#misc#buffer#unlock() " {{{1 + " Unlock a special buffer so that its content can be updated. + setlocal noreadonly modifiable +endfunction diff --git a/sources_non_forked/vim-misc/autoload/xolox/misc/complete.vim b/sources_non_forked/vim-misc/autoload/xolox/misc/complete.vim new file mode 100644 index 00000000..763e0b91 --- /dev/null +++ b/sources_non_forked/vim-misc/autoload/xolox/misc/complete.vim @@ -0,0 +1,22 @@ +" Tab completion for user defined commands. +" +" Author: Peter Odding +" Last Change: May 19, 2013 +" URL: http://peterodding.com/code/vim/misc/ + +function! xolox#misc#complete#keywords(arglead, cmdline, cursorpos) + " This function can be used to perform keyword completion for user defined + " Vim commands based on the contents of the current buffer. Here's an + " example of how you would use it: + " + " :command -nargs=* -complete=customlist,xolox#misc#complete#keywords MyCmd call s:MyCmd() + let words = {} + for line in getline(1, '$') + for word in split(line, '\W\+') + let words[word] = 1 + endfor + endfor + return sort(keys(filter(words, 'v:key =~# a:arglead'))) +endfunction + +" vim: ts=2 sw=2 et diff --git a/sources_non_forked/vim-misc/autoload/xolox/misc/echo.exe b/sources_non_forked/vim-misc/autoload/xolox/misc/echo.exe new file mode 100644 index 0000000000000000000000000000000000000000..52f4e792df13bebd4f5743f29ba8fbe59fb40915 GIT binary patch literal 7680 zcmeHMdu&_P89&aWaZ{&uA+93m=q*cVN9wH5c9bL?rtR%x#BGwsX`!L6W8cKi9NXCU zwiJ=la$~7CXX!eLp-t>T)M=Y0{@5Q(tA^$UTFpf(Q$P&5fu=~yHb;)MXk-vZh4=f; zweu(uY|^Iv0Vg`|@B7a0dz^=FJP(~`rHrvMN8NMfvf?X-uzN`-_$A`Q@*y zyJ%^7WnD)ooRs2;SZ~7LF9rP3XiSy56)B-brEpZ*b>N`X9}6lCRaKR>1<|cCV=b0a z_U0?Aw-#3$XKO7hEajE#CX7^?qsMMT?Lgi{eYe>zF>%uf;TNeDCB`X{UV@PLh*{Kg z6%De;CdM|1)_=Kx++!ajvO!fIRWWZPOq5C20&cWKk|3fX5%jBm#w419OrdDCn4T-# zFi3+*#x9Z}Fu;}}*B~!QZpKCzbVal6ptqB&wbh6C{LWyozA991R$ zo;|&~J>+n^S^jtWWov3wJutM}vU_k;`wNz=8L9x){moIWGPA3eOu%xhniZ`=0LU$C zmbKc=Zw>9S>;c2?X@&jzi^cWPdtxY8Mq*O$a+eJl?C0(P^3+@Q!9NkMUA1dAzs0xN z)A#IYddEKaLyYMkcG*)L4O-bgcm^$ddV0_B?lFCK_lfA{mxs>of&uci!!@YV6`0TY z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;+zU;*ay#eF_sI2sl#htUUj zzds!HCwi02285UbX+L`sb4f+jlIZx=kdjC+_6+m+gMC_3_4Ne9STStM3&i^AJ1b*R zv)^O(PMZ>Z{&?J{o{VEYL#P5uT=j+g(O^VLY-a3v<_pB4Y9bctfi|C|PnQLvip)9^ zC#7R`Ny+63DUtYksVA1ecl(5bZ}?~;_`MWsb47?bG#0x?a+c9RgvlA7>`BjIST6je^3R)|Si#3OCcqKN$9 z7idaeJQWNl{oN5lhkX){MFc)6)*~fj{fd-S9?_I&KuOYnAWUdU2%%)^XSN|E9`T<9 z9Q+4^)RwRzB-*mlhGZzFMS}E?41XjRRR{wmm+QEaNWvCq7nCUuEHKo^$*DXPRv}x3 zN*jeCdSa1C>;ze29=0EbPbh&{Z#4Xv5)|U*HC2L*m4MT=fB$}X;m z#Y8BU2tS77$RCkZe>aUE7vr$B8V(dju|==$aI-!8y;2gsi)d;%l9cXhxVK?Tarf5X z%~(u$9x-V_9|z}05`_Q_7Cg%8(XLA(pik4=iZS}&(R$$EzQZjK`gR^@ZHq)$ literal 0 HcmV?d00001 diff --git a/sources_non_forked/vim-misc/autoload/xolox/misc/escape.vim b/sources_non_forked/vim-misc/autoload/xolox/misc/escape.vim new file mode 100644 index 00000000..29a16ca1 --- /dev/null +++ b/sources_non_forked/vim-misc/autoload/xolox/misc/escape.vim @@ -0,0 +1,56 @@ +" String escaping functions. +" +" Author: Peter Odding +" Last Change: May 19, 2013 +" URL: http://peterodding.com/code/vim/misc/ + +function! xolox#misc#escape#pattern(string) " {{{1 + " Takes a single string argument and converts it into a [:substitute] + " [subcmd] / [substitute()] [subfun] pattern string that matches the given + " string literally. + " + " [subfun]: http://vimdoc.sourceforge.net/htmldoc/eval.html#substitute() + " [subcmd]: http://vimdoc.sourceforge.net/htmldoc/change.html#:substitute + if type(a:string) == type('') + let string = escape(a:string, '^$.*\~[]') + return substitute(string, '\n', '\\n', 'g') + endif + return '' +endfunction + +function! xolox#misc#escape#substitute(string) " {{{1 + " Takes a single string argument and converts it into a [:substitute] + " [subcmd] / [substitute()] [subfun] replacement string that inserts the + " given string literally. + if type(a:string) == type('') + let string = escape(a:string, '\&~%') + return substitute(string, '\n', '\\r', 'g') + endif + return '' +endfunction + +function! xolox#misc#escape#shell(string) " {{{1 + " Takes a single string argument and converts it into a quoted command line + " argument. + " + " I was going to add a long rant here about Vim's ['shellslash' option] + " [shellslash], but really, it won't make any difference. Let's just suffice + " to say that I have yet to encounter a single person out there who uses + " this option for its intended purpose (running a UNIX style shell on + " Microsoft Windows). + " + " [shellslash]: http://vimdoc.sourceforge.net/htmldoc/options.html#'shellslash' + if xolox#misc#os#is_win() + try + let ssl_save = &shellslash + set noshellslash + return shellescape(a:string) + finally + let &shellslash = ssl_save + endtry + else + return shellescape(a:string) + endif +endfunction + +" vim: ts=2 sw=2 et diff --git a/sources_non_forked/vim-misc/autoload/xolox/misc/format.vim b/sources_non_forked/vim-misc/autoload/xolox/misc/format.vim new file mode 100644 index 00000000..44f7b543 --- /dev/null +++ b/sources_non_forked/vim-misc/autoload/xolox/misc/format.vim @@ -0,0 +1,46 @@ +" Human friendly string formatting for Vim. +" +" Author: Peter Odding +" Last Change: June 2, 2013 +" URL: http://peterodding.com/code/vim/misc/ + +function! xolox#misc#format#pluralize(count, singular, plural) " {{{1 + " Concatenate a counter (the first argument, expected to be an integer) with + " a singular or plural label (the second and third arguments, both expected + " to be strings). + if a:count == 0 + return printf('no %s', a:plural) + else + return printf('%i %s', a:count, a:count == 1 ? a:singular : a:plural) + endif +endfunction + +function! xolox#misc#format#timestamp(ts) " {{{1 + " Format a time stamp (a string containing a formatted floating point + " number) into a human friendly format, for example 70 seconds is phrased as + " "1 minute and 10 seconds". + let seconds = a:ts + 0 + " Fast common case with extra precision from reltime(). + if seconds < 5 + let extract = matchstr(a:ts, '^\d\+\(\.0*[1-9][1-9]\?\)\?') + if extract =~ '[123456789]' + return extract . ' second' . (extract != '1' ? 's' : '') + endif + endif + " Generic but slow code. + let result = [] + for [name, size] in [['day', 60 * 60 * 24], ['hour', 60 * 60], ['minute', 60], ['second', 1]] + if seconds >= size + let counter = seconds / size + let seconds = seconds % size + let suffix = counter != 1 ? 's' : '' + call add(result, printf('%i %s%s', counter, name, suffix)) + endif + endfor + " Format the resulting text? + if len(result) == 1 + return result[0] + else + return join(result[0:-2], ', ') . ' and ' . result[-1] + endif +endfunction diff --git a/sources_non_forked/vim-misc/autoload/xolox/misc/list.vim b/sources_non_forked/vim-misc/autoload/xolox/misc/list.vim new file mode 100644 index 00000000..548592a3 --- /dev/null +++ b/sources_non_forked/vim-misc/autoload/xolox/misc/list.vim @@ -0,0 +1,42 @@ +" List handling functions. +" +" Author: Peter Odding +" Last Change: June 2, 2013 +" URL: http://peterodding.com/code/vim/misc/ + +function! xolox#misc#list#unique(list) " {{{1 + " Remove duplicate values from the given list in-place (preserves order). + call reverse(a:list) + call filter(a:list, 'count(a:list, v:val) == 1') + return reverse(a:list) +endfunction + +function! xolox#misc#list#binsert(list, value, ...) " {{{1 + " Performs in-place binary insertion, which depending on your use case can + " be more efficient than calling Vim's [sort()] [sort] function after each + " insertion (in cases where a single, final sort is not an option). Expects + " three arguments: + " + " 1. A list + " 2. A value to insert + " 3. 1 (true) when case should be ignored, 0 (false) otherwise + " + " [sort]: http://vimdoc.sourceforge.net/htmldoc/eval.html#sort() + let idx = s:binsert_r(a:list, 0, len(a:list), a:value, exists('a:1') && a:1) + return insert(a:list, a:value, idx) +endfunction + +function! s:binsert_r(list, low, high, value, ignorecase) + let mid = a:low + (a:high - a:low) / 2 + if a:low == a:high + return a:low + elseif a:ignorecase ? a:value >? a:list[mid] : a:value > a:list[mid] + return s:binsert_r(a:list, mid + 1, a:high, a:value, a:ignorecase) + elseif a:ignorecase ? a:value +" Last Change: June 2, 2013 +" URL: http://peterodding.com/code/vim/misc/ + +if !exists('g:xolox_message_buffer') + " For when I lose my :messages history :-\ + let g:xolox_message_buffer = 100 +endif + +if !exists('g:xolox_messages') + let g:xolox_messages = [] +endif + +function! xolox#misc#msg#info(...) " {{{1 + " Show a formatted informational message to the user. + " + " This function has the same argument handling as Vim's [printf()] [] + " function with one notable difference: Any arguments which are not numbers + " or strings are coerced to strings using Vim's [string()] [] function. + " + " In the case of `xolox#misc#msg#info()`, automatic string coercion simply + " makes the function a bit easier to use. + " + " [printf()]: http://vimdoc.sourceforge.net/htmldoc/eval.html#printf() + " [string()]: http://vimdoc.sourceforge.net/htmldoc/eval.html#string() + call s:show_message('title', a:000) +endfunction + +function! xolox#misc#msg#warn(...) " {{{1 + " Show a formatted warning message to the user. + " + " This function has the same argument handling as the + " `xolox#misc#msg#info()` function. + call s:show_message('warningmsg', a:000) +endfunction + +function! xolox#misc#msg#debug(...) " {{{1 + " Show a formatted debugging message to the user, *if the user has enabled + " increased verbosity by setting Vim's ['verbose'] [] option to one + " (1) or higher*. + " + " This function has the same argument handling as the + " `xolox#misc#msg#info()` function. + " + " In the case of `xolox#misc#msg#debug()`, automatic string coercion + " provides lazy evaluation in the sense that complex data structures are + " only converted to strings when the user has enabled increased verbosity. + " + " ['verbose']: http://vimdoc.sourceforge.net/htmldoc/options.html#'verbose' + if &vbs >= 1 + call s:show_message('question', a:000) + endif +endfunction + +function! s:show_message(hlgroup, args) " {{{1 + " The implementation of info() and warn(). + let nargs = len(a:args) + if nargs == 1 + let message = a:args[0] + elseif nargs >= 2 + let args = map(copy(a:args), 's:coerce_argument(v:val)') + let message = call('printf', args) + endif + if exists('message') + try + " Temporarily disable Vim's |hit-enter| prompt and mode display. + if !exists('s:more_save') + let s:more_save = &more + let s:ruler_save = &ruler + let s:smd_save = &showmode + endif + set nomore noshowmode + if winnr('$') == 1 | set noruler | endif + augroup PluginXoloxHideMode + autocmd! CursorHold,CursorHoldI * call s:clear_message() + augroup END + execute 'echohl' a:hlgroup + " Redraw to avoid |hit-enter| prompt. + redraw + for line in split(message, "\n") + echomsg line + endfor + if g:xolox_message_buffer > 0 + call add(g:xolox_messages, message) + if len(g:xolox_messages) > g:xolox_message_buffer + call remove(g:xolox_messages, 0) + endif + endif + finally + " Always clear message highlighting, even when interrupted by Ctrl-C. + echohl none + endtry + endif +endfunction + +function! s:coerce_argument(value) " {{{1 + " Callback to coerce printf() arguments into strings. + let value_type = type(a:value) + if value_type != type(0) && value_type != type('') + return string(a:value) + else + return a:value + endif +endfunction + +function! s:clear_message() " {{{1 + " Callback to clear message after some time has passed. + echo '' + let &more = s:more_save + let &showmode = s:smd_save + let &ruler = s:ruler_save + unlet s:more_save s:ruler_save s:smd_save + autocmd! PluginXoloxHideMode + augroup! PluginXoloxHideMode +endfunction + +" vim: ts=2 sw=2 et diff --git a/sources_non_forked/vim-misc/autoload/xolox/misc/open.vim b/sources_non_forked/vim-misc/autoload/xolox/misc/open.vim new file mode 100644 index 00000000..270b2873 --- /dev/null +++ b/sources_non_forked/vim-misc/autoload/xolox/misc/open.vim @@ -0,0 +1,100 @@ +" Integration between Vim and its environment. +" +" Author: Peter Odding +" Last Change: June 19, 2013 +" URL: http://peterodding.com/code/vim/misc/ + +let s:enoimpl = "vim-misc %s: %s() hasn't been implemented for your platform! If you have suggestions, please get in touch at https://github.com/xolox/vim-misc/issues" +let s:handlers = ['gnome-open', 'kde-open', 'exo-open', 'xdg-open'] + +function! xolox#misc#open#file(location, ...) " {{{1 + " Given a pathname or URL as the first argument, this opens the file with + " the program associated with the file type. So for example a text file + " might open in Vim, an `*.html` file would probably open in your web + " browser and a media file would open in a media player. + " + " This should work on Windows, Mac OS X and most Linux distributions. If + " this fails to find a file association, you can pass one or more external + " commands to try as additional arguments. For example: + " + " :call xolox#misc#open#file('/path/to/my/file', 'firefox', 'google-chrome') + " + " This generally shouldn't be necessary but it might come in handy now and + " then. + if xolox#misc#os#is_win() + try + call xolox#shell#open_with_windows_shell(a:location) + catch /^Vim\%((\a\+)\)\=:E117/ + let command = '!start CMD /C START "" %s' + silent execute printf(command, xolox#misc#escape#shell(a:location)) + endtry + return + elseif xolox#misc#os#is_mac() + call xolox#misc#msg#debug("vim-misc %s: Detected Mac OS X, using 'open' command to open %s ..", g:xolox#misc#version, string(a:location)) + let cmd = 'open ' . shellescape(a:location) . ' 2>&1' + call s:handle_error(cmd, system(cmd)) + return + else + for handler in s:handlers + a:000 + if executable(handler) + call xolox#misc#msg#debug("vim-misc %s: Using '%s' to open '%s'.", g:xolox#misc#version, handler, a:location) + let cmd = shellescape(handler) . ' ' . shellescape(a:location) . ' 2>&1' + call s:handle_error(cmd, system(cmd)) + return + endif + endfor + endif + throw printf(s:enoimpl, g:xolox#misc#version, 'xolox#misc#open#file') +endfunction + +function! xolox#misc#open#url(url) " {{{1 + " Given a URL as the first argument, this opens the URL in your preferred or + " best available web browser: + " + " - In GUI environments a graphical web browser will open (or a new tab will + " be created in an existing window) + " - In console Vim without a GUI environment, when you have any of `lynx`, + " `links` or `w3m` installed it will launch a command line web browser in + " front of Vim (temporarily suspending Vim) + let url = a:url + if url !~ '^\w\+://' + call xolox#misc#msg#debug("vim-misc %s: The URL %s doesn't contain a scheme, improvising ..", g:xolox#misc#version, string(url)) + if url !~ '@' + call xolox#misc#msg#debug("vim-misc %s: Defaulting to http:// URL scheme ..", g:xolox#misc#version) + let url = 'http://' . url + elseif url !~ '^mailto:' + call xolox#misc#msg#debug("vim-misc %s: Defaulting to mailto: URL scheme ..", g:xolox#misc#version) + let url = 'mailto:' . url + endif + endif + let on_unix = has('unix') + let not_on_mac = !xolox#misc#os#is_mac() + let no_gui_available = (has('gui_running') == 0 && $DISPLAY == '') + if on_unix && not_on_mac && no_gui_available + call xolox#misc#msg#debug("vim-misc %s: Using command line web browser because no GUI seems to be available ..", g:xolox#misc#version) + for browser in ['lynx', 'links', 'w3m'] + call xolox#misc#msg#debug("vim-misc %s: Checking whether %s command line web browser is installed ..", g:xolox#misc#version, string(browser)) + if executable(browser) + call xolox#misc#msg#debug("vim-misc %s: Found %s, using it to open %s ..", g:xolox#misc#version, string(browser), string(url)) + execute '!' . browser fnameescape(url) + call s:handle_error(browser . ' ' . url, '') + return + endif + endfor + endif + call xolox#misc#msg#debug("vim-misc %s: Defaulting to GUI web browser to open %s ..", g:xolox#misc#version, string(url)) + call xolox#misc#open#file(url, 'firefox', 'google-chrome') +endfunction + +function! s:handle_error(cmd, output) " {{{1 + if v:shell_error + let message = "vim-misc %s: Failed to execute program! (command line: %s%s)" + let output = strtrans(xolox#misc#str#trim(a:output)) + if output != '' + let output = ", output: " . string(output) + endif + throw printf(message, g:xolox#misc#version, a:cmd, output) + endif +endfunction + +" vim: et ts=2 sw=2 fdm=marker diff --git a/sources_non_forked/vim-misc/autoload/xolox/misc/option.vim b/sources_non_forked/vim-misc/autoload/xolox/misc/option.vim new file mode 100644 index 00000000..97fc88e6 --- /dev/null +++ b/sources_non_forked/vim-misc/autoload/xolox/misc/option.vim @@ -0,0 +1,115 @@ +" Vim and plug-in option handling. +" +" Author: Peter Odding +" Last Change: June 2, 2013 +" URL: http://peterodding.com/code/vim/misc/ + +function! xolox#misc#option#get(name, ...) " {{{1 + " Expects one or two arguments: 1. The name of a variable and 2. the default + " value if the variable does not exist. + " + " Returns the value of the variable from a buffer local variable, global + " variable or the default value, depending on which is defined. + " + " This is used by some of my Vim plug-ins for option handling, so that users + " can customize options for specific buffers. + if exists('b:' . a:name) + " Buffer local variable. + return eval('b:' . a:name) + elseif exists('g:' . a:name) + " Global variable. + return eval('g:' . a:name) + elseif exists('a:1') + " Default value. + return a:1 + endif +endfunction + +function! xolox#misc#option#split(value) " {{{1 + " Given a multi-value Vim option like ['runtimepath'] [rtp] this returns a + " list of strings. For example: + " + " :echo xolox#misc#option#split(&runtimepath) + " ['/home/peter/Projects/Vim/misc', + " '/home/peter/Projects/Vim/colorscheme-switcher', + " '/home/peter/Projects/Vim/easytags', + " ...] + " + " [rtp]: http://vimdoc.sourceforge.net/htmldoc/options.html#'runtimepath' + let values = split(a:value, '[^\\]\zs,') + return map(values, 's:unescape(v:val)') +endfunction + +function! s:unescape(s) + return substitute(a:s, '\\\([\\,]\)', '\1', 'g') +endfunction + +function! xolox#misc#option#join(values) " {{{1 + " Given a list of strings like the ones returned by + " `xolox#misc#option#split()`, this joins the strings together into a + " single value that can be used to set a Vim option. + let values = copy(a:values) + call map(values, 's:escape(v:val)') + return join(values, ',') +endfunction + +function! s:escape(s) + return escape(a:s, ',\') +endfunction + +function! xolox#misc#option#split_tags(value) " {{{1 + " Customized version of `xolox#misc#option#split()` with specialized + " handling for Vim's ['tags' option] [tags]. + " + " [tags]: http://vimdoc.sourceforge.net/htmldoc/options.html#'tags' + let values = split(a:value, '[^\\]\zs,') + return map(values, 's:unescape_tags(v:val)') +endfunction + +function! s:unescape_tags(s) + return substitute(a:s, '\\\([\\, ]\)', '\1', 'g') +endfunction + +function! xolox#misc#option#join_tags(values) " {{{1 + " Customized version of `xolox#misc#option#join()` with specialized + " handling for Vim's ['tags' option] [tags]. + let values = copy(a:values) + call map(values, 's:escape_tags(v:val)') + return join(values, ',') +endfunction + +function! s:escape_tags(s) + return escape(a:s, ', ') +endfunction + +function! xolox#misc#option#eval_tags(value, ...) " {{{1 + " Evaluate Vim's ['tags' option] [tags] without looking at the file + " system, i.e. this will report tags files that don't exist yet. Expects + " the value of the ['tags' option] [tags] as the first argument. If the + " optional second argument is 1 (true) only the first match is returned, + " otherwise (so by default) a list with all matches is returned. + let pathnames = [] + let first_only = exists('a:1') ? a:1 : 0 + for pattern in xolox#misc#option#split_tags(a:value) + " Make buffer relative pathnames absolute. + if pattern =~ '^\./' + let suffix = matchstr(pattern, '^./\zs.*$') + let pattern = xolox#misc#path#merge(expand('%:p:h'), suffix) + endif + " Make working directory relative pathnames absolute. + if xolox#misc#path#is_relative(pattern) + let pattern = xolox#misc#path#merge(getcwd(), pattern) + endif + " Ignore the trailing `;' for recursive upwards searching because we + " always want the most specific pathname available. + let pattern = substitute(pattern, ';$', '', '') + " Expand the pattern. + call extend(pathnames, split(expand(pattern), "\n")) + if first_only && !empty(pathnames) + return pathnames[0] + endif + endfor + return first_only ? '' : pathnames +endfunction + +" vim: ts=2 sw=2 et diff --git a/sources_non_forked/vim-misc/autoload/xolox/misc/os.vim b/sources_non_forked/vim-misc/autoload/xolox/misc/os.vim new file mode 100644 index 00000000..ea96116a --- /dev/null +++ b/sources_non_forked/vim-misc/autoload/xolox/misc/os.vim @@ -0,0 +1,271 @@ +" Operating system interfaces. +" +" Author: Peter Odding +" Last Change: June , 2013 +" URL: http://peterodding.com/code/vim/misc/ + +function! xolox#misc#os#is_mac() " {{{1 + " Returns 1 (true) when on Mac OS X, 0 (false) otherwise. You would expect + " this to simply check the Vim feature list, but for some obscure reason the + " `/usr/bin/vim` included in Mac OS X (verified on version 10.7.5) returns 0 + " (false) in response to `has('mac')`, so we check the output of `uname` + " to avoid false negatives. + if !exists('s:is_mac') + " By default we assume we are *not* on Mac OS X. + let s:is_mac = 0 + if has('mac') || has('macunix') || has('gui_mac') + " If Vim's feature list indicates we are on Mac OS X, we have our answer :-). + let s:is_mac = 1 + elseif !xolox#misc#os#is_win() + " Otherwise we check the output of `uname' to avoid false negatives. + let result = xolox#misc#os#exec({'command': 'uname', 'check': 0}) + if result['exit_code'] == 0 && get(result['stdout'], 0, '') == 'Darwin' + let s:is_mac = 1 + endif + endif + endif + return s:is_mac +endfunction + +function! xolox#misc#os#is_win() " {{{1 + " Returns 1 (true) when on Microsoft Windows, 0 (false) otherwise. + return has('win16') || has('win32') || has('win64') +endfunction + +function! xolox#misc#os#find_vim(...) " {{{1 + " Returns the program name of Vim as a string. On Windows and UNIX this just + " [v:progname] [] as an absolute pathname while on Mac OS X there is + " some special magic to find MacVim's executable even though it's usually + " not on the executable search path. If you want, you can override the + " value returned from this function by setting the global variable + " `g:xolox#misc#os#vim_progname`. + " + " By default the choice of console Vim vs graphical Vim is made based on + " the value of [v:progname] [], but if you have a preference you can pass + " the string `vim` or `gvim` as the first and only argument. + " + " [v:progname]: http://vimdoc.sourceforge.net/htmldoc/eval.html#v:progname + if exists('a:1') + let program_name = a:1 + else + let program_name = v:progname + endif + if exists('g:xolox#misc#os#vim_progname') + let pathname = g:xolox#misc#os#vim_progname + else + let pathname = '' + endif + if empty(pathname) && xolox#misc#os#is_mac() + " Special handling for Mac OS X where MacVim is usually not on the $PATH. + " This always returns the "Vim" executable and not "MacVim" (regardless of + " the caller's preference) because "MacVim" has funky dock magic going on. + call xolox#misc#msg#debug("vim-misc %s: Trying MacVim workaround to find Vim executable ..", g:xolox#misc#version) + let segments = xolox#misc#path#split($VIMRUNTIME) + if segments[-3:] == ['Resources', 'vim', 'runtime'] + let pathname = xolox#misc#path#join(segments[0:-4] + ['MacOS', 'Vim']) + call xolox#misc#msg#debug("vim-misc %s: The MacVim workaround resulted in the Vim executable %s.", g:xolox#misc#version, string(pathname)) + endif + endif + if empty(pathname) + " Default logic. + call xolox#misc#msg#debug("vim-misc %s: Looking for Vim executable named %s on search path ..", g:xolox#misc#version, string(program_name)) + let candidates = xolox#misc#path#which(program_name) + if !empty(candidates) + call xolox#misc#msg#debug("vim-misc %s: Found %i candidate(s) on search path: %s.", g:xolox#misc#version, len(candidates), string(candidates)) + let pathname = candidates[0] + endif + endif + call xolox#misc#msg#debug("vim-misc %s: Reporting Vim executable %s.", g:xolox#misc#version, string(pathname)) + return pathname +endfunction + +function! xolox#misc#os#exec(options) " {{{1 + " Execute an external command (hiding the console on Microsoft Windows when + " my [vim-shell plug-in] [vim-shell] is installed). + " + " Expects a dictionary with the following key/value pairs as the first + " argument: + " + " - **command** (required): The command line to execute + " - **async** (optional): set this to 1 (true) to execute the command in the + " background (asynchronously) + " - **stdin** (optional): a string or list of strings with the input for the + " external command + " - **check** (optional): set this to 0 (false) to disable checking of the + " exit code of the external command (by default an exception will be + " raised when the command fails) + " + " Returns a dictionary with one or more of the following key/value pairs: + " + " - **command** (always available): the generated command line that was used + " to run the external command + " - **exit_code** (only in synchronous mode): the exit status of the + " external command (an integer, zero on success) + " - **stdout** (only in synchronous mode): the output of the command on the + " standard output stream (a list of strings, one for each line) + " - **stderr** (only in synchronous mode): the output of the command on the + " standard error stream (as a list of strings, one for each line) + " + " [vim-shell]: http://peterodding.com/code/vim/shell/ + try + + " Unpack the options. + let cmd = a:options['command'] + let async = get(a:options, 'async', 0) + + " We need to know in a couple of places whether we are on Windows. + let is_win = xolox#misc#os#is_win() + + " Use vim-shell so we don't pop up a console window on Windows? If the + " caller specifically asks us *not* to use vim-shell, we'll respect that + " choice; this is very useful for automated tests :-). + if get(a:options, 'use_dll', 1) == 0 + let use_dll = 0 + else + let use_dll = xolox#misc#os#can_use_dll() + endif + + " Decide whether to redirect the standard output and standard error + " streams to temporary files. + let redirect_output = !async && (use_dll || !is_win) + + " Write the input for the external command to a temporary file? + if has_key(a:options, 'stdin') && use_dll + let tempin = tempname() + if type(a:options['stdin']) == type([]) + let lines = a:options['stdin'] + else + let lines = split(a:options['stdin'], "\n") + endif + call writefile(lines, tempin) + let cmd .= ' < ' . xolox#misc#escape#shell(tempin) + endif + + " Redirect the standard output and/or standard error streams of the + " external process to temporary files? (only in synchronous mode) + if redirect_output + let tempout = tempname() + let temperr = tempname() + let cmd = printf('(%s) 1>%s 2>%s', cmd, xolox#misc#escape#shell(tempout), xolox#misc#escape#shell(temperr)) + endif + + " Use vim-shell or system() to execute the external command? + if use_dll + call xolox#misc#msg#debug("vim-misc %s: Executing external command using compiled DLL: %s", g:xolox#misc#version, cmd) + let exit_code = xolox#shell#execute_with_dll(cmd, async) + else + + " Enable asynchronous mode (very platform specific). + if async + if is_win + let cmd = printf('start /b %s', cmd) + elseif has('unix') + let cmd = printf('(%s) &', cmd) + else + call xolox#misc#msg#warn("vim-misc %s: I don't know how to execute the command %s asynchronously on your platform! Falling back to synchronous mode...", g:xolox#misc#version, cmd) + endif + endif + + " On UNIX we explicitly execute the command line using 'sh' instead of + " the default shell, because we assume that standard output and standard + " error can be redirected separately, but (t)csh does not support this + " (and it might be the default shell). + if has('unix') + call xolox#misc#msg#debug("vim-misc %s: Generated shell expression: %s", g:xolox#misc#version, cmd) + let cmd = printf('sh -c %s', xolox#misc#escape#shell(cmd)) + endif + + " Let the user know what's happening (in case they're interested). + if async && is_win + call xolox#misc#msg#debug("vim-misc %s: Executing external command using !start command: %s", g:xolox#misc#version, cmd) + silent execute '!' . cmd + else + call xolox#misc#msg#debug("vim-misc %s: Executing external command using system() function: %s", g:xolox#misc#version, cmd) + let arguments = [cmd] + if has_key(a:options, 'stdin') + if type(a:options['stdin']) == type([]) + call add(arguments, join(a:options['stdin'], "\n")) + else + call add(arguments, a:options['stdin']) + endif + endif + let stdout = call('system', arguments) + let exit_code = v:shell_error + endif + + endif + + " Return the results as a dictionary with one or more key/value pairs. + let result = {'command': cmd} + if !async + let result['exit_code'] = exit_code + " Get the standard output of the command. + if redirect_output + let result['stdout'] = s:readfile(tempout, 'standard output', a:options['command']) + elseif exists('stdout') + let result['stdout'] = split(stdout, "\n") + else + let result['stdout'] = [] + endif + " Get the standard error of the command. + if exists('temperr') + let result['stderr'] = s:readfile(temperr, 'standard error', a:options['command']) + else + let result['stderr'] = [] + endif + " If we just executed a synchronous command and the caller didn't + " specifically ask us *not* to check the exit code of the external + " command, we'll do so now. The idea here is that it should be easy + " to 'do the right thing'. + if get(a:options, 'check', 1) && exit_code != 0 + " Prepare an error message with enough details so the user can investigate. + let msg = printf("vim-misc %s: External command failed with exit code %d!", g:xolox#misc#version, result['exit_code']) + let msg .= printf("\nCommand line: %s", result['command']) + " If the external command reported an error, we'll include it in our message. + if !empty(result['stderr']) + " This is where we would normally expect to find an error message. + let msg .= printf("\nOutput on standard output stream:\n%s", join(result['stderr'], "\n")) + elseif !empty(result['stdout']) + " Exuberant Ctags on Windows XP reports errors on standard output :-x. + let msg .= printf("\nOutput on standard error stream:\n%s", join(result['stdout'], "\n")) + endif + throw msg + endif + endif + return result + + finally + " Cleanup any temporary files we created. + for name in ['tempin', 'tempout', 'temperr'] + if exists(name) + call delete({name}) + endif + endfor + endtry + +endfunction + +function! xolox#misc#os#can_use_dll() " {{{1 + " If a) we're on Microsoft Windows, b) the vim-shell plug-in is installed + " and c) the compiled DLL included in vim-shell works, we can use the + " vim-shell plug-in to execute external commands! Returns 1 (true) + " if we can use the DLL, 0 (false) otherwise. + let can_use_dll = 0 + try + let can_use_dll = xolox#shell#can_use_dll() + catch /^Vim\%((\a\+)\)\=:E117/ + " Silence E117. + endtry + return can_use_dll +endfunction + +function! s:readfile(fname, label, cmd) " {{{1 + try + return readfile(a:fname) + catch + call xolox#misc#msg#warn("vim-misc %s: Failed to read temporary file (%s) with %s of external command: %s! (external command: %s)", g:xolox#misc#version, a:fname, a:label, v:exception, a:cmd) + return [] + endtry +endfunction + +" vim: ts=2 sw=2 et diff --git a/sources_non_forked/vim-misc/autoload/xolox/misc/path.vim b/sources_non_forked/vim-misc/autoload/xolox/misc/path.vim new file mode 100644 index 00000000..82cdf0a0 --- /dev/null +++ b/sources_non_forked/vim-misc/autoload/xolox/misc/path.vim @@ -0,0 +1,263 @@ +" Pathname manipulation functions. +" +" Author: Peter Odding +" Last Change: June 25, 2013 +" URL: http://peterodding.com/code/vim/misc/ + +let s:windows_compatible = xolox#misc#os#is_win() +let s:mac_os_x_compatible = xolox#misc#os#is_mac() + +function! xolox#misc#path#which(...) " {{{1 + " Scan the executable search path (`$PATH`) for one or more external + " programs. Expects one or more string arguments with program names. Returns + " a list with the absolute pathnames of all found programs. Here's an + " example: + " + " :echo xolox#misc#path#which('gvim', 'vim') + " ['/usr/local/bin/gvim', + " '/usr/bin/gvim', + " '/usr/local/bin/vim', + " '/usr/bin/vim'] + let extensions = s:windows_compatible ? split($PATHEXT, ';') : [''] + let matches = [] + let checked = {} + for program in a:000 + for directory in split($PATH, s:windows_compatible ? ';' : ':') + let directory = xolox#misc#path#absolute(directory) + if isdirectory(directory) + let found = 0 + for extension in extensions + let path = xolox#misc#path#merge(directory, program . extension) + if executable(path) + call add(matches, path) + let found = 1 + endif + endfor + if s:windows_compatible && ! found + " Maybe the extension is already contained in program; try without + " $PATHEXT. + let path = xolox#misc#path#merge(directory, program) + if executable(path) + call add(matches, path) + endif + endif + endif + endfor + endfor + return xolox#misc#list#unique(matches) +endfunction + +function! xolox#misc#path#split(path) " {{{1 + " Split a pathname (the first and only argument) into a list of pathname + " components. + " + " On Windows, pathnames starting with two slashes or backslashes are UNC + " paths where the leading slashes are significant... In this case we split + " like this: + " + " - Input: `'//server/share/directory'` + " - Result: `['//server', 'share', 'directory']` + " + " Everything except Windows is treated like UNIX until someone has a better + " suggestion :-). In this case we split like this: + " + " - Input: `'/foo/bar/baz'` + " - Result: `['/', 'foo', 'bar', 'baz']` + " + " To join a list of pathname components back into a single pathname string, + " use the `xolox#misc#path#join()` function. + if type(a:path) == type('') + if s:windows_compatible + if a:path =~ '^[\/][\/]' + " UNC pathname. + return split(a:path, '\%>2c[\/]\+') + else + " If it's not a UNC path we can simply split on slashes & backslashes. + return split(a:path, '[\/]\+') + endif + else + " Everything else is treated as UNIX. + let absolute = (a:path =~ '^/') + let segments = split(a:path, '/\+') + return absolute ? insert(segments, '/') : segments + endif + endif + return [] +endfunction + +function! xolox#misc#path#join(parts) " {{{1 + " Join a list of pathname components (the first and only argument) into a + " single pathname string. This is the counterpart to the + " `xolox#misc#path#split()` function and it expects a list of pathname + " components as returned by `xolox#misc#path#split()`. + if type(a:parts) == type([]) + if s:windows_compatible + return join(a:parts, xolox#misc#path#directory_separator()) + elseif get(a:parts, 0) == '/' + " Absolute path on UNIX (non-Windows). + return '/' . join(a:parts[1:], '/') + else + " Relative path on UNIX (non-Windows). + return join(a:parts, '/') + endif + endif + return '' +endfunction + +function! xolox#misc#path#directory_separator() " {{{1 + " Find the preferred directory separator for the platform and settings. + return exists('+shellslash') && &shellslash ? '/' : '\' +endfunction + +function! xolox#misc#path#absolute(path) " {{{1 + " Canonicalize and resolve a pathname, *regardless of whether it exists*. + " This is intended to support string comparison to determine whether two + " pathnames point to the same directory or file. + if type(a:path) == type('') + let path = a:path + " Make the pathname absolute. + if path =~ '^\~' + " Expand ~ to $HOME. + let path = $HOME . '/' . path[1:] + elseif xolox#misc#path#is_relative(path) + " Make relative pathnames absolute. + let path = getcwd() . '/' . path + endif + " Resolve symbolic links to find the canonical pathname. In my tests this + " also removes all symbolic pathname segments (`.' and `..'), even when + " the pathname does not exist. Also there used to be a bug in resolve() + " where it wouldn't resolve pathnames ending in a directory separator. + " Since it's not much trouble to work around, that's what we do. + let path = resolve(substitute(path, s:windows_compatible ? '[\/]\+$' : '/\+$', '', '')) + " Normalize directory separators (especially relevant on Windows). + let parts = xolox#misc#path#split(path) + if s:windows_compatible && parts[0] =~ '^[\/][\/]' + " Also normalize the two leading "directory separators" (I'm not + " sure what else to call them :-) in Windows UNC pathnames. + let parts[0] = repeat(xolox#misc#path#directory_separator(), 2) . parts[0][2:] + endif + return xolox#misc#path#join(parts) + endif + return '' +endfunction + +function! xolox#misc#path#relative(path, base) " {{{1 + " Make an absolute pathname (the first argument) relative to a directory + " (the second argument). + let path = xolox#misc#path#split(a:path) + let base = xolox#misc#path#split(a:base) + while path != [] && base != [] && path[0] == base[0] + call remove(path, 0) + call remove(base, 0) + endwhile + let distance = repeat(['..'], len(base)) + return xolox#misc#path#join(distance + path) +endfunction + + +function! xolox#misc#path#merge(parent, child, ...) " {{{1 + " Join a directory pathname and filename into a single pathname. + if type(a:parent) == type('') && type(a:child) == type('') + " TODO Use xolox#misc#path#is_relative()? + if s:windows_compatible + let parent = substitute(a:parent, '[\\/]\+$', '', '') + let child = substitute(a:child, '^[\\/]\+', '', '') + return parent . '\' . child + else + let parent = substitute(a:parent, '/\+$', '', '') + let child = substitute(a:child, '^/\+', '', '') + return parent . '/' . child + endif + endif + return '' +endfunction + +function! xolox#misc#path#commonprefix(paths) " {{{1 + " Find the common prefix of path components in a list of pathnames. + let common = xolox#misc#path#split(a:paths[0]) + for path in a:paths + let index = 0 + for segment in xolox#misc#path#split(path) + if len(common) <= index + break + elseif common[index] != segment + call remove(common, index, -1) + break + endif + let index += 1 + endfor + endfor + return xolox#misc#path#join(common) +endfunction + +function! xolox#misc#path#encode(path) " {{{1 + " Encode a pathname so it can be used as a filename. This uses URL encoding + " to encode special characters. + if s:windows_compatible + let mask = '[*|\\/:"<>?%]' + elseif s:mac_os_x_compatible + let mask = '[\\/%:]' + else + let mask = '[\\/%]' + endif + return substitute(a:path, mask, '\=printf("%%%x", char2nr(submatch(0)))', 'g') +endfunction + + +function! xolox#misc#path#decode(encoded_path) " {{{1 + " Decode a pathname previously encoded with `xolox#misc#path#encode()`. + return substitute(a:encoded_path, '%\(\x\x\?\)', '\=nr2char("0x" . submatch(1))', 'g') +endfunction + +" xolox#misc#path#equals(a, b) - Check whether two pathnames point to the same file. {{{1 + +if s:windows_compatible + function! xolox#misc#path#equals(a, b) + return a:a ==? a:b || xolox#misc#path#absolute(a:a) ==? xolox#misc#path#absolute(a:b) + endfunction +else + function! xolox#misc#path#equals(a, b) + return a:a ==# a:b || xolox#misc#path#absolute(a:a) ==# xolox#misc#path#absolute(a:b) + endfunction +endif + +function! xolox#misc#path#is_relative(path) " {{{1 + " Returns true (1) when the pathname given as the first argument is + " relative, false (0) otherwise. + if a:path =~ '^\w\+://' + return 0 + elseif s:windows_compatible + return a:path !~ '^\(\w:\|[\\/]\)' + else + return a:path !~ '^/' + endif +endfunction + +function! xolox#misc#path#tempdir() " {{{1 + " Create a temporary directory and return the pathname of the directory. + if !exists('s:tempdir_counter') + let s:tempdir_counter = 1 + endif + if exists('*mkdir') + if s:windows_compatible + let template = $TMP . '\vim_tempdir_' + elseif filewritable('/tmp') == 2 + let template = '/tmp/vim_tempdir_' + endif + endif + if !exists('template') + throw "xolox#misc#path#tempdir() hasn't been implemented on your platform!" + endif + while 1 + let directory = template . s:tempdir_counter + try + call mkdir(directory, '', 0700) + return directory + catch /^Vim\%((\a\+)\)\=:E739/ + " Keep looking for a non-existing directory. + endtry + let s:tempdir_counter += 1 + endwhile +endfunction + +" vim: ts=2 sw=2 et diff --git a/sources_non_forked/vim-misc/autoload/xolox/misc/str.vim b/sources_non_forked/vim-misc/autoload/xolox/misc/str.vim new file mode 100644 index 00000000..4623de93 --- /dev/null +++ b/sources_non_forked/vim-misc/autoload/xolox/misc/str.vim @@ -0,0 +1,69 @@ +" String handling. +" +" Author: Peter Odding +" Last Change: June 23, 2013 +" URL: http://peterodding.com/code/vim/misc/ + +function! xolox#misc#str#slug(s) " {{{1 + " Convert a string to a "slug" - something that can be safely used in + " filenames and URLs without worrying about quoting/escaping of special + " characters. + return join(split(tolower(a:s), '\W\+'), '-') +endfunction + +function! xolox#misc#str#ucfirst(s) " {{{1 + " Uppercase the first character in a string (the first argument). + return substitute(a:s, '^.', '\U\0', '') +endfunction + +function! xolox#misc#str#compact(s) " {{{1 + " Compact whitespace in a string (the first argument). + return join(split(a:s), " ") +endfunction + +function! xolox#misc#str#trim(s) " {{{1 + " Trim all whitespace from the start and end of a string (the first + " argument). + return substitute(a:s, '^\_s*\(.\{-}\)\_s*$', '\1', '') +endfunction + +function! xolox#misc#str#indent(text, num_spaces) " {{{1 + " Indent all lines in a multi-line string (the first argument) with a + " specific number of *space characters* (the second argument, an integer). + let lines = split(a:text, "\n") + let indent = repeat(' ', a:num_spaces) + let [idx, limit] = [0, len(lines)] + while idx < limit + if lines[idx] =~ '\S' + let lines[idx] = indent . lines[idx] + endif + let idx += 1 + endwhile + return join(lines, "\n") +endfunction + +function! xolox#misc#str#dedent(text) " {{{1 + " Remove common whitespace from a multi line string. + let lines = split(a:text, "\n") + " First we need to determine the common indentation of all non-empty lines. + for line in lines + if line =~ '\S' + let indent = matchstr(line, '^\s*') + if !exists('common_indent') + let common_indent = indent + elseif len(indent) < len(common_indent) + let common_indent = indent + endif + endif + endfor + " Now we will strip the common indentation. + let [idx, limit] = [0, len(lines)] + let pattern = '^' . common_indent + while idx < limit + let lines[idx] = substitute(lines[idx], pattern, '', '') + let idx += 1 + endwhile + return join(lines, "\n") +endfunction + +" vim: ts=2 sw=2 et diff --git a/sources_non_forked/vim-misc/autoload/xolox/misc/test.vim b/sources_non_forked/vim-misc/autoload/xolox/misc/test.vim new file mode 100644 index 00000000..df4d4651 --- /dev/null +++ b/sources_non_forked/vim-misc/autoload/xolox/misc/test.vim @@ -0,0 +1,125 @@ +" Test runner & infrastructure for Vim plug-ins. +" +" Author: Peter Odding +" Last Change: June 2, 2013 +" URL: http://peterodding.com/code/vim/misc/ +" +" The Vim auto-load script `autoload/xolox/misc/test.vim` contains +" infrastructure that can be used to run an automated Vim plug-in test suite. +" It provides a framework for running test functions, keeping track of the +" test status, making assertions and reporting test results to the user. + +" The process handling tests cannot use the built-in "echo" command from the +" Windows shell because it has way too much idiosyncrasies for me to put up +" with. Seriously. Instead I'm using an "echo.exe" from the UnxUtils project. +if xolox#misc#os#is_win() + let g:xolox#misc#test#echo = xolox#misc#escape#shell(xolox#misc#path#merge(expand(':p:h'), 'echo.exe')) +else + let g:xolox#misc#test#echo = 'echo' +endif + +function! xolox#misc#test#reset() " {{{1 + " Reset counters for executed tests and passed/failed assertions. + let s:num_executed = 0 + let s:num_passed = 0 + let s:num_failed = 0 + let s:tests_started_at = xolox#misc#timer#start() +endfunction + +function! xolox#misc#test#summarize() " {{{1 + " Print a summary of test results, to be interpreted interactively. + call s:delimit_output() + call xolox#misc#timer#force("Took %s to run %s: %s passed, %s failed.", + \ s:tests_started_at, + \ xolox#misc#format#pluralize(s:num_executed, 'test', 'tests'), + \ xolox#misc#format#pluralize(s:num_passed, 'assertion', 'assertions'), + \ xolox#misc#format#pluralize(s:num_failed, 'assertion', 'assertions')) +endfunction + +function! xolox#misc#test#wrap(function) " {{{1 + " Call a function in a try/catch block and prevent exceptions from bubbling. + " The name of the function should be passed as the first and only argument; + " it should be a string containing the name of a Vim auto-load function. + let num_failed = s:num_failed + try + if s:num_passed + s:num_failed > 0 + call s:delimit_output() + endif + let test_name = split(a:function, '#')[-1] + let test_name = substitute(test_name, '_', ' ', 'g') + let test_name = substitute(test_name, '^.', '\U\0', '') + call xolox#misc#msg#info("Running test #%i: %s", s:num_executed + 1, test_name) + call call(a:function, []) + catch + call xolox#misc#msg#warn("Test %s raised exception:", a:function) + call xolox#misc#msg#warn("%s", v:exception) + call xolox#misc#msg#warn("(at %s)", v:throwpoint) + if num_failed == s:num_failed + " Make sure exceptions are counted as failures, but don't inflate the + " number of failed assertions when it's not needed (it can produce + " confusing test output). + call xolox#misc#test#failed() + endif + endtry + let s:num_executed += 1 +endfunction + +function! xolox#misc#test#passed() " {{{1 + " Record a test which succeeded. + let s:num_passed += 1 + call s:print_feedback() +endfunction + +function! xolox#misc#test#failed() " {{{1 + " Record a test which failed. + let s:num_failed += 1 + call s:print_feedback() +endfunction + +function! s:delimit_output() " {{{1 + " Print a delimiter between output of tests. + call xolox#misc#msg#info("%s", repeat("-", 40)) +endfunction + +function! s:print_feedback() " {{{1 + " Let the user know the status of the test suite. + call xolox#misc#msg#info("Test status: %s passed, %s failed ..", + \ xolox#misc#format#pluralize(s:num_passed, 'assertion', 'assertions'), + \ xolox#misc#format#pluralize(s:num_failed, 'assertion', 'assertions')) +endfunction + +function! xolox#misc#test#assert_true(expr) " {{{1 + " Check whether an expression is true. + if a:expr + call xolox#misc#test#passed() + else + call xolox#misc#test#failed() + let msg = "Expected value to be true, got %s instead" + throw printf(msg, string(a:expr)) + endif +endfunction + +function! xolox#misc#test#assert_equals(expected, received) " {{{1 + " Check whether two values are the same. + call xolox#misc#test#assert_same_type(a:expected, a:received) + if a:expected == a:received + call xolox#misc#test#passed() + else + call xolox#misc#test#failed() + let msg = "Expected value %s, received value %s!" + throw printf(msg, string(a:expected), string(a:received)) + endif +endfunction + +function! xolox#misc#test#assert_same_type(expected, received) " {{{1 + " Check whether two values are of the same type. + if type(a:expected) == type(a:received) + call xolox#misc#test#passed() + else + call xolox#misc#test#failed() + let msg = "Expected value of same type as %s, got value %s!" + throw printf(msg, string(a:expected), string(a:received)) + endif +endfunction + +call xolox#misc#test#reset() diff --git a/sources_non_forked/vim-misc/autoload/xolox/misc/tests.vim b/sources_non_forked/vim-misc/autoload/xolox/misc/tests.vim new file mode 100644 index 00000000..f3af1cb8 --- /dev/null +++ b/sources_non_forked/vim-misc/autoload/xolox/misc/tests.vim @@ -0,0 +1,301 @@ +" Tests for the miscellaneous Vim scripts. +" +" Author: Peter Odding +" Last Change: June , 2013 +" URL: http://peterodding.com/code/vim/misc/ +" +" The Vim auto-load script `autoload/xolox/misc/tests.vim` contains the +" automated test suite of the miscellaneous Vim scripts. Right now the +" coverage is not very high yet, but this will improve over time. + +let s:use_dll = 0 +let s:can_use_dll = xolox#misc#os#can_use_dll() + +function! xolox#misc#tests#run() " {{{1 + " Run the automated test suite of the miscellaneous Vim scripts. To be used + " interactively. Intended to be safe to execute irrespective of context. + call xolox#misc#test#reset() + " Run the tests. + call s:test_string_escaping() + call s:test_list_handling() + call s:test_option_handling() + call s:test_command_execution() + call s:test_string_handling() + call s:test_version_handling() + " Report a short summary to the user. + call xolox#misc#test#summarize() +endfunction + +function! s:wrap_exec_test(function) + " Wrapper for tests that use xolox#misc#os#exec(). If we're on Windows and + " the vim-shell plug-in is installed, the test will be run twice: Once with + " vim-shell disabled and once with vim-shell enabled. This makes sure that + " all code paths are tested as much as possible. + call xolox#misc#msg#debug("vim-misc %s: Temporarily disabling vim-shell so we can test vim-misc ..", g:xolox#misc#version) + let s:use_dll = 0 + call xolox#misc#test#wrap(a:function) + if s:can_use_dll + call xolox#misc#msg#debug("vim-misc %s: Re-enabling vim-shell so we can test that as well ..", g:xolox#misc#version) + let s:use_dll = 1 + call xolox#misc#test#wrap(a:function) + endif +endfunction + +" Tests for autoload/xolox/misc/escape.vim {{{1 + +function! s:test_string_escaping() + call xolox#misc#test#wrap('xolox#misc#tests#pattern_escaping') + call xolox#misc#test#wrap('xolox#misc#tests#substitute_escaping') + call s:wrap_exec_test('xolox#misc#tests#shell_escaping') +endfunction + +function! xolox#misc#tests#pattern_escaping() " {{{2 + " Test escaping of regular expression patterns with + " `xolox#misc#escape#pattern()`. + call xolox#misc#test#assert_equals('foo [qux] baz', substitute('foo [bar] baz', xolox#misc#escape#pattern('[bar]'), '[qux]', 'g')) + call xolox#misc#test#assert_equals('also very nasty', substitute('also ~ nasty', xolox#misc#escape#pattern('~'), 'very', 'g')) +endfunction + +function! xolox#misc#tests#substitute_escaping() " {{{2 + " Test escaping of substitution strings with + " `xolox#misc#escape#substitute()`. + call xolox#misc#test#assert_equals('nasty & tricky stuff', substitute('tricky stuff', 'tricky', xolox#misc#escape#substitute('nasty & tricky'), 'g')) +endfunction + +function! xolox#misc#tests#shell_escaping() " {{{2 + " Test escaping of shell arguments with `xolox#misc#escape#shell()`. + let expected_value = 'this < is > a | very " scary ^ string '' indeed' + let result = xolox#misc#os#exec({'command': g:xolox#misc#test#echo . ' ' . xolox#misc#escape#shell(expected_value), 'use_dll': s:use_dll}) + call xolox#misc#test#assert_equals(0, result['exit_code']) + call xolox#misc#test#assert_equals(0, result['exit_code']) + call xolox#misc#test#assert_same_type([], result['stdout']) + call xolox#misc#test#assert_equals(1, len(result['stdout'])) + " XXX On Windows using system() there's a trailing space I can't explain. + " However the point of this test was to show that all characters pass + " through unharmed, so for now I'll just ignore the space :-) + call xolox#misc#test#assert_equals(expected_value, xolox#misc#str#trim(result['stdout'][0])) +endfunction + +" Tests for autoload/xolox/misc/list.vim {{{1 + +function! s:test_list_handling() + call xolox#misc#test#wrap('xolox#misc#tests#making_a_list_unique') + call xolox#misc#test#wrap('xolox#misc#tests#binary_insertion') +endfunction + +function! xolox#misc#tests#making_a_list_unique() " {{{2 + " Test removing of duplicate values from lists with + " `xolox#misc#list#unique()`. + call xolox#misc#test#assert_equals([1, 2, 3, 4, 5], xolox#misc#list#unique([1, 1, 2, 3, 3, 4, 5, 5])) + " Should work for strings just as well. And it should preserve order. + call xolox#misc#test#assert_equals(['a', 'b', 'c'], xolox#misc#list#unique(['a', 'a', 'b', 'b', 'c'])) + " Just to make sure that lists without duplicate values pass through unharmed. + call xolox#misc#test#assert_equals([1, 2, 3, 4, 5], xolox#misc#list#unique([1, 2, 3, 4, 5])) +endfunction + +function! xolox#misc#tests#binary_insertion() " {{{2 + " Test the binary insertion algorithm implemented in + " `xolox#misc#list#binsert()`. + let list = ['a', 'B', 'e'] + " Insert 'c' (should end up between 'B' and 'e'). + call xolox#misc#list#binsert(list, 'c', 1) + call xolox#misc#test#assert_equals(['a', 'B', 'c', 'e'], list) + " Insert 'D' (should end up between 'c' and 'e'). + call xolox#misc#list#binsert(list, 'D', 1) + call xolox#misc#test#assert_equals(['a', 'B', 'c', 'D', 'e'], list) + " Insert 'f' (should end up after 'e', at the end). + call xolox#misc#list#binsert(list, 'f', 1) + call xolox#misc#test#assert_equals(['a', 'B', 'c', 'D', 'e', 'f'], list) +endfunction + +" Tests for autoload/xolox/misc/option.vim {{{1 + +function! s:test_option_handling() + call xolox#misc#test#wrap('xolox#misc#tests#getting_configuration_options') + call xolox#misc#test#wrap('xolox#misc#tests#splitting_of_multi_valued_options') + call xolox#misc#test#wrap('xolox#misc#tests#joining_of_multi_valued_options') +endfunction + +function! xolox#misc#tests#getting_configuration_options() " {{{2 + " Test getting of scoped plug-in configuration "options" with + " `xolox#misc#option#get()`. + let magic_name = 'a_variable_that_none_would_use' + call xolox#misc#test#assert_equals(0, xolox#misc#option#get(magic_name)) + " Test custom default values. + call xolox#misc#test#assert_equals([], xolox#misc#option#get(magic_name, [])) + " Set the option as a global variable. + let global_value = 'global variable' + let g:{magic_name} = global_value + call xolox#misc#test#assert_equals(global_value, xolox#misc#option#get(magic_name)) + " Set the option as a buffer local variable, thereby shadowing the global. + let local_value = 'buffer local variable' + let b:{magic_name} = local_value + call xolox#misc#test#assert_equals(local_value, xolox#misc#option#get(magic_name)) + " Sanity check that it's possible to unshadow as well. + unlet b:{magic_name} + call xolox#misc#test#assert_equals(global_value, xolox#misc#option#get(magic_name)) + " Cleanup after ourselves. + unlet g:{magic_name} + call xolox#misc#test#assert_equals(0, xolox#misc#option#get(magic_name)) +endfunction + +function! xolox#misc#tests#splitting_of_multi_valued_options() " {{{2 + " Test splitting of multi-valued Vim options with + " `xolox#misc#option#split()`. + call xolox#misc#test#assert_equals([], xolox#misc#option#split('')) + call xolox#misc#test#assert_equals(['just one value'], xolox#misc#option#split('just one value')) + call xolox#misc#test#assert_equals(['value 1', 'value 2'], xolox#misc#option#split('value 1,value 2')) + call xolox#misc#test#assert_equals(['value 1', 'value 2', 'tricky,value'], xolox#misc#option#split('value 1,value 2,tricky\,value')) +endfunction + +function! xolox#misc#tests#joining_of_multi_valued_options() " {{{2 + " Test joining of multi-valued Vim options with `xolox#misc#option#join()`. + call xolox#misc#test#assert_equals('', xolox#misc#option#join([])) + call xolox#misc#test#assert_equals('just one value', xolox#misc#option#join(['just one value'])) + call xolox#misc#test#assert_equals('value 1,value 2', xolox#misc#option#join(['value 1', 'value 2'])) + call xolox#misc#test#assert_equals('value 1,value 2,tricky\,value', xolox#misc#option#join(['value 1', 'value 2', 'tricky,value'])) +endfunction + +" Tests for autoload/xolox/misc/os.vim {{{1 + +function! s:test_command_execution() + call xolox#misc#test#wrap('xolox#misc#tests#finding_vim_on_the_search_path') + call s:wrap_exec_test('xolox#misc#tests#synchronous_command_execution') + call s:wrap_exec_test('xolox#misc#tests#synchronous_command_execution_with_stderr') + call s:wrap_exec_test('xolox#misc#tests#synchronous_command_execution_with_raising_of_errors') + call s:wrap_exec_test('xolox#misc#tests#synchronous_command_execution_without_raising_errors') + call s:wrap_exec_test('xolox#misc#tests#asynchronous_command_execution') +endfunction + +function! xolox#misc#tests#finding_vim_on_the_search_path() " {{{2 + " Test looking up Vim's executable on the search path using [v:progname] [] + " with `xolox#misc#os#find_vim()`. + " + " [v:progname]: http://vimdoc.sourceforge.net/htmldoc/eval.html#v:progname + let pathname = xolox#misc#os#find_vim() + call xolox#misc#test#assert_same_type('', pathname) + call xolox#misc#test#assert_true(executable(pathname)) +endfunction + +function! xolox#misc#tests#synchronous_command_execution() " {{{2 + " Test basic functionality of synchronous command execution with + " `xolox#misc#os#exec()`. + let result = xolox#misc#os#exec({'command': printf('%s output', g:xolox#misc#test#echo), 'use_dll': s:use_dll}) + call xolox#misc#test#assert_same_type({}, result) + call xolox#misc#test#assert_equals(0, result['exit_code']) + call xolox#misc#test#assert_equals(['output'], result['stdout']) +endfunction + +function! xolox#misc#tests#synchronous_command_execution_with_stderr() " {{{2 + " Test basic functionality of synchronous command execution with + " `xolox#misc#os#exec()` including the standard error stream (not available + " on Windows when vim-shell is not installed). + if !(xolox#misc#os#is_win() && !s:use_dll) + let result = xolox#misc#os#exec({'command': printf('%s output && %s errors >&2', g:xolox#misc#test#echo, g:xolox#misc#test#echo), 'use_dll': s:use_dll}) + call xolox#misc#test#assert_same_type({}, result) + call xolox#misc#test#assert_equals(0, result['exit_code']) + call xolox#misc#test#assert_equals(['output'], result['stdout']) + call xolox#misc#test#assert_equals(['errors'], result['stderr']) + endif +endfunction + +function! xolox#misc#tests#synchronous_command_execution_with_raising_of_errors() " {{{2 + " Test raising of errors during synchronous command execution with + " `xolox#misc#os#exec()`. + try + call xolox#misc#os#exec({'command': 'exit 1', 'use_dll': s:use_dll}) + call xolox#misc#test#assert_true(0) + catch + call xolox#misc#test#assert_true(1) + endtry +endfunction + +function! xolox#misc#tests#synchronous_command_execution_without_raising_errors() " {{{2 + " Test synchronous command execution without raising of errors with + " `xolox#misc#os#exec()`. + try + let result = xolox#misc#os#exec({'command': 'exit 42', 'check': 0, 'use_dll': s:use_dll}) + call xolox#misc#test#assert_true(1) + call xolox#misc#test#assert_equals(42, result['exit_code']) + catch + call xolox#misc#test#assert_true(0) + endtry +endfunction + +function! xolox#misc#tests#asynchronous_command_execution() " {{{2 + " Test the basic functionality of asynchronous command execution with + " `xolox#misc#os#exec()`. This runs the external command `mkdir` and tests + " that the side effect of creating the directory takes place. This might + " seem like a peculiar choice, but it's one of the few 100% portable + " commands (Windows + UNIX) that doesn't involve input/output streams. + let temporary_directory = xolox#misc#path#tempdir() + let random_name = printf('%i', localtime()) + let expected_directory = xolox#misc#path#merge(temporary_directory, random_name) + let command = 'mkdir ' . xolox#misc#escape#shell(expected_directory) + let result = xolox#misc#os#exec({'command': command, 'async': 1, 'use_dll': s:use_dll}) + call xolox#misc#test#assert_same_type({}, result) + " Make sure the command is really executed. + let timeout = localtime() + 30 + while !isdirectory(expected_directory) && localtime() < timeout + sleep 500 m + endwhile + call xolox#misc#test#assert_true(isdirectory(expected_directory)) +endfunction + +" Tests for autoload/xolox/misc/str.vim {{{1 + +function! s:test_string_handling() + call xolox#misc#test#wrap('xolox#misc#tests#string_case_transformation') + call xolox#misc#test#wrap('xolox#misc#tests#string_whitespace_compaction') + call xolox#misc#test#wrap('xolox#misc#tests#string_whitespace_trimming') + call xolox#misc#test#wrap('xolox#misc#tests#multiline_string_dedent') +endfunction + +function! xolox#misc#tests#string_case_transformation() + " Test string case transformation with `xolox#misc#str#ucfirst()`. + call xolox#misc#test#assert_equals('Foo', xolox#misc#str#ucfirst('foo')) + call xolox#misc#test#assert_equals('BAR', xolox#misc#str#ucfirst('BAR')) +endfunction + +function! xolox#misc#tests#string_whitespace_compaction() + " Test compaction of whitespace in strings with `xolox#misc#str#compact()`. + call xolox#misc#test#assert_equals('foo bar baz', xolox#misc#str#compact(' foo bar baz ')) + call xolox#misc#test#assert_equals('test', xolox#misc#str#compact("\ntest ")) +endfunction + +function! xolox#misc#tests#string_whitespace_trimming() + " Test trimming of whitespace in strings with `xolox#misc#str#trim()`. + call xolox#misc#test#assert_equals('foo bar baz', xolox#misc#str#trim("\nfoo bar baz ")) +endfunction + +function! xolox#misc#tests#multiline_string_dedent() + " Test dedenting of multi-line strings with `xolox#misc#str#dedent()`. + call xolox#misc#test#assert_equals('test', xolox#misc#str#dedent(' test')) + call xolox#misc#test#assert_equals("1\n\n2", xolox#misc#str#dedent(" 1\n\n 2")) + call xolox#misc#test#assert_equals("1\n\n 2", xolox#misc#str#dedent(" 1\n\n 2")) +endfunction + +" Tests for autoload/xolox/misc/version.vim {{{1 + +function! s:test_version_handling() + call xolox#misc#test#wrap('xolox#misc#tests#version_string_parsing') + call xolox#misc#test#wrap('xolox#misc#tests#version_string_comparison') +endfunction + +function! xolox#misc#tests#version_string_parsing() " {{{2 + " Test parsing of version strings with `xolox#misc#version#parse()`. + call xolox#misc#test#assert_equals([1], xolox#misc#version#parse('1')) + call xolox#misc#test#assert_equals([1, 5], xolox#misc#version#parse('1.5')) + call xolox#misc#test#assert_equals([1, 22, 3333, 44444, 55555], xolox#misc#version#parse('1.22.3333.44444.55555')) + call xolox#misc#test#assert_equals([1, 5], xolox#misc#version#parse('1x.5y')) +endfunction + +function! xolox#misc#tests#version_string_comparison() " {{{2 + " Test comparison of version strings with `xolox#misc#version#at_least()`. + call xolox#misc#test#assert_true(xolox#misc#version#at_least('1', '1')) + call xolox#misc#test#assert_true(!xolox#misc#version#at_least('1', '0')) + call xolox#misc#test#assert_true(xolox#misc#version#at_least('1', '2')) + call xolox#misc#test#assert_true(xolox#misc#version#at_least('1.2.3', '1.2.3')) + call xolox#misc#test#assert_true(!xolox#misc#version#at_least('1.2.3', '1.2')) + call xolox#misc#test#assert_true(xolox#misc#version#at_least('1.2.3', '1.2.4')) +endfunction diff --git a/sources_non_forked/vim-misc/autoload/xolox/misc/timer.vim b/sources_non_forked/vim-misc/autoload/xolox/misc/timer.vim new file mode 100644 index 00000000..079022ba --- /dev/null +++ b/sources_non_forked/vim-misc/autoload/xolox/misc/timer.vim @@ -0,0 +1,62 @@ +" Timing of long during operations. +" +" Author: Peter Odding +" Last Change: June 2, 2013 +" URL: http://peterodding.com/code/vim/misc/ + +if !exists('g:timer_enabled') + let g:timer_enabled = 0 +endif + +if !exists('g:timer_verbosity') + let g:timer_verbosity = 1 +endif + +let s:has_reltime = has('reltime') +let s:unique_marker = 'xolox#misc#timer#value' + +function! xolox#misc#timer#start() " {{{1 + " Start a timer. This returns a list which can later be passed to + " `xolox#misc#timer#stop()`. + return [s:unique_marker, s:has_reltime ? reltime() : localtime()] +endfunction + +function! xolox#misc#timer#stop(...) " {{{1 + " Show a formatted debugging message to the user, if the user has enabled + " increased verbosity by setting Vim's ['verbose'] [verbose] option to one + " (1) or higher. + " + " This function has the same argument handling as Vim's [printf()] [printf] + " function with one difference: At the point where you want the elapsed time + " to be embedded, you write `%s` and you pass the list returned by + " `xolox#misc#timer#start()` as an argument. + " + " [verbose]: http://vimdoc.sourceforge.net/htmldoc/options.html#'verbose' + " [printf]: http://vimdoc.sourceforge.net/htmldoc/eval.html#printf() + if (g:timer_enabled || &verbose >= g:timer_verbosity) + call call('xolox#misc#msg#info', map(copy(a:000), 's:convert_value(v:val)')) + endif +endfunction + +function! xolox#misc#timer#force(...) " {{{1 + " Show a formatted message to the user. This function has the same argument + " handling as Vim's [printf()] [printf] function with one difference: At the + " point where you want the elapsed time to be embedded, you write `%s` and + " you pass the list returned by `xolox#misc#timer#start()` as an argument. + call call('xolox#misc#msg#info', map(copy(a:000), 's:convert_value(v:val)')) +endfunction + +function! s:convert_value(value) " {{{1 + if type(a:value) == type([]) && len(a:value) == 2 && a:value[0] == s:unique_marker + if s:has_reltime + let ts = xolox#misc#str#trim(reltimestr(reltime(a:value[1]))) + else + let ts = localtime() - a:value[1] + endif + return xolox#misc#format#timestamp(ts) + else + return a:value + endif +endfunction + +" vim: ts=2 sw=2 et diff --git a/sources_non_forked/vim-misc/autoload/xolox/misc/version.vim b/sources_non_forked/vim-misc/autoload/xolox/misc/version.vim new file mode 100644 index 00000000..0f3ad673 --- /dev/null +++ b/sources_non_forked/vim-misc/autoload/xolox/misc/version.vim @@ -0,0 +1,34 @@ +" Version string handling. +" +" Author: Peter Odding +" Last Change: June 22, 2013 +" URL: http://peterodding.com/code/vim/misc/ + +function! xolox#misc#version#parse(version_string) + " Convert a version string to a list of integers. + let result = map(split(a:version_string, '\.'), 'v:val + 0') + call xolox#misc#msg#debug("vim-misc %s: Parsed version string %s into %s.", g:xolox#misc#version, string(a:version_string), string(result)) + return result +endfunction + +function! xolox#misc#version#at_least(expected_version, available_version) + " Check whether the second version string is equal to or greater than the + " first version string. Returns 1 (true) when it is, 0 (false) otherwise. + let expected_version = xolox#misc#version#parse(a:expected_version) + let available_version = xolox#misc#version#parse(a:available_version) + for idx in range(max([len(expected_version), len(available_version)])) + let expected_number = get(expected_version, idx, 0) + let available_number = get(available_version, idx, 0) + if available_number > expected_number + call xolox#misc#msg#debug("vim-misc %s: Available version (%s) is higher than expected version (%s).", g:xolox#misc#version, a:available_version, a:expected_version) + return 1 + elseif available_number < expected_number + call xolox#misc#msg#debug("vim-misc %s: Available version (%s) is lower than expected version (%s).", g:xolox#misc#version, a:available_version, a:expected_version) + return 0 + endif + endfor + call xolox#misc#msg#debug("vim-misc %s: Available version (%s) is equal to expected version (%s).", g:xolox#misc#version, a:available_version, a:expected_version) + return 1 +endfunction + +" vim: ts=2 sw=2 et diff --git a/sources_non_forked/vim-misc/doc/misc.txt b/sources_non_forked/vim-misc/doc/misc.txt new file mode 100644 index 00000000..b16d933c --- /dev/null +++ b/sources_non_forked/vim-misc/doc/misc.txt @@ -0,0 +1,866 @@ +*misc.txt* Miscellaneous auto-load Vim scripts + +=============================================================================== +Contents ~ + + 1. Introduction |misc-introduction| + 2. Installation |misc-installation| + 3. Function documentation |misc-function-documentation| + 1. Handling of special buffers |misc-handling-of-special-buffers| + 1. The |xolox#misc#buffer#is_empty()| function + 2. The |xolox#misc#buffer#prepare()| function + 3. The |xolox#misc#buffer#lock()| function + 4. The |xolox#misc#buffer#unlock()| function + 2. Tab completion for user defined commands |misc-tab-completion-for-user-defined-commands| + 1. The |xolox#misc#complete#keywords()| function + 3. String escaping functions |misc-string-escaping-functions| + 1. The |xolox#misc#escape#pattern()| function + 2. The |xolox#misc#escape#substitute()| function + 3. The |xolox#misc#escape#shell()| function + 4. Human friendly string formatting for Vim |misc-human-friendly-string-formatting-for-vim| + 1. The |xolox#misc#format#pluralize()| function + 2. The |xolox#misc#format#timestamp()| function + 5. List handling functions |misc-list-handling-functions| + 1. The |xolox#misc#list#unique()| function + 2. The |xolox#misc#list#binsert()| function + 6. Functions to interact with the user |misc-functions-to-interact-with-user| + 1. The |xolox#misc#msg#info()| function + 2. The |xolox#misc#msg#warn()| function + 3. The |xolox#misc#msg#debug()| function + 7. Integration between Vim and its environment |misc-integration-between-vim-its-environment| + 1. The |xolox#misc#open#file()| function + 2. The |xolox#misc#open#url()| function + 8. Vim and plug-in option handling |misc-vim-plug-in-option-handling| + 1. The |xolox#misc#option#get()| function + 2. The |xolox#misc#option#split()| function + 3. The |xolox#misc#option#join()| function + 4. The |xolox#misc#option#split_tags()| function + 5. The |xolox#misc#option#join_tags()| function + 6. The |xolox#misc#option#eval_tags()| function + 9. Operating system interfaces |misc-operating-system-interfaces| + 1. The |xolox#misc#os#is_mac()| function + 2. The |xolox#misc#os#is_win()| function + 3. The |xolox#misc#os#find_vim()| function + 4. The |xolox#misc#os#exec()| function + 5. The |xolox#misc#os#can_use_dll()| function + 10. Pathname manipulation functions |misc-pathname-manipulation-functions| + 1. The |xolox#misc#path#which()| function + 2. The |xolox#misc#path#split()| function + 3. The |xolox#misc#path#join()| function + 4. The |xolox#misc#path#directory_separator()| function + 5. The |xolox#misc#path#absolute()| function + 6. The |xolox#misc#path#relative()| function + 7. The |xolox#misc#path#merge()| function + 8. The |xolox#misc#path#commonprefix()| function + 9. The |xolox#misc#path#encode()| function + 10. The |xolox#misc#path#decode()| function + 11. The |xolox#misc#path#is_relative()| function + 12. The |xolox#misc#path#tempdir()| function + 11. String handling |misc-string-handling| + 1. The |xolox#misc#str#slug()| function + 2. The |xolox#misc#str#ucfirst()| function + 3. The |xolox#misc#str#compact()| function + 4. The |xolox#misc#str#trim()| function + 5. The |xolox#misc#str#indent()| function + 6. The |xolox#misc#str#dedent()| function + 12. Test runner & infrastructure for Vim plug-ins |misc-test-runner-infrastructure-for-vim-plug-ins| + 1. The |xolox#misc#test#reset()| function + 2. The |xolox#misc#test#summarize()| function + 3. The |xolox#misc#test#wrap()| function + 4. The |xolox#misc#test#passed()| function + 5. The |xolox#misc#test#failed()| function + 6. The |xolox#misc#test#assert_true()| function + 7. The |xolox#misc#test#assert_equals()| function + 8. The |xolox#misc#test#assert_same_type()| function + 13. Tests for the miscellaneous Vim scripts |tests-for-miscellaneous-vim-scripts| + 1. The |xolox#misc#tests#run()| function + 2. The |xolox#misc#tests#pattern_escaping()| function + 3. The |xolox#misc#tests#substitute_escaping()| function + 4. The |xolox#misc#tests#shell_escaping()| function + 5. The |xolox#misc#tests#making_a_list_unique()| function + 6. The |xolox#misc#tests#binary_insertion()| function + 7. The |xolox#misc#tests#getting_configuration_options()| function + 8. The |xolox#misc#tests#splitting_of_multi_valued_options()| function + 9. The |xolox#misc#tests#joining_of_multi_valued_options()| function + 10. The |xolox#misc#tests#finding_vim_on_the_search_path()| function + 11. The |xolox#misc#tests#synchronous_command_execution()| function + 12. The |xolox#misc#tests#synchronous_command_execution_with_stderr()| function + 13. The |xolox#misc#tests#synchronous_command_execution_with_raising_of_errors()| +function + 14. The |xolox#misc#tests#synchronous_command_execution_without_raising_errors()| +function + 15. The |xolox#misc#tests#asynchronous_command_execution()| function + 16. The |xolox#misc#tests#string_case_transformation()| function + 17. The |xolox#misc#tests#string_whitespace_compaction()| function + 18. The |xolox#misc#tests#string_whitespace_trimming()| function + 19. The |xolox#misc#tests#multiline_string_dedent()| function + 20. The |xolox#misc#tests#version_string_parsing()| function + 21. The |xolox#misc#tests#version_string_comparison()| function + 14. Timing of long during operations |misc-timing-of-long-during-operations| + 1. The |xolox#misc#timer#start()| function + 2. The |xolox#misc#timer#stop()| function + 3. The |xolox#misc#timer#force()| function + 15. Version string handling |misc-version-string-handling| + 1. The |xolox#misc#version#parse()| function + 2. The |xolox#misc#version#at_least()| function + 4. Contact |misc-contact| + 5. License |misc-license| + 6. References |misc-references| + +=============================================================================== + *misc-introduction* +Introduction ~ + +The vim-misc plug-in contains Vim scripts that are used by most of the Vim +plug-ins I've written [1] yet don't really belong with any single one of the +plug-ins. Basically it's an extended standard library of Vim script functions +that I wrote during the development of my Vim profile and plug-ins. + +In the past these scripts were bundled with each plug-in, however that turned +out to be a maintenance nightmare for me. That's why the miscellaneous scripts +are now a proper plug-in with their own page on Vim Online. + +Because the miscellaneous scripts are no longer bundled with my Vim plug-ins, +users are now required to install the miscellaneous scripts separately. This is +unfortunate for users who are upgrading from a previous release that did bundle +the miscellaneous scripts, but I don't see any way around this. Sorry! + +=============================================================================== + *misc-installation* +Installation ~ + +Unzip the most recent ZIP archive [2] file inside your Vim profile directory +(usually this is '~/.vim' on UNIX and '%USERPROFILE%\vimfiles' on Windows), +restart Vim and execute the command ':helptags ~/.vim/doc' (use ':helptags +~\vimfiles\doc' instead on Windows). + +If you prefer you can also use Pathogen [3], Vundle [4] or a similar tool to +install & update the plug-in using a local clone of the git repository. + +=============================================================================== + *misc-function-documentation* +Function documentation ~ + +Below is the documentation for the functions included in the miscellaneous +scripts. Anyone is free to use these functions in their own Vim profile and/or +plug-ins. I care about backwards compatibility so won't break it without a good +reason to do so. + +For those who are curious: The function descriptions given below were extracted +from the source code of the miscellaneous scripts using the Python module +'vimdoctool.py' included in vim-tools [5]. + +The documentation of the 80 functions below was extracted from 15 Vim scripts +on July 20, 2013 at 10:41. + +------------------------------------------------------------------------------- + *misc-handling-of-special-buffers* +Handling of special buffers ~ + +The functions defined here make it easier to deal with special Vim buffers that +contain text generated by a Vim plug-in. For example my vim-notes plug-in [6] +generates several such buffers: + +- :RecentNotes [7] lists recently modified notes +- :ShowTaggedNotes [8] lists notes grouped by tags +- etc. + +Because the text in these buffers is generated, Vim shouldn't bother with swap +files and it should never prompt the user whether to save changes to the +generated text. + +------------------------------------------------------------------------------- +The *xolox#misc#buffer#is_empty()* function + +Checks if the current buffer is an empty, unchanged buffer which can be reused. +Returns 1 if an empty buffer is found, 0 otherwise. + +------------------------------------------------------------------------------- +The *xolox#misc#buffer#prepare()* function + +Open a special buffer, i.e. a buffer that will hold generated contents, not +directly edited by the user. The buffer can be customized by passing a +dictionary with the following key/value pairs as the first argument: + +- **name** (required): The base name of the buffer (i.e. the base name of the + file loaded in the buffer, even though it isn't really a file and nothing + is really 'loaded' :-) + +- **path** (required): The pathname of the buffer. May be relevant if |:lcd| + or |'autochdir'| is being used. + +------------------------------------------------------------------------------- +The *xolox#misc#buffer#lock()* function + +Lock a special buffer so that its contents can no longer be edited. + +------------------------------------------------------------------------------- +The *xolox#misc#buffer#unlock()* function + +Unlock a special buffer so that its content can be updated. + +------------------------------------------------------------------------------- + *misc-tab-completion-for-user-defined-commands* +Tab completion for user defined commands ~ + +------------------------------------------------------------------------------- +The *xolox#misc#complete#keywords()* function + +This function can be used to perform keyword completion for user defined Vim +commands based on the contents of the current buffer. Here's an example of how +you would use it: +> + :command -nargs=* -complete=customlist,xolox#misc#complete#keywords MyCmd call s:MyCmd() +< +------------------------------------------------------------------------------- + *misc-string-escaping-functions* +String escaping functions ~ + +------------------------------------------------------------------------------- +The *xolox#misc#escape#pattern()* function + +Takes a single string argument and converts it into a |:substitute| / +|substitute()| pattern string that matches the given string literally. + +------------------------------------------------------------------------------- +The *xolox#misc#escape#substitute()* function + +Takes a single string argument and converts it into a |:substitute| / +|substitute()| replacement string that inserts the given string literally. + +------------------------------------------------------------------------------- +The *xolox#misc#escape#shell()* function + +Takes a single string argument and converts it into a quoted command line +argument. + +I was going to add a long rant here about Vim's |'shellslash'| option, but +really, it won't make any difference. Let's just suffice to say that I have yet +to encounter a single person out there who uses this option for its intended +purpose (running a UNIX style shell on Microsoft Windows). + +------------------------------------------------------------------------------- + *misc-human-friendly-string-formatting-for-vim* +Human friendly string formatting for Vim ~ + +------------------------------------------------------------------------------- +The *xolox#misc#format#pluralize()* function + +Concatenate a counter (the first argument, expected to be an integer) with a +singular or plural label (the second and third arguments, both expected to be +strings). + +------------------------------------------------------------------------------- +The *xolox#misc#format#timestamp()* function + +Format a time stamp (a string containing a formatted floating point number) +into a human friendly format, for example 70 seconds is phrased as "1 minute +and 10 seconds". + +------------------------------------------------------------------------------- + *misc-list-handling-functions* +List handling functions ~ + +------------------------------------------------------------------------------- +The *xolox#misc#list#unique()* function + +Remove duplicate values from the given list in-place (preserves order). + +------------------------------------------------------------------------------- +The *xolox#misc#list#binsert()* function + +Performs in-place binary insertion, which depending on your use case can be +more efficient than calling Vim's |sort()| function after each insertion (in +cases where a single, final sort is not an option). Expects three arguments: + +1. A list +2. A value to insert +3. 1 (true) when case should be ignored, 0 (false) otherwise + +------------------------------------------------------------------------------- + *misc-functions-to-interact-with-user* +Functions to interact with the user ~ + +------------------------------------------------------------------------------- +The *xolox#misc#msg#info()* function + +Show a formatted informational message to the user. + +This function has the same argument handling as Vim's |printf()| function with +one notable difference: Any arguments which are not numbers or strings are +coerced to strings using Vim's |string()| function. + +In the case of |xolox#misc#msg#info()|, automatic string coercion simply makes +the function a bit easier to use. + +------------------------------------------------------------------------------- +The *xolox#misc#msg#warn()* function + +Show a formatted warning message to the user. + +This function has the same argument handling as the |xolox#misc#msg#info()| +function. + +------------------------------------------------------------------------------- +The *xolox#misc#msg#debug()* function + +Show a formatted debugging message to the user, _if the user has enabled +increased verbosity by setting Vim's |'verbose'| option to one (1) or higher_. + +This function has the same argument handling as the |xolox#misc#msg#info()| +function. + +In the case of |xolox#misc#msg#debug()|, automatic string coercion provides +lazy evaluation in the sense that complex data structures are only converted to +strings when the user has enabled increased verbosity. + +------------------------------------------------------------------------------- + *misc-integration-between-vim-its-environment* +Integration between Vim and its environment ~ + +------------------------------------------------------------------------------- +The *xolox#misc#open#file()* function + +Given a pathname or URL as the first argument, this opens the file with the +program associated with the file type. So for example a text file might open in +Vim, an '*.html' file would probably open in your web browser and a media file +would open in a media player. + +This should work on Windows, Mac OS X and most Linux distributions. If this +fails to find a file association, you can pass one or more external commands to +try as additional arguments. For example: +> + :call xolox#misc#open#file('/path/to/my/file', 'firefox', 'google-chrome') +< +This generally shouldn't be necessary but it might come in handy now and then. + +------------------------------------------------------------------------------- +The *xolox#misc#open#url()* function + +Given a URL as the first argument, this opens the URL in your preferred or best +available web browser: + +- In GUI environments a graphical web browser will open (or a new tab will be + created in an existing window) + +- In console Vim without a GUI environment, when you have any of 'lynx', + 'links' or 'w3m' installed it will launch a command line web browser in + front of Vim (temporarily suspending Vim) + +------------------------------------------------------------------------------- + *misc-vim-plug-in-option-handling* +Vim and plug-in option handling ~ + +------------------------------------------------------------------------------- +The *xolox#misc#option#get()* function + +Expects one or two arguments: 1. The name of a variable and 2. the default +value if the variable does not exist. + +Returns the value of the variable from a buffer local variable, global variable +or the default value, depending on which is defined. + +This is used by some of my Vim plug-ins for option handling, so that users can +customize options for specific buffers. + +------------------------------------------------------------------------------- +The *xolox#misc#option#split()* function + +Given a multi-value Vim option like |'runtimepath'| this returns a list of +strings. For example: +> + :echo xolox#misc#option#split(&runtimepath) + ['/home/peter/Projects/Vim/misc', + '/home/peter/Projects/Vim/colorscheme-switcher', + '/home/peter/Projects/Vim/easytags', + ...] +< +------------------------------------------------------------------------------- +The *xolox#misc#option#join()* function + +Given a list of strings like the ones returned by |xolox#misc#option#split()|, +this joins the strings together into a single value that can be used to set a +Vim option. + +------------------------------------------------------------------------------- +The *xolox#misc#option#split_tags()* function + +Customized version of |xolox#misc#option#split()| with specialized handling for +Vim's |'tags'| option. + +------------------------------------------------------------------------------- +The *xolox#misc#option#join_tags()* function + +Customized version of |xolox#misc#option#join()| with specialized handling for +Vim's |'tags'| option. + +------------------------------------------------------------------------------- +The *xolox#misc#option#eval_tags()* function + +Evaluate Vim's |'tags'| option without looking at the file system, i.e. this +will report tags files that don't exist yet. Expects the value of the |'tags'| +option as the first argument. If the optional second argument is 1 (true) only +the first match is returned, otherwise (so by default) a list with all matches +is returned. + +------------------------------------------------------------------------------- + *misc-operating-system-interfaces* +Operating system interfaces ~ + +------------------------------------------------------------------------------- +The *xolox#misc#os#is_mac()* function + +Returns 1 (true) when on Mac OS X, 0 (false) otherwise. You would expect this +to simply check the Vim feature list, but for some obscure reason the +'/usr/bin/vim' included in Mac OS X (verified on version 10.7.5) returns 0 +(false) in response to "has('mac')", so we check the output of 'uname' to avoid +false negatives. + +------------------------------------------------------------------------------- +The *xolox#misc#os#is_win()* function + +Returns 1 (true) when on Microsoft Windows, 0 (false) otherwise. + +------------------------------------------------------------------------------- +The *xolox#misc#os#find_vim()* function + +Returns the program name of Vim as a string. On Windows and UNIX this just +|v:progname| as an absolute pathname while on Mac OS X there is some special +magic to find MacVim's executable even though it's usually not on the +executable search path. If you want, you can override the value returned from +this function by setting the global variable 'g:xolox#misc#os#vim_progname'. + +By default the choice of console Vim vs graphical Vim is made based on the +value of |v:progname|, but if you have a preference you can pass the string +'vim' or 'gvim' as the first and only argument. + +------------------------------------------------------------------------------- +The *xolox#misc#os#exec()* function + +Execute an external command (hiding the console on Microsoft Windows when my +vim-shell plug-in [9] is installed). + +Expects a dictionary with the following key/value pairs as the first argument: + +- **command** (required): The command line to execute + +- **async** (optional): set this to 1 (true) to execute the command in the + background (asynchronously) + +- **stdin** (optional): a string or list of strings with the input for the + external command + +- **check** (optional): set this to 0 (false) to disable checking of the exit + code of the external command (by default an exception will be raised when + the command fails) + +Returns a dictionary with one or more of the following key/value pairs: + +- **command** (always available): the generated command line that was used to + run the external command + +- **exit_code** (only in synchronous mode): the exit status of the external + command (an integer, zero on success) + +- **stdout** (only in synchronous mode): the output of the command on the + standard output stream (a list of strings, one for each line) + +- **stderr** (only in synchronous mode): the output of the command on the + standard error stream (as a list of strings, one for each line) + +------------------------------------------------------------------------------- +The *xolox#misc#os#can_use_dll()* function + +If a) we're on Microsoft Windows, b) the vim-shell plug-in is installed and c) +the compiled DLL included in vim-shell works, we can use the vim-shell plug-in +to execute external commands! Returns 1 (true) if we can use the DLL, 0 (false) +otherwise. + +------------------------------------------------------------------------------- + *misc-pathname-manipulation-functions* +Pathname manipulation functions ~ + +------------------------------------------------------------------------------- +The *xolox#misc#path#which()* function + +Scan the executable search path ('$PATH') for one or more external programs. +Expects one or more string arguments with program names. Returns a list with +the absolute pathnames of all found programs. Here's an example: +> + :echo xolox#misc#path#which('gvim', 'vim') + ['/usr/local/bin/gvim', + '/usr/bin/gvim', + '/usr/local/bin/vim', + '/usr/bin/vim'] +< +------------------------------------------------------------------------------- +The *xolox#misc#path#split()* function + +Split a pathname (the first and only argument) into a list of pathname +components. + +On Windows, pathnames starting with two slashes or backslashes are UNC paths +where the leading slashes are significant... In this case we split like this: + +- Input: "'//server/share/directory'" +- Result: "['//server', 'share', 'directory']" + +Everything except Windows is treated like UNIX until someone has a better +suggestion :-). In this case we split like this: + +- Input: "'/foo/bar/baz'" +- Result: "['/', 'foo', 'bar', 'baz']" + +To join a list of pathname components back into a single pathname string, use +the |xolox#misc#path#join()| function. + +------------------------------------------------------------------------------- +The *xolox#misc#path#join()* function + +Join a list of pathname components (the first and only argument) into a single +pathname string. This is the counterpart to the |xolox#misc#path#split()| +function and it expects a list of pathname components as returned by +|xolox#misc#path#split()|. + +------------------------------------------------------------------------------- +The *xolox#misc#path#directory_separator()* function + +Find the preferred directory separator for the platform and settings. + +------------------------------------------------------------------------------- +The *xolox#misc#path#absolute()* function + +Canonicalize and resolve a pathname, _regardless of whether it exists_. This is +intended to support string comparison to determine whether two pathnames point +to the same directory or file. + +------------------------------------------------------------------------------- +The *xolox#misc#path#relative()* function + +Make an absolute pathname (the first argument) relative to a directory (the +second argument). + +------------------------------------------------------------------------------- +The *xolox#misc#path#merge()* function + +Join a directory pathname and filename into a single pathname. + +------------------------------------------------------------------------------- +The *xolox#misc#path#commonprefix()* function + +Find the common prefix of path components in a list of pathnames. + +------------------------------------------------------------------------------- +The *xolox#misc#path#encode()* function + +Encode a pathname so it can be used as a filename. This uses URL encoding to +encode special characters. + +------------------------------------------------------------------------------- +The *xolox#misc#path#decode()* function + +Decode a pathname previously encoded with |xolox#misc#path#encode()|. + +------------------------------------------------------------------------------- +The *xolox#misc#path#is_relative()* function + +Returns true (1) when the pathname given as the first argument is relative, +false (0) otherwise. + +------------------------------------------------------------------------------- +The *xolox#misc#path#tempdir()* function + +Create a temporary directory and return the pathname of the directory. + +------------------------------------------------------------------------------- + *misc-string-handling* +String handling ~ + +------------------------------------------------------------------------------- +The *xolox#misc#str#slug()* function + +Convert a string to a "slug" - something that can be safely used in filenames +and URLs without worrying about quoting/escaping of special characters. + +------------------------------------------------------------------------------- +The *xolox#misc#str#ucfirst()* function + +Uppercase the first character in a string (the first argument). + +------------------------------------------------------------------------------- +The *xolox#misc#str#compact()* function + +Compact whitespace in a string (the first argument). + +------------------------------------------------------------------------------- +The *xolox#misc#str#trim()* function + +Trim all whitespace from the start and end of a string (the first argument). + +------------------------------------------------------------------------------- +The *xolox#misc#str#indent()* function + +Indent all lines in a multi-line string (the first argument) with a specific +number of _space characters_ (the second argument, an integer). + +------------------------------------------------------------------------------- +The *xolox#misc#str#dedent()* function + +Remove common whitespace from a multi line string. + +------------------------------------------------------------------------------- + *misc-test-runner-infrastructure-for-vim-plug-ins* +Test runner & infrastructure for Vim plug-ins ~ + +The Vim auto-load script 'autoload/xolox/misc/test.vim' contains infrastructure +that can be used to run an automated Vim plug-in test suite. It provides a +framework for running test functions, keeping track of the test status, making +assertions and reporting test results to the user. + +------------------------------------------------------------------------------- +The *xolox#misc#test#reset()* function + +Reset counters for executed tests and passed/failed assertions. + +------------------------------------------------------------------------------- +The *xolox#misc#test#summarize()* function + +Print a summary of test results, to be interpreted interactively. + +------------------------------------------------------------------------------- +The *xolox#misc#test#wrap()* function + +Call a function in a try/catch block and prevent exceptions from bubbling. The +name of the function should be passed as the first and only argument; it should +be a string containing the name of a Vim auto-load function. + +------------------------------------------------------------------------------- +The *xolox#misc#test#passed()* function + +Record a test which succeeded. + +------------------------------------------------------------------------------- +The *xolox#misc#test#failed()* function + +Record a test which failed. + +------------------------------------------------------------------------------- +The *xolox#misc#test#assert_true()* function + +Check whether an expression is true. + +------------------------------------------------------------------------------- +The *xolox#misc#test#assert_equals()* function + +Check whether two values are the same. + +------------------------------------------------------------------------------- +The *xolox#misc#test#assert_same_type()* function + +Check whether two values are of the same type. + +------------------------------------------------------------------------------- + *tests-for-miscellaneous-vim-scripts* +Tests for the miscellaneous Vim scripts ~ + +The Vim auto-load script 'autoload/xolox/misc/tests.vim' contains the automated +test suite of the miscellaneous Vim scripts. Right now the coverage is not very +high yet, but this will improve over time. + +------------------------------------------------------------------------------- +The *xolox#misc#tests#run()* function + +Run the automated test suite of the miscellaneous Vim scripts. To be used +interactively. Intended to be safe to execute irrespective of context. + +------------------------------------------------------------------------------- +The *xolox#misc#tests#pattern_escaping()* function + +Test escaping of regular expression patterns with +|xolox#misc#escape#pattern()|. + +------------------------------------------------------------------------------- +The *xolox#misc#tests#substitute_escaping()* function + +Test escaping of substitution strings with |xolox#misc#escape#substitute()|. + +------------------------------------------------------------------------------- +The *xolox#misc#tests#shell_escaping()* function + +Test escaping of shell arguments with |xolox#misc#escape#shell()|. + +------------------------------------------------------------------------------- +The *xolox#misc#tests#making_a_list_unique()* function + +Test removing of duplicate values from lists with |xolox#misc#list#unique()|. + +------------------------------------------------------------------------------- +The *xolox#misc#tests#binary_insertion()* function + +Test the binary insertion algorithm implemented in |xolox#misc#list#binsert()|. + +------------------------------------------------------------------------------- +The *xolox#misc#tests#getting_configuration_options()* function + +Test getting of scoped plug-in configuration "options" with +|xolox#misc#option#get()|. + +------------------------------------------------------------------------------- +The *xolox#misc#tests#splitting_of_multi_valued_options()* function + +Test splitting of multi-valued Vim options with |xolox#misc#option#split()|. + +------------------------------------------------------------------------------- +The *xolox#misc#tests#joining_of_multi_valued_options()* function + +Test joining of multi-valued Vim options with |xolox#misc#option#join()|. + +------------------------------------------------------------------------------- +The *xolox#misc#tests#finding_vim_on_the_search_path()* function + +Test looking up Vim's executable on the search path using |v:progname| with +|xolox#misc#os#find_vim()|. + +------------------------------------------------------------------------------- +The *xolox#misc#tests#synchronous_command_execution()* function + +Test basic functionality of synchronous command execution with +|xolox#misc#os#exec()|. + +------------------------------------------------------------------------------- +The *xolox#misc#tests#synchronous_command_execution_with_stderr()* function + +Test basic functionality of synchronous command execution with +|xolox#misc#os#exec()| including the standard error stream (not available on +Windows when vim-shell is not installed). + +------------------------------------------------------------------------------- +The *xolox#misc#tests#synchronous_command_execution_with_raising_of_errors()* +function + +Test raising of errors during synchronous command execution with +|xolox#misc#os#exec()|. + +------------------------------------------------------------------------------- +The *xolox#misc#tests#synchronous_command_execution_without_raising_errors()* +function + +Test synchronous command execution without raising of errors with +|xolox#misc#os#exec()|. + +------------------------------------------------------------------------------- +The *xolox#misc#tests#asynchronous_command_execution()* function + +Test the basic functionality of asynchronous command execution with +|xolox#misc#os#exec()|. This runs the external command 'mkdir' and tests that +the side effect of creating the directory takes place. This might seem like a +peculiar choice, but it's one of the few 100% portable commands (Windows + +UNIX) that doesn't involve input/output streams. + +------------------------------------------------------------------------------- +The *xolox#misc#tests#string_case_transformation()* function + +Test string case transformation with |xolox#misc#str#ucfirst()|. + +------------------------------------------------------------------------------- +The *xolox#misc#tests#string_whitespace_compaction()* function + +Test compaction of whitespace in strings with |xolox#misc#str#compact()|. + +------------------------------------------------------------------------------- +The *xolox#misc#tests#string_whitespace_trimming()* function + +Test trimming of whitespace in strings with |xolox#misc#str#trim()|. + +------------------------------------------------------------------------------- +The *xolox#misc#tests#multiline_string_dedent()* function + +Test dedenting of multi-line strings with |xolox#misc#str#dedent()|. + +------------------------------------------------------------------------------- +The *xolox#misc#tests#version_string_parsing()* function + +Test parsing of version strings with |xolox#misc#version#parse()|. + +------------------------------------------------------------------------------- +The *xolox#misc#tests#version_string_comparison()* function + +Test comparison of version strings with |xolox#misc#version#at_least()|. + +------------------------------------------------------------------------------- + *misc-timing-of-long-during-operations* +Timing of long during operations ~ + +------------------------------------------------------------------------------- +The *xolox#misc#timer#start()* function + +Start a timer. This returns a list which can later be passed to +|xolox#misc#timer#stop()|. + +------------------------------------------------------------------------------- +The *xolox#misc#timer#stop()* function + +Show a formatted debugging message to the user, if the user has enabled +increased verbosity by setting Vim's |'verbose'| option to one (1) or higher. + +This function has the same argument handling as Vim's |printf()| function with +one difference: At the point where you want the elapsed time to be embedded, +you write '%s' and you pass the list returned by |xolox#misc#timer#start()| as +an argument. + +------------------------------------------------------------------------------- +The *xolox#misc#timer#force()* function + +Show a formatted message to the user. This function has the same argument +handling as Vim's |printf()| function with one difference: At the point where +you want the elapsed time to be embedded, you write '%s' and you pass the list +returned by |xolox#misc#timer#start()| as an argument. + +------------------------------------------------------------------------------- + *misc-version-string-handling* +Version string handling ~ + +------------------------------------------------------------------------------- +The *xolox#misc#version#parse()* function + +Convert a version string to a list of integers. + +------------------------------------------------------------------------------- +The *xolox#misc#version#at_least()* function + +Check whether the second version string is equal to or greater than the first +version string. Returns 1 (true) when it is, 0 (false) otherwise. + +=============================================================================== + *misc-contact* +Contact ~ + +If you have questions, bug reports, suggestions, etc. the author can be +contacted at peter@peterodding.com. The latest version is available at +http://peterodding.com/code/vim/misc and http://github.com/xolox/vim-misc. If +you like the script please vote for it on Vim Online [10]. + +=============================================================================== + *misc-license* +License ~ + +This software is licensed under the MIT license [11]. © 2013 Peter Odding +. + +=============================================================================== + *misc-references* +References ~ + +[1] http://peterodding.com/code/vim/ +[2] http://peterodding.com/code/vim/downloads/misc.zip +[3] http://www.vim.org/scripts/script.php?script_id=2332 +[4] https://github.com/gmarik/vundle +[5] http://peterodding.com/code/vim/tools/ +[6] http://peterodding.com/code/vim/notes/ +[7] http://peterodding.com/code/vim/notes/#recentnotes_command +[8] http://peterodding.com/code/vim/notes/#showtaggednotes_command +[9] http://peterodding.com/code/vim/shell/ +[10] http://www.vim.org/scripts/script.php?script_id=4597 +[11] http://en.wikipedia.org/wiki/MIT_License + +vim: ft=help diff --git a/sources_non_forked/vim-notes b/sources_non_forked/vim-notes deleted file mode 160000 index 14838be7..00000000 --- a/sources_non_forked/vim-notes +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 14838be7c5330592578346ef6e69d7a198b48dbe diff --git a/sources_non_forked/vim-notes/.gitignore b/sources_non_forked/vim-notes/.gitignore new file mode 100644 index 00000000..9499809b --- /dev/null +++ b/sources_non_forked/vim-notes/.gitignore @@ -0,0 +1,5 @@ +doc/tags +misc/notes/index.pickle +misc/notes/recent.txt +misc/notes/tags.txt +misc/notes/user/ diff --git a/sources_non_forked/vim-notes/INSTALL.md b/sources_non_forked/vim-notes/INSTALL.md new file mode 100644 index 00000000..5e9c526d --- /dev/null +++ b/sources_non_forked/vim-notes/INSTALL.md @@ -0,0 +1,13 @@ +*Please note that the vim-notes plug-in requires my vim-misc plug-in which is separately distributed.* + +Unzip the most recent ZIP archives of the [vim-notes] [download-notes] and [vim-misc] [download-misc] plug-ins inside your Vim profile directory (usually this is `~/.vim` on UNIX and `%USERPROFILE%\vimfiles` on Windows), restart Vim and execute the command `:helptags ~/.vim/doc` (use `:helptags ~\vimfiles\doc` instead on Windows). + +If you prefer you can also use [Pathogen] [pathogen], [Vundle] [vundle] or a similar tool to install & update the [vim-notes] [github-notes] and [vim-misc] [github-misc] plug-ins using a local clone of the git repository. + + +[download-misc]: http://peterodding.com/code/vim/downloads/misc.zip +[download-notes]: http://peterodding.com/code/vim/downloads/notes.zip +[github-misc]: http://github.com/xolox/vim-misc +[github-notes]: http://github.com/xolox/vim-notes +[pathogen]: http://www.vim.org/scripts/script.php?script_id=2332 +[vundle]: https://github.com/gmarik/vundle diff --git a/sources_non_forked/vim-notes/README.md b/sources_non_forked/vim-notes/README.md new file mode 100644 index 00000000..d4da3c42 --- /dev/null +++ b/sources_non_forked/vim-notes/README.md @@ -0,0 +1,360 @@ +# Easy note taking in Vim + +The vim-notes plug-in for the [Vim text editor] [vim] makes it easy to manage your notes in Vim: + + * **Starting a new note:** Execute the `:Note` command to create a new buffer and load the appropriate file type and syntax + * You can also start a note with Vim commands like `:edit`, `:tabedit` and `:split` by starting the filename with `note:`, as in `:edit note:todo` (the part after `note:` doesn't have to be the complete note title and if it's empty a new note will be created) + * You can start a new note with the selected text as title in the current window using the `\en` mapping or `:NoteFromSelectedText` command (there are similar mappings and commands for opening split windows and tab pages) + * **Saving notes:** Just use Vim's [:write] [write] and [:update] [update] commands, you don't need to provide a filename because it will be set based on the title (first line) of your note (you also don't need to worry about special characters, they'll be escaped) + * **Editing existing notes:** Execute `:Note anything` to edit a note containing `anything` in its title (if no notes are found a new one is created with its title set to `anything`) + * The `:Note` and `:DeleteNote` commands support tab completion of note titles + * **Deleting notes:** The `:DeleteNote` command enables you to delete the current note + * **Searching notes:** `:SearchNotes keyword …` searches for keywords and `:SearchNotes /pattern/` searches for regular expressions + * The `:SearchNotes` command supports tab completion of keywords and sorts candidates by relevance ([Levenshtein distance] [levenshtein]) + * **Smart defaults:** Without an argument `:SearchNotes` searches for the word under the cursor (if the word starts with `@` that character will be included in the search, this means you can easily search for *@tagged* notes) + * **Back-references:** The `:RelatedNotes` command find all notes referencing the current file + * A [Python 2] [python] script is included that accelerates keyword searches using a keyword index + * The `:RecentNotes` command lists your notes by modification date, starting with the most recently edited note + * **Navigating between notes:** The included syntax script highlights note names as hyper links and the file type plug-in redefines [gf] [gf] to jump between notes (the [Control-w f] [ctrlwf] mapping to jump to a note in a split window and the [Control-w gf] [ctrlwgf] mapping to jump to a note in a new tab page also work) + * **Writing aids:** The included file type plug-in contains mappings for automatic curly quotes, arrows and list bullets and supports completion of note titles using Control-X Control-U and completion of tags using Control-X Control-O + * **Embedded file types:** The included syntax script supports embedded highlighting using blocks marked with `{{{type … }}}` which allows you to embed highlighted code and configuration snippets in your notes + +Here's a screen shot of the syntax mode using the [Slate] [slate] color scheme and the font [Monaco] [monaco]: + +![Syntax mode screen shot](http://peterodding.com/code/vim/notes/syntax.png) + +## Install & usage + +*Please note that the vim-notes plug-in requires my vim-misc plug-in which is separately distributed.* + +Unzip the most recent ZIP archives of the [vim-notes] [download-notes] and [vim-misc] [download-misc] plug-ins inside your Vim profile directory (usually this is `~/.vim` on UNIX and `%USERPROFILE%\vimfiles` on Windows), restart Vim and execute the command `:helptags ~/.vim/doc` (use `:helptags ~\vimfiles\doc` instead on Windows). To get started execute `:Note` or `:edit note:`, this will start a new note that contains instructions on how to continue from there (and how to use the plug-in in general). + +If you prefer you can also use [Pathogen] [pathogen], [Vundle] [vundle] or a similar tool to install & update the [vim-notes] [github-notes] and [vim-misc] [github-misc] plug-ins using a local clone of the git repository. + +## Options + +All options have reasonable defaults so if the plug-in works after installation you don't need to change any options. The options are available for people who like to customize how the plug-in works. You can set these options in your [vimrc script] [vimrc] by including a line like this: + + :let g:notes_directories = ['~/Documents/Notes', '~/Dropbox/Shared Notes'] + +Note that after changing an option in your [vimrc script] [vimrc] you have to restart Vim for the changes to take effect. + +### The `g:notes_directories` option + +Your notes are stored in one or more directories. This option defines where you want to store your notes. Its value should be a list (there's an example above) with one or more pathnames. The default is a single value which depends on circumstances but should work for most people: + + * If the profile directory where the plug-in is installed is writable, the directory `misc/notes/user` under the profile directory is used. This is for compatibility with [Pathogen] [pathogen]; the notes will be stored inside the plug-in's bundle. + + * If the above doesn't work out, the default depends on the platform: `~/vimfiles/misc/notes/user` on Windows and `~/.vim/misc/notes/user` on other platforms. + +#### Backwards compatibility + +In the past the notes plug-in only supported a single directory and the corresponding option was called `g:notes_directory`. When support for multiple notes directories was introduced the option was renamed to `g:notes_directories` to reflect that the value is now a list of directory pathnames. + +For backwards compatibility with old configurations (all of them as of this writing :-) the notes plug-in still uses `g:notes_directory` when it is defined (its no longer defined by the plug-in). However when the plug-in warns you to change your configuration you probably should because this compatibility will be removed at some point. + +### The `g:notes_suffix` option + +The suffix to add to generated filenames. The plug-in generates filenames for your notes based on the title (first line) of each note and by default these filenames don't include an extension like `.txt`. You can use this option to make the plug-in automatically append an extension without having to embed the extension in the note's title, e.g.: + + :let g:notes_suffix = '.txt' + +### The `g:notes_title_sync` option + +When you rename a file in your notes directory but don't change the title, the plug-in will notice this the next time you open the note in Vim. Likewise when you change the title in another text editor but don't rename the file. By default the plug-in will prompt you whether you want it to update the title of the note, rename the file on disk or dismiss the prompt without doing anything. + +If you set this option to the string `'no'` this feature will be completely disabled. If you set it to `'change_title'` it will automatically change the title to match the filename. If you set it to `'rename_file'` it will automatically rename the file on disk to match the title. + +### The `g:notes_smart_quotes` option + +By default the notes plug-in automatically performs several substitutions on the text you type in insert mode, for example regular quote marks are replaced with curly quotes. The full list of substitutions can be found below in the documentation on mappings. If you don't want the plug-in to perform these substitutions, you can set this option to zero like this: + + :let g:notes_smart_quotes = 0 + +### The `g:notes_ruler_text` option + +The text of the ruler line inserted when you type `***` in quick succession. It defaults to three asterisks separated by spaces, center aligned to the text width. + +### The `g:notes_list_bullets` option + +A list of characters used as list bullets. When you're using a Unicode encoding this defaults to `['•', '◦', '▸', '▹', '▪', '▫']`, otherwise it defaults to `['*', '-', '+']`. + +When you change the nesting level (indentation) of a line containing a bullet point using one of the mappings `Tab`, `Shift-Tab`, `Alt-Left` and `Alt-Right` the bullet point will be automatically changed to correspond to the new nesting level. + +The first level of list items gets the first bullet point in `g:notes_list_bullets`, the second level gets the second, etc. When you're indenting a list item to a level where the `g:notes_list_bullets` doesn't have enough bullets, the plug-in starts again at the first bullet in the list (in other words the selection of bullets wraps around). + +### The `g:notes_tab_indents` option + +By default `Tab` is mapped to indent list items and `Shift-Tab` is mapped to dedent list items. You can disable these mappings by adding the following to your [vimrc script] [vimrc]: + + :let g:notes_tab_indents = 0 + +### The `g:notes_alt_indents` option + +By default `Alt-Right` is mapped to indent list items and `Alt-Left` is mapped to dedent list items. You can disable these mappings by adding the following to your [vimrc script] [vimrc]: + + :let g:notes_alt_indents = 0 + +### The `g:notes_shadowdir` option + +The notes plug-in comes with some default notes containing documentation about the plug-in. This option defines the path of the directory containing these notes. + +### The `g:notes_indexfile` option + +This option defines the pathname of the optional keyword index used by the `:SearchNotes` to perform accelerated keyword searching. + +### The `g:notes_indexscript` option + +This option defines the pathname of the Python script that's used to perform accelerated keyword searching with `:SearchNotes`. + +### The `g:notes_tagsindex` option + +This option defines the pathname of the text file that stores the list of known tags used for tag name completion and the `:ShowTaggedNotes` command. The text file is created automatically when it's first needed, after that you can recreate it manually by executing `:IndexTaggedNotes` (see below). + +### The `g:notes_markdown_program` option + +The `:NoteToHtml` command requires the [Markdown] [markdown] program. By default the name of this program is assumed to be simply `markdown`. If you want to use a different program for Markdown to HTML conversion, set this option to the name of the program. + +## Commands + +To edit one of your existing notes (or create a new one) you can use Vim commands such as [:edit] [edit], [:split] [split] and [:tabedit] [tabedit] with a filename that starts with *note:* followed by (part of) the title of one of your notes, e.g.: + + :edit note:todo + +This shortcut also works from the command line: + + $ gvim note:todo + +When you don't follow *note:* with anything a new note is created like when you execute `:Note` without any arguments. + +### The `:Note` command + +When executed without any arguments this command starts a new note in the current window. If you pass one or more arguments the command will edit an existing note containing the given words in the title. If more than one note is found you'll be asked which note you want to edit. If no notes are found a new note is started with the given word(s) as title. + +This command will fail when changes have been made to the current buffer, unless you use `:Note!` which discards any changes. + +When you are using multiple directories to store your notes and you run `:Note` while editing an existing note, a new note will inherit the directory of the note from which you started. Otherwise the note is created in the first directory in `g:notes_directories`. + +*This command supports tab completion:* If you complete one word, all existing notes containing the given word somewhere in their title are suggested. If you type more than one word separated by spaces, the plug-in will complete only the missing words so that the resulting command line contains the complete note title and nothing more. + +### The `:NoteFromSelectedText` command + +Start a new note in the current window with the selected text as the title of the note. The name of this command isn't very well suited to daily use, that's because it's intended to be executed from a mapping. The default mapping for this command is `\en` (the backslash is actually the character defined by the [mapleader] [mapleader] variable). + +When you are using multiple directories to store your notes and you run `:NoteFromSelectedText` while editing an existing note, the new note will inherit the directory of the note from which it was created. + +### The `:SplitNoteFromSelectedText` command + +Same as `:NoteFromSelectedText` but opens the new note in a vertical split window. The default mapping for this command is `\sn`. + +### The `:TabNoteFromSelectedText` command + +Same as `:NoteFromSelectedText` but opens the new note in a new tab page. The default mapping for this command is `\tn`. + +### The `:DeleteNote` command + +The `:DeleteNote` command deletes a note file, destroys the buffer and removes the note from the internal cache of filenames and note titles. If you pass a note name as an argument to `:DeleteNote` it will delete the given note, otherwise it will delete the current note. This fails when changes have been made to the buffer, unless you use `:DeleteNote!` which discards any changes. + +### The `:SearchNotes` command + +This command wraps [:vimgrep] [vimgrep] and enables you to search through your notes using one or more keywords or a regular expression pattern. To search for a pattern you pass a single argument that starts/ends with a slash: + + :SearchNotes /TODO\|FIXME\|XXX/ + +To search for one or more keywords you can just omit the slashes, this matches notes containing all of the given keywords: + + :SearchNotes syntax highlighting + +#### `:SearchNotes` understands @tags + +If you don't pass any arguments to the `:SearchNotes` command it will search for the word under the cursor. If the word under the cursor starts with '@' this character will be included in the search, which makes it possible to easily add *@tags* to your *@notes* and then search for those tags. To make searching for tags even easier you can create key mappings for the `:SearchNotes` command: + + " Make the C-] combination search for @tags: + imap :SearchNotes + nmap :SearchNotes + + " Make double mouse click search for @tags. This is actually quite a lot of + " fun if you don't use the mouse for text selections anyway; you can click + " between notes as if you're in a web browser: + imap <2-LeftMouse> :SearchNotes + nmap <2-LeftMouse> :SearchNotes + +These mappings are currently not enabled by default because they conflict with already useful key mappings, but if you have any suggestions for alternatives feel free to contact me through GitHub or at . + +#### Accelerated searching with Python + +After collecting a fair amount of notes (say more than 5 MB) you will probably start to get annoyed at how long it takes Vim to search through all of your notes. To make searching more scalable the notes plug-in includes a Python script which uses a persistent full text index of your notes stored in a file. + +The first time the Python script is run it will need to build the complete index which can take a moment, but after the index has been initialized updates and searches should be more or less instantaneous. + +### The `:RelatedNotes` command + +This command makes it easy to find all notes related to the current file: If you are currently editing a note then a search for the note's title is done, otherwise this searches for the absolute path of the current file. + +### The `:RecentNotes` command + +If you execute the `:RecentNotes` command it will open a Vim buffer that lists all your notes grouped by the day they were edited, starting with your most recently edited note. If you pass an argument to `:RecentNotes` it will filter the list of notes by matching the title of each note against the argument which is interpreted as a Vim pattern. + +### The `:MostRecentNote` command + +This command edits your most recently edited note (whether you just opened the note or made changes to it). The plug-in will remember the most recent note between restarts of Vim and is shared between all instances of Vim. + +### The `:ShowTaggedNotes` command + +To show a list of all notes that contains *@tags* you can use the `:ShowTaggedNotes` command. If you pass a count to this command it will limit the list of tags to those that have been used at least this many times. For example the following two commands show tags that have been used at least ten times: + + :10ShowTaggedNotes + :ShowTaggedNotes 10 + +### The `:IndexTaggedNotes` command + +The notes plug-in defines an omni completion function that can be used to complete the names of tags. To trigger the omni completion you type Control-X Control-O. When you type `@` in insert mode the plug-in will automatically start omni completion. + +The completion menu is populated from a text file listing all your tags, one on each line. The first time omni completion triggers, an index of tag names is generated and saved to the location set by `g:notes_tagsindex`. After this file is created, it will be updated automatically as you edit notes and add/remove tags. + +If for any reason you want to recreate the list of tags you can execute the `:IndexTaggedNotes` command. + +### The `:NoteToHtml` command + +This command converts the current note to HTML. It works by first converting the current note to [Markdown] [markdown] and then using the `markdown` program to convert that to HTML. It requires an external program to convert Markdown to HTML. By default the program `markdown` is used, but you can change the name of the program using the `g:notes_markdown_program` option. + +Note that this command can be a bit slow, because the parser for the note taking syntax is written in Vim script (for portability) and has not been optimized for speed (yet). + +### The `:NoteToMarkdown` command + +Convert the current note to a [Markdown document] [markdown]. The vim-notes syntax shares a lot of similarities with the Markdown text format, but there are some notable differences, which this command takes care of: + + * The first line of a note is an implicit document title. In Markdown format it has to be marked with `#`. This also implies that the remaining headings should be shifted by one level. + + * Preformatted blocks are marked very differently in notes and Markdown (`{{{` and `}}}` markers versus 4 space indentation). + + * The markers and indentation of list items differ between notes and Markdown (dumb bullets vs Unicode bullets and 3 vs 4 spaces). + +Note that this command can be a bit slow, because the parser for the note taking syntax is written in Vim script (for portability) and has not been optimized for speed (yet). + +## Mappings + +The following key mappings are defined inside notes. + +### Insert mode mappings + + * `@` automatically triggers tag completion + * `'` becomes `‘` or `’` depending on where you type it + * `"` becomes `“` or `”` (same goes for these) + * `--` becomes `—` + * `->` becomes `→` + * `<-` becomes `←` + * the bullets `*`, `-` and `+` become `•` + * the three characters `***` in insert mode in quick succession insert a horizontal ruler delimited by empty lines + * `Tab` and `Alt-Right` increase indentation of list items (works on the current line and selected lines) + * `Shift-Tab` and `Alt-Left` decrease indentation of list items + * `Enter` on a line with only a list bullet removes the bullet and starts a new line below the current line + * `\en` executes `:NoteFromSelectedText` + * `\sn` executes `:SplitNoteFromSelectedText` + * `\tn` executes `:TabNoteFromSelectedText` + +## Customizing the syntax highlighting of notes + +The syntax mode for notes is written so you can override styles you don't like. To do so you can add lines such as the following to your [vimrc script] [vimrc]: + + " Don't highlight single quoted strings. + highlight link notesSingleQuoted Normal + + " Show double quoted strings in italic font. + highlight notesDoubleQuoted gui=italic + +See the documentation of the [:highlight] [highlight] command for more information. Below are the names of the syntax items defined by the notes syntax mode: + + * `notesName` - the names of other notes, usually highlighted as a hyperlink + * `notesTagName` - words preceded by an `@` character, also highlighted as a hyperlink + * `notesListBullet` - the bullet characters used for list items + * `notesListNumber` - numbers in front of list items + * `notesDoubleQuoted` - double quoted strings + * `notesSingleQuoted` - single quoted strings + * `notesItalic` - strings between two `_` characters + * `notesBold` - strings between two `*` characters + * `notesTextURL` - plain domain name (recognized by leading `www.`) + * `notesRealURL` - URLs (e.g. ) + * `notesEmailAddr` - e-mail addresses + * `notesUnixPath` - UNIX file paths (e.g. `~/.vimrc` and `/home/peter/.vimrc`) + * `notesPathLnum` - line number following a UNIX path + * `notesWindowsPath` - Windows file paths (e.g. `c:\users\peter\_vimrc`) + * `notesTodo` - `TODO` markers + * `notesXXX` - `XXX` markers + * `notesFixMe` - `FIXME` markers + * `notesInProgress` - `CURRENT`, `INPROGRESS`, `STARTED` and `WIP` markers + * `notesDoneItem` - lines containing the marker `DONE`, usually highlighted as a comment + * `notesDoneMarker` - `DONE` markers + * `notesVimCmd` - Vim commands, words preceded by an `:` character + * `notesTitle` - the first line of each note + * `notesShortHeading` - short sentences ending in a `:` character + * `notesAtxHeading` - lines preceded by one or more `#` characters + * `notesBlockQuote` - lines preceded by a `>` character + * `notesRule` - lines containing only whitespace and `* * *` + * `notesCodeStart` - the `{{{` markers that begin a block of code (including the syntax name) + * `notesCodeEnd` - the `}}}` markers that end a block of code + * `notesModeLine` - Vim [modeline] [modeline] in last line of notes + * `notesLastEdited` - last edited dates in `:ShowTaggedNotes` buffers + +## Other plug-ins that work well with the notes plug-in + +### utl.vim + +The [utl.vim] [utl] universal text linking plug-in enables links between your notes, other local files and remote resources like web pages. + +### shell.vim + +My [shell.vim] [shell] plug-in also enables easy navigation between your notes and environment like local files and directories, web pages and e-mail addresses by providing key mappings and commands to e.g. open the file/URL under the text cursor. This plug-in can also change Vim to full screen which can be really nice for large notes. + +### VOoM + +The [VOoM] [voom] outlining plug-in should work well for notes if you use the Markdown style headers starting with `#`, however it has been reported that this combination may not always work so well in practice (sometimes losing notes!) + +### Txtfmt + +If the text formatting supported by the notes plug-in is not enough for you, consider trying the [Txtfmt] [txtfmt] (The Vim Highlighter) plug-in. To use the two plug-ins together, create the file `after/ftplugin/notes.vim` inside your Vim profile with the following contents: + + " Enable Txtfmt formatting inside notes. + setlocal filetype=notes.txtfmt + +## Contact + +If you have questions, bug reports, suggestions, etc. the author can be contacted at . The latest version is available at and . If you like the script please vote for it on [Vim Online] [vim_online]. + +## License + +This software is licensed under the [MIT license] [mit]. +© 2013 Peter Odding <>. + + +[ctrlwf]: http://vimdoc.sourceforge.net/htmldoc/windows.html#CTRL-W_f +[ctrlwgf]: http://vimdoc.sourceforge.net/htmldoc/windows.html#CTRL-W_gf +[download-misc]: http://peterodding.com/code/vim/downloads/misc.zip +[download-notes]: http://peterodding.com/code/vim/downloads/notes.zip +[edit]: http://vimdoc.sourceforge.net/htmldoc/editing.html#:edit +[gf]: http://vimdoc.sourceforge.net/htmldoc/editing.html#gf +[github-misc]: http://github.com/xolox/vim-misc +[github-notes]: http://github.com/xolox/vim-notes +[highlight]: http://vimdoc.sourceforge.net/htmldoc/syntax.html#:highlight +[levenshtein]: http://en.wikipedia.org/wiki/Levenshtein_distance +[mapleader]: http://vimdoc.sourceforge.net/htmldoc/map.html#mapleader +[markdown]: http://en.wikipedia.org/wiki/Markdown +[mit]: http://en.wikipedia.org/wiki/MIT_License +[modeline]: http://vimdoc.sourceforge.net/htmldoc/options.html#modeline +[monaco]: http://en.wikipedia.org/wiki/Monaco_(typeface) +[pathogen]: http://www.vim.org/scripts/script.php?script_id=2332 +[python]: http://python.org/ +[shell]: http://www.vim.org/scripts/script.php?script_id=3123 +[slate]: http://code.google.com/p/vim/source/browse/runtime/colors/slate.vim +[split]: http://vimdoc.sourceforge.net/htmldoc/windows.html#:split +[tabedit]: http://vimdoc.sourceforge.net/htmldoc/tabpage.html#:tabedit +[txtfmt]: http://www.vim.org/scripts/script.php?script_id=2208 +[update]: http://vimdoc.sourceforge.net/htmldoc/editing.html#:update +[utl]: http://www.vim.org/scripts/script.php?script_id=293 +[vim]: http://www.vim.org/ +[vim_online]: http://www.vim.org/scripts/script.php?script_id=3375 +[vimgrep]: http://vimdoc.sourceforge.net/htmldoc/quickfix.html#:vimgrep +[vimrc]: http://vimdoc.sourceforge.net/htmldoc/starting.html#vimrc +[voom]: http://www.vim.org/scripts/script.php?script_id=2657 +[vundle]: https://github.com/gmarik/vundle +[write]: http://vimdoc.sourceforge.net/htmldoc/editing.html#:write diff --git a/sources_non_forked/vim-notes/TODO.md b/sources_non_forked/vim-notes/TODO.md new file mode 100644 index 00000000..cd073c6f --- /dev/null +++ b/sources_non_forked/vim-notes/TODO.md @@ -0,0 +1,15 @@ +# To-do list for the `notes.vim` plug-in + + * The note name highlighting uses word boundaries so that 'git' inside 'fugitive' is not highlighted, however this breaks highlighting of note names ending in punctuation (or more generically ending in non-word characters). + * The `ftplugin/notes.vim` script used to clear the [matchpairs] [matchpairs] option so that pairs of characters are not highlighted in notes (the irrelevant highlighting was starting to annoy me). Several people have since complained that Vim rings a bell or flashes the screen for every key press in insert mode when editing notes. I've now removed the matchpairs manipulation from the plug-in but I suspect that this may actually be a bug in Vim; to be investigated. See also [issue 10 on GitHub] [issue_10]. + * Override `` to show a quick reference of available commands? + * Define aliases of the available commands that start with `Note` (to help people getting started with the plug-in). + * Add a key mapping to toggle text folding (currently in my `~/.vimrc`) + * Add a key mapping or command to toggle the visibility of `{{{ … }}}` code markers? + * Find a good way to support notes with generates contents, e.g. *'all notes'*. + * When renaming a note, also update references to the note in other notes? (make this optional of course!) + * Improve highlighting of lines below a line with a `DONE` marker; when navigating over such lines, the highlighting will sometimes disappear (except on the first line). See also [issue #2 on GitHub] [issue_2]. + +[issue_2]: https://github.com/xolox/vim-notes/issues/2 +[issue_10]: https://github.com/xolox/vim-notes/issues/10 +[matchpairs]: http://vimdoc.sourceforge.net/htmldoc/options.html#%27matchpairs%27 diff --git a/sources_non_forked/vim-notes/addon-info.json b/sources_non_forked/vim-notes/addon-info.json new file mode 100644 index 00000000..d8662945 --- /dev/null +++ b/sources_non_forked/vim-notes/addon-info.json @@ -0,0 +1 @@ +{"vim_script_nr": 3375, "dependencies": {"vim-misc": {}}, "homepage": "http://peterodding.com/code/vim/notes", "name": "vim-notes"} \ No newline at end of file diff --git a/sources_non_forked/vim-notes/autoload/xolox/notes.vim b/sources_non_forked/vim-notes/autoload/xolox/notes.vim new file mode 100644 index 00000000..f3d7c735 --- /dev/null +++ b/sources_non_forked/vim-notes/autoload/xolox/notes.vim @@ -0,0 +1,1221 @@ +" Vim auto-load script +" Author: Peter Odding +" Last Change: September 2, 2013 +" URL: http://peterodding.com/code/vim/notes/ + +" Note: This file is encoded in UTF-8 including a byte order mark so +" that Vim loads the script using the right encoding transparently. + +let g:xolox#notes#version = '0.23.4' +let g:xolox#notes#url_pattern = '\<\(mailto:\|javascript:\|\w\{3,}://\)\(\S*\w\)\+/\?' +let s:scriptdir = expand(':p:h') + +function! xolox#notes#init() " {{{1 + " Initialize the configuration of the notes plug-in. This is a bit tricky: + " We want to be compatible with Pathogen which installs plug-ins as + " "bundles" under ~/.vim/bundle/*/ so we use a relative path to make sure we + " 'stay inside the bundle'. However if the notes.vim plug-in is installed + " system wide the user probably won't have permission to write inside the + " installation directory, so we have to switch to $HOME then. + let systemdir = xolox#misc#path#absolute(s:scriptdir . '/../../misc/notes') + if filewritable(systemdir) == 2 + let localdir = systemdir + elseif xolox#misc#os#is_win() + let localdir = xolox#misc#path#absolute('~/vimfiles/misc/notes') + else + let localdir = xolox#misc#path#absolute('~/.vim/misc/notes') + endif + " Backwards compatibility with old configurations. + if exists('g:notes_directory') + call xolox#misc#msg#warn("notes.vim %s: Please upgrade your configuration, see :help notes-backwards-compatibility", g:xolox#notes#version) + let g:notes_directories = [g:notes_directory] + unlet g:notes_directory + endif + " Define the default location where the user's notes are saved? + if !exists('g:notes_directories') + let g:notes_directories = [xolox#misc#path#merge(localdir, 'user')] + endif + call s:create_notes_directories() + " Define the default location of the shadow directory with predefined notes? + if !exists('g:notes_shadowdir') + let g:notes_shadowdir = xolox#misc#path#merge(systemdir, 'shadow') + endif + " Define the default location for the full text index. + if !exists('g:notes_indexfile') + let g:notes_indexfile = xolox#misc#path#merge(localdir, 'index.pickle') + endif + " Define the default location for the keyword scanner script. + if !exists('g:notes_indexscript') + let g:notes_indexscript = xolox#misc#path#merge(systemdir, 'search-notes.py') + endif + " Define the default suffix for note filenames. + if !exists('g:notes_suffix') + let g:notes_suffix = '' + endif + " Define the default location for the tag name index (used for completion). + if !exists('g:notes_tagsindex') + let g:notes_tagsindex = xolox#misc#path#merge(localdir, 'tags.txt') + endif + " Define the default location for the file containing the most recent note's + " filename. + if !exists('g:notes_recentindex') + let g:notes_recentindex = xolox#misc#path#merge(localdir, 'recent.txt') + endif + " Define the default location of the template for HTML conversion. + if !exists('g:notes_html_template') + let g:notes_html_template = xolox#misc#path#merge(localdir, 'template.html') + endif + " Define the default action when a note's filename and title are out of sync. + if !exists('g:notes_title_sync') + " Valid values are "no", "change_title", "rename_file" and "prompt". + let g:notes_title_sync = 'prompt' + endif + " Smart quotes and such are enabled by default. + if !exists('g:notes_smart_quotes') + let g:notes_smart_quotes = 1 + endif + " Tab/Shift-Tab is used to indent/dedent list items by default. + if !exists('g:notes_tab_indents') + let g:notes_tab_indents = 1 + endif + " Alt-Left/Alt-Right is used to indent/dedent list items by default. + if !exists('g:notes_alt_indents') + let g:notes_alt_indents = 1 + endif + " Text used for horizontal rulers. + if !exists('g:notes_ruler_text') + let g:notes_ruler_text = repeat(' ', ((&tw > 0 ? &tw : 79) - 5) / 2) . '* * *' + endif + " Symbols used to denote list items with increasing nesting levels. + let g:notes_unicode_bullets = ['•', '◦', '▸', '▹', '▪', '▫'] + let g:notes_ascii_bullets = ['*', '-', '+'] + if !exists('g:notes_list_bullets') + if xolox#notes#unicode_enabled() + let g:notes_list_bullets = g:notes_unicode_bullets + else + let g:notes_list_bullets = g:notes_ascii_bullets + endif + endif +endfunction + +function! s:create_notes_directories() + for directory in xolox#notes#find_directories(0) + if !isdirectory(directory) + call xolox#misc#msg#info("notes.vim %s: Creating notes directory %s (first run?) ..", g:xolox#notes#version, directory) + call mkdir(directory, 'p') + endif + if filewritable(directory) != 2 + call xolox#misc#msg#warn("notes.vim %s: The notes directory %s is not writable!", g:xolox#notes#version, directory) + endif + endfor +endfunction + +function! xolox#notes#shortcut() " {{{1 + " The "note:" pseudo protocol is just a shortcut for the :Note command. + let expression = expand('') + let bufnr_save = bufnr('%') + call xolox#misc#msg#debug("notes.vim %s: Expanding shortcut %s ..", g:xolox#notes#version, string(expression)) + let substring = matchstr(expression, 'note:\zs.*') + call xolox#misc#msg#debug("notes.vim %s: Editing note based on title substring %s ..", g:xolox#notes#version, string(substring)) + call xolox#notes#edit(v:cmdbang ? '!' : '', substring) + " Clean up the buffer with the name "note:..."? + let pathname = fnamemodify(bufname(bufnr_save), ':p') + let basename = fnamemodify(pathname, ':t') + if basename =~ '^note:' + call xolox#misc#msg#debug("notes.vim %s: Cleaning up buffer #%i - %s", g:xolox#notes#version, bufnr_save, pathname) + execute 'bwipeout' bufnr_save + endif +endfunction + +function! xolox#notes#edit(bang, title) abort " {{{1 + " Edit an existing note or create a new one with the :Note command. + let starttime = xolox#misc#timer#start() + let title = xolox#misc#str#trim(a:title) + if title != '' + let fname = xolox#notes#select(title) + if fname != '' + call xolox#misc#msg#debug("notes.vim %s: Editing existing note: %s", g:xolox#notes#version, fname) + execute 'edit' . a:bang fnameescape(fname) + if !xolox#notes#unicode_enabled() && xolox#misc#path#equals(fnamemodify(fname, ':h'), g:notes_shadowdir) + call s:transcode_utf8_latin1() + endif + call xolox#notes#set_filetype() + call xolox#misc#timer#stop('notes.vim %s: Opened note in %s.', g:xolox#notes#version, starttime) + return + endif + else + let title = 'New note' + endif + " At this point we're dealing with a new note. + let fname = xolox#notes#title_to_fname(title) + noautocmd execute 'edit' . a:bang fnameescape(fname) + if line('$') == 1 && getline(1) == '' + let fname = xolox#misc#path#merge(g:notes_shadowdir, 'New note') + execute 'silent read' fnameescape(fname) + 1delete + if !xolox#notes#unicode_enabled() + call s:transcode_utf8_latin1() + endif + setlocal nomodified + endif + if title != 'New note' + call setline(1, title) + endif + call xolox#notes#set_filetype() + doautocmd BufReadPost + call xolox#misc#timer#stop('notes.vim %s: Started new note in %s.', g:xolox#notes#version, starttime) +endfunction + +function! xolox#notes#check_sync_title() " {{{1 + " Check if the note's title and filename are out of sync. + if g:notes_title_sync != 'no' && xolox#notes#buffer_is_note() && &buftype == '' + let title = xolox#notes#current_title() + let name_on_disk = xolox#misc#path#absolute(expand('%:p')) + let name_from_title = xolox#notes#title_to_fname(title) + if !xolox#misc#path#equals(name_on_disk, name_from_title) + call xolox#misc#msg#debug("notes.vim %s: Filename (%s) doesn't match note title (%s)", g:xolox#notes#version, name_on_disk, name_from_title) + let action = g:notes_title_sync + if action == 'prompt' && empty(name_from_title) + " There's no point in prompting the user when there's only one choice. + let action = 'change_title' + elseif action == 'prompt' + " Prompt the user what to do (if anything). First we perform a redraw + " to make sure the note's content is visible (without this the Vim + " window would be blank in my tests). + redraw + let message = "The note's title and filename do not correspond. What do you want to do?\n\n" + let message .= "Current filename: " . s:sync_value(name_on_disk) . "\n" + let message .= "Corresponding title: " . s:sync_value(xolox#notes#fname_to_title(name_on_disk)) . "\n\n" + let message .= "Current title: " . s:sync_value(title) . "\n" + let message .= "Corresponding filename: " . s:sync_value(xolox#notes#title_to_fname(title)) + let choice = confirm(message, "Change &title\nRename &file\nDo ¬hing", 3, 'Question') + if choice == 1 + let action = 'change_title' + elseif choice == 2 + let action = 'rename_file' + else + " User chose to do nothing or 'd the prompt. + return + endif + " Intentional fall through here :-) + endif + if action == 'change_title' + let new_title = xolox#notes#fname_to_title(name_on_disk) + call setline(1, new_title) + setlocal modified + call xolox#misc#msg#info("notes.vim %s: Changed note title to match filename.", g:xolox#notes#version) + elseif action == 'rename_file' + let new_fname = xolox#notes#title_to_fname(xolox#notes#current_title()) + if rename(name_on_disk, new_fname) == 0 + execute 'edit' fnameescape(new_fname) + call xolox#notes#set_filetype() + call xolox#misc#msg#info("notes.vim %s: Renamed file to match note title.", g:xolox#notes#version) + else + call xolox#misc#msg#warn("notes.vim %s: Failed to rename file to match note title?!", g:xolox#notes#version) + endif + endif + endif + endif +endfunction + +function! s:sync_value(s) + let s = xolox#misc#str#trim(a:s) + return empty(s) ? '(none)' : s +endfunction + +function! xolox#notes#from_selection(bang, cmd) " {{{1 + " Edit a note with the visually selected text as title. + let selection = s:get_visual_selection() + if a:cmd != 'edit' | execute a:cmd | endif + call xolox#notes#edit(a:bang, selection) +endfunction + +function! s:get_visual_selection() + " Why is this not a built-in Vim script function?! See also the question at + " http://stackoverflow.com/questions/1533565 but note that none of the code + " posted there worked for me so I wrote this function. + let [lnum1, col1] = getpos("'<")[1:2] + let [lnum2, col2] = getpos("'>")[1:2] + let lines = getline(lnum1, lnum2) + let lines[-1] = lines[-1][: col2 - (&selection == 'inclusive' ? 1 : 2)] + let lines[0] = lines[0][col1 - 1:] + return join(lines, ' ') +endfunction + +function! xolox#notes#edit_shadow() " {{{1 + " People using latin1 don't like the UTF-8 curly quotes and bullets used in + " the predefined notes because there are no equivalent characters in latin1, + " resulting in the characters being shown as garbage or a question mark. + execute 'edit' fnameescape(expand('')) + if !xolox#notes#unicode_enabled() + call s:transcode_utf8_latin1() + endif + call xolox#notes#set_filetype() +endfunction + +function! xolox#notes#unicode_enabled() + return &encoding == 'utf-8' +endfunction + +function! s:transcode_utf8_latin1() + let view = winsaveview() + silent %s/\%xe2\%x80\%x98/`/eg + silent %s/\%xe2\%x80\%x99/'/eg + silent %s/\%xe2\%x80[\x9c\x9d]/"/eg + silent %s/\%xe2\%x80\%xa2/\*/eg + setlocal nomodified + call winrestview(view) +endfunction + +function! xolox#notes#select(filter) " {{{1 + " Interactively select an existing note whose title contains {filter}. + let notes = {} + let filter = xolox#misc#str#trim(a:filter) + for [fname, title] in items(xolox#notes#get_fnames_and_titles(1)) + if title ==? filter + call xolox#misc#msg#debug("notes.vim %s: Filter %s exactly matches note: %s", g:xolox#notes#version, string(filter), title) + return fname + elseif title =~? filter + let notes[fname] = title + endif + endfor + if len(notes) == 1 + let fname = keys(notes)[0] + call xolox#misc#msg#debug("notes.vim %s: Filter %s matched one note: %s", g:xolox#notes#version, string(filter), fname) + return fname + elseif !empty(notes) + call xolox#misc#msg#debug("notes.vim %s: Filter %s matched %i notes.", g:xolox#notes#version, string(filter), len(notes)) + let choices = ['Please select a note:'] + let values = [''] + for fname in sort(keys(notes), 1) + call add(choices, ' ' . len(choices) . ') ' . notes[fname]) + call add(values, fname) + endfor + let choice = inputlist(choices) + if choice > 0 && choice < len(choices) + let fname = values[choice] + call xolox#misc#msg#debug("notes.vim %s: User selected note: %s", g:xolox#notes#version, fname) + return fname + endif + endif + return '' +endfunction + +function! xolox#notes#cmd_complete(arglead, cmdline, cursorpos) " {{{1 + " Vim's support for custom command completion is a real mess, specifically + " the completion of multi word command arguments. With or without escaping + " of spaces, arglead will only contain the last word in the arguments passed + " to :Note, and worse, the completion candidates we return only replace the + " last word on the command line. + " XXX This isn't a real command line parser; it will break on quoted pipes. + let cmdline = split(a:cmdline, '\\\@ after the argument) we can select the + " completion candidates using a substring match on the first argument + " instead of a prefix match (I consider this to be more user friendly). + let pattern = xolox#misc#escape#pattern(cmdargs) + call filter(titles, "v:val =~ pattern") + else + " If we are completing more than one argument or the user has typed + " after the first argument, we must select completion + " candidates using a prefix match on all arguments because Vim doesn't + " support replacing previous arguments (selecting completion candidates + " using a substring match would result in invalid note titles). + let pattern = '^' . xolox#misc#escape#pattern(cmdargs) + call filter(titles, "v:val =~ pattern") + " Remove the given arguments as the prefix of every completion candidate + " because Vim refuses to replace previous arguments. + let prevargs = '^' . xolox#misc#escape#pattern(cmdargs[0 : len(cmdargs) - len(a:arglead) - 1]) + call map(titles, 'substitute(v:val, prevargs, "", "")') + endif + " Sort from shortest to longest as a rough approximation of + " sorting by similarity to the word that's being completed. + return reverse(sort(titles, 's:sort_longest_to_shortest')) +endfunction + +function! xolox#notes#user_complete(findstart, base) " {{{1 + " Completion of note titles with Control-X Control-U. + if a:findstart + let line = getline('.')[0 : col('.') - 2] + let words = split(line) + if !empty(words) + return col('.') - len(words[-1]) - 1 + else + return -1 + endif + else + let titles = xolox#notes#get_titles(1) + if !empty(a:base) + let pattern = xolox#misc#escape#pattern(a:base) + call filter(titles, 'v:val =~ pattern') + endif + return titles + endif +endfunction + +function! xolox#notes#omni_complete(findstart, base) " {{{1 + " Completion of tag names with Control-X Control-O. + if a:findstart + " For now we assume omni completion was triggered by the mapping for + " automatic tag completion. Eventually it might be nice to check for a + " leading "@" here and otherwise make it complete e.g. note names, so that + " there's only one way to complete inside notes and the plug-in is smart + " enough to know what the user wants to complete :-) + return col('.') + else + return sort(keys(xolox#notes#tags#load_index()), 1) + endif +endfunction + +function! xolox#notes#save() abort " {{{1 + " When the current note's title is changed, automatically rename the file. + if xolox#notes#filetype_is_note(&ft) + let title = xolox#notes#current_title() + let oldpath = expand('%:p') + let newpath = xolox#notes#title_to_fname(title) + if newpath == '' + echoerr "Invalid note title" + return + endif + let bang = v:cmdbang ? '!' : '' + execute 'saveas' . bang fnameescape(newpath) + " XXX If {oldpath} and {newpath} end up pointing to the same file on disk + " yet xolox#misc#path#equals() doesn't catch this, we might end up + " deleting the user's one and only note! One way to circumvent this + " potential problem is to first delete the old note and then save the new + " note. The problem with this approach is that :saveas might fail in which + " case we've already deleted the old note... + if !xolox#misc#path#equals(oldpath, newpath) + if !filereadable(newpath) + let message = "The notes plug-in tried to rename your note but failed to create %s so won't delete %s or you could lose your note! This should never happen... If you don't mind me borrowing some of your time, please contact me at peter@peterodding.com and include the old and new filename so that I can try to reproduce the issue. Thanks!" + call confirm(printf(message, string(newpath), string(oldpath))) + return + endif + call delete(oldpath) + endif + " Update the tags index on disk and in-memory. + call xolox#notes#tags#forget_note(xolox#notes#fname_to_title(oldpath)) + call xolox#notes#tags#scan_note(title, join(getline(1, '$'), "\n")) + call xolox#notes#tags#save_index() + " Update in-memory list of all notes. + call xolox#notes#cache_del(oldpath) + call xolox#notes#cache_add(newpath, title) + endif +endfunction + +function! xolox#notes#delete(bang, title) " {{{1 + " Delete the note {title} and close the associated buffer & window. + " If no {title} is given the current note is deleted. + let title = xolox#misc#str#trim(a:title) + if title == '' + " Try the current buffer. + let title = xolox#notes#fname_to_title(expand('%:p')) + endif + if !xolox#notes#exists(title) + call xolox#misc#msg#warn("notes.vim %s: Failed to delete %s! (not a note)", g:xolox#notes#version, expand('%:p')) + else + let filename = xolox#notes#title_to_fname(title) + if filereadable(filename) && delete(filename) + call xolox#misc#msg#warn("notes.vim %s: Failed to delete %s!", g:xolox#notes#version, filename) + else + call xolox#notes#cache_del(filename) + execute 'bdelete' . a:bang . ' ' . bufnr(filename) + endif + endif +endfunction + +function! xolox#notes#search(bang, input) " {{{1 + " Search all notes for the pattern or keywords {input} (current word if none given). + try + let starttime = xolox#misc#timer#start() + let input = a:input + if input == '' + let input = s:tag_under_cursor() + if input == '' + call xolox#misc#msg#warn("notes.vim %s: No string under cursor", g:xolox#notes#version) + return + endif + endif + if input =~ '^/.\+/$' + call s:internal_search(a:bang, input, '', '') + call s:set_quickfix_title([], input) + else + let keywords = split(input) + let all_keywords = s:match_all_keywords(keywords) + let any_keyword = s:match_any_keyword(keywords) + call s:internal_search(a:bang, all_keywords, input, any_keyword) + if &buftype == 'quickfix' + " Enable line wrapping in the quick-fix window. + setlocal wrap + " Resize the quick-fix window to 1/3 of the screen height. + let max_height = &lines / 3 + execute 'resize' max_height + " Make it smaller if the content doesn't fill the window. + normal G$ + let preferred_height = winline() + execute 'resize' min([max_height, preferred_height]) + normal gg + call s:set_quickfix_title(keywords, '') + endif + endif + call xolox#misc#timer#stop("notes.vim %s: Searched notes in %s.", g:xolox#notes#version, starttime) + catch /^Vim\%((\a\+)\)\=:E480/ + call xolox#misc#msg#warn("notes.vim %s: No matches", g:xolox#notes#version) + endtry +endfunction + +function! s:tag_under_cursor() " {{{2 + " Get the word or @tag under the text cursor. + try + let isk_save = &isk + set iskeyword+=@-@ + return expand('') + finally + let &isk = isk_save + endtry +endfunction + +function! s:match_all_keywords(keywords) " {{{2 + " Create a regex that matches when a file contains all {keywords}. + let results = copy(a:keywords) + call map(results, '''\_^\_.*'' . xolox#misc#escape#pattern(v:val)') + return '/' . escape(join(results, '\&'), '/') . '/' +endfunction + +function! s:match_any_keyword(keywords) " {{{2 + " Create a regex that matches every occurrence of all {keywords}. + let results = copy(a:keywords) + call map(results, 'xolox#misc#escape#pattern(v:val)') + return '/' . escape(join(results, '\|'), '/') . '/' +endfunction + +function! s:set_quickfix_title(keywords, pattern) " {{{2 + " Set the title of the quick-fix window. + if &buftype == 'quickfix' + let num_notes = len(xolox#misc#list#unique(map(getqflist(), 'v:val["bufnr"]'))) + if len(a:keywords) > 0 + let keywords = map(copy(a:keywords), '"`" . v:val . "''"') + let w:quickfix_title = printf('Found %i note%s containing the word%s %s', + \ num_notes, num_notes == 1 ? '' : 's', + \ len(keywords) == 1 ? '' : 's', + \ len(keywords) > 1 ? (join(keywords[0:-2], ', ') . ' and ' . keywords[-1]) : keywords[0]) + else + let w:quickfix_title = printf('Found %i note%s containing the pattern %s', + \ num_notes, num_notes == 1 ? '' : 's', + \ a:pattern) + endif + endif +endfunction + +function! xolox#notes#related(bang) " {{{1 + " Find all notes related to the current note or file. + let starttime = xolox#misc#timer#start() + let bufname = bufname('%') + if bufname == '' + call xolox#misc#msg#warn("notes.vim %s: :RelatedNotes only works on named buffers!", g:xolox#notes#version) + else + let filename = xolox#misc#path#absolute(bufname) + if xolox#notes#buffer_is_note() + let keywords = xolox#notes#current_title() + let pattern = '\<' . s:words_to_pattern(keywords) . '\>' + else + let pattern = s:words_to_pattern(filename) + let keywords = filename + if filename[0 : len($HOME)-1] == $HOME + let relative = filename[len($HOME) + 1 : -1] + let pattern = '\(' . pattern . '\|\~/' . s:words_to_pattern(relative) . '\)' + let keywords = relative + endif + endif + let pattern = '/' . escape(pattern, '/') . '/' + let friendly_path = fnamemodify(filename, ':~') + try + call s:internal_search(a:bang, pattern, keywords, '') + if &buftype == 'quickfix' + let w:quickfix_title = 'Notes related to ' . friendly_path + endif + catch /^Vim\%((\a\+)\)\=:E480/ + call xolox#misc#msg#warn("notes.vim %s: No related notes found for %s", g:xolox#notes#version, friendly_path) + endtry + endif + call xolox#misc#timer#stop("notes.vim %s: Found related notes in %s.", g:xolox#notes#version, starttime) +endfunction + +" Miscellaneous functions. {{{1 + +function! xolox#notes#find_directories(include_shadow_directory) " {{{2 + " Generate a list of absolute pathnames of all notes directories. + let directories = copy(g:notes_directories) + " Add the shadow directory? + if a:include_shadow_directory + call add(directories, g:notes_shadowdir) + endif + " Return the expanded directory pathnames. + return map(directories, 'expand(v:val)') +endfunction + +function! xolox#notes#set_filetype() " {{{2 + " Load the notes file type if not already loaded. + if &filetype != 'notes' + " Change the file type. + setlocal filetype=notes + elseif synID(1, 1, 0) == 0 + " Load the syntax. When you execute :RecentNotes, switch to a different + " buffer and then return to the buffer created by :RecentNotes, it will + " have lost its syntax highlighting. The following line of code solves + " this problem. We don't explicitly set the syntax to 'notes' so that we + " preserve dot separated composed values. + let &syntax = &syntax + endif +endfunction + +function! xolox#notes#swaphack() " {{{2 + " Selectively ignore the dreaded E325 interactive prompt. + if exists('s:swaphack_enabled') + let v:swapchoice = 'o' + endif +endfunction + +function! xolox#notes#autocmd_pattern(directory, use_extension) " {{{2 + " Generate a normalized automatic command pattern. First we resolve the path + " to the directory with notes (eliminating any symbolic links) so that the + " automatic command also applies to symbolic links pointing to notes (Vim + " matches filename patterns in automatic commands after resolving + " filenames). + let directory = xolox#misc#path#absolute(a:directory) + " On Windows we have to replace backslashes with forward slashes, otherwise + " the automatic command will never trigger! This has to happen before we + " make the fnameescape() call. + if xolox#misc#os#is_win() + let directory = substitute(directory, '\\', '/', 'g') + endif + " Escape the directory but not the trailing "*". + let pattern = fnameescape(directory) . '/*' + if a:use_extension && !empty(g:notes_suffix) + let pattern .= g:notes_suffix + endif + " On Windows the pattern won't match if it contains repeating slashes. + return substitute(pattern, '/\+', '/', 'g') +endfunction + +function! xolox#notes#filetype_is_note(ft) " {{{2 + " Check whether the given file type value refers to the notes.vim plug-in. + return index(split(a:ft, '\.'), 'notes') >= 0 +endfunction + +function! xolox#notes#buffer_is_note() " {{{2 + " Check whether the current buffer is a note (with the correct file type and path). + let bufpath = expand('%:p:h') + if xolox#notes#filetype_is_note(&ft) + for directory in xolox#notes#find_directories(1) + if xolox#misc#path#equals(bufpath, directory) + return 1 + endif + endfor + endif +endfunction + +function! xolox#notes#current_title() " {{{2 + " Get the title of the current note. + let title = getline(1) + let trimmed = xolox#misc#str#trim(title) + if title != trimmed + call setline(1, trimmed) + endif + return trimmed +endfunction + +function! xolox#notes#friendly_date(time) " {{{2 + " Format a date as a human readable string. + let format = '%A, %B %d, %Y' + let today = strftime(format, localtime()) + let yesterday = strftime(format, localtime() - 60*60*24) + let datestr = strftime(format, a:time) + if datestr == today + return "today" + elseif datestr == yesterday + return "yesterday" + else + return datestr + endif +endfunction + +function! s:internal_search(bang, pattern, keywords, phase2) " {{{2 + " Search notes for {pattern} regex, try to accelerate with {keywords} search. + let bufnr_save = bufnr('%') + let pattern = a:pattern + silent cclose + " Find all notes matching the given keywords or regex. + let notes = [] + let phase2_needed = 1 + if a:keywords != '' && s:run_scanner(a:keywords, notes) + if a:phase2 != '' + let pattern = a:phase2 + endif + else + call s:vimgrep_wrapper(a:bang, a:pattern, xolox#notes#get_fnames(0)) + let notes = s:qflist_to_filenames() + if a:phase2 != '' + let pattern = a:phase2 + else + let phase2_needed = 0 + endif + endif + if empty(notes) + call xolox#misc#msg#warn("notes.vim %s: No matches", g:xolox#notes#version) + return + endif + " If we performed a keyword search using the scanner.py script we need to + " run :vimgrep to populate the quick-fix list. If we're emulating keyword + " search using :vimgrep we need to run :vimgrep another time to get the + " quick-fix list in the right format :-| + if phase2_needed + call s:vimgrep_wrapper(a:bang, pattern, notes) + endif + if a:bang == '' && bufnr('%') != bufnr_save + " If :vimgrep opens the first matching file while &eventignore is still + " set the file will be opened without activating a file type plug-in or + " syntax script. Here's a workaround: + doautocmd filetypedetect BufRead + endif + silent cwindow + if &buftype == 'quickfix' + execute 'match IncSearch' (&ignorecase ? substitute(pattern, '^/', '/\\c', '') : pattern) + endif +endfunction + +function! s:vimgrep_wrapper(bang, pattern, files) " {{{2 + " Search for {pattern} in {files} using :vimgrep. + let starttime = xolox#misc#timer#start() + let args = map(copy(a:files), 'fnameescape(v:val)') + call insert(args, a:pattern . 'j') + let s:swaphack_enabled = 1 + try + let ei_save = &eventignore + set eventignore=syntax,bufread + execute 'vimgrep' . a:bang join(args) + call xolox#misc#timer#stop("notes.vim %s: Populated quick-fix window in %s.", g:xolox#notes#version, starttime) + finally + let &eventignore = ei_save + unlet s:swaphack_enabled + endtry +endfunction + +function! s:qflist_to_filenames() " {{{2 + " Get filenames of matched notes from quick-fix list. + let names = {} + for entry in getqflist() + let names[xolox#misc#path#absolute(bufname(entry.bufnr))] = 1 + endfor + return keys(names) +endfunction + +function! s:run_scanner(keywords, matches) " {{{2 + " Try to run scanner.py script to find notes matching {keywords}. + call xolox#misc#msg#info("notes.vim %s: Searching notes using keyword index ..", g:xolox#notes#version) + let [success, notes] = s:python_command(a:keywords) + if success + call xolox#misc#msg#debug("notes.vim %s: Search script reported %i matching note%s.", g:xolox#notes#version, len(notes), len(notes) == 1 ? '' : 's') + call extend(a:matches, notes) + return 1 + endif +endfunction + +function! xolox#notes#keyword_complete(arglead, cmdline, cursorpos) " {{{2 + " Search keyword completion for the :SearchNotes command. + call inputsave() + let [success, keywords] = s:python_command('--list=' . a:arglead) + call inputrestore() + return keywords +endfunction + +function! s:python_command(...) " {{{2 + " Vim function to interface with the "search-notes.py" script. + let script = xolox#misc#path#absolute(g:notes_indexscript) + let python = executable('python2') ? 'python2' : 'python' + let output = [] + let success = 0 + if !(executable(python) && filereadable(script)) + call xolox#misc#msg#debug("notes.vim %s: We can't execute the %s script!", g:xolox#notes#version, script) + else + let options = ['--database', g:notes_indexfile] + if &ignorecase + call add(options, '--ignore-case') + endif + for directory in xolox#notes#find_directories(0) + call extend(options, ['--notes', directory]) + endfor + let arguments = map([script] + options + a:000, 'xolox#misc#escape#shell(v:val)') + let command = join([python] + arguments) + call xolox#misc#msg#debug("notes.vim %s: Executing external command %s", g:xolox#notes#version, command) + if !filereadable(xolox#misc#path#absolute(g:notes_indexfile)) + call xolox#misc#msg#info("notes.vim %s: Building keyword index (this might take a while) ..", g:xolox#notes#version) + endif + let result = xolox#misc#os#exec({'command': command, 'check': 0}) + if result['exit_code'] != 0 + call xolox#misc#msg#warn("notes.vim %s: Search script failed! Context: %s", g:xolox#notes#version, string(result)) + else + let lines = result['stdout'] + call xolox#misc#msg#debug("notes.vim %s: Search script output (raw): %s", g:xolox#notes#version, string(lines)) + if !empty(lines) && lines[0] == 'Python works fine!' + let output = lines[1:] + let success = 1 + call xolox#misc#msg#debug("notes.vim %s: Search script output (processed): %s", g:xolox#notes#version, string(output)) + else + call xolox#misc#msg#warn("notes.vim %s: Search script returned invalid output :-(", g:xolox#notes#version) + endif + endif + endif + return [success, output] +endfunction + +" Getters for filenames & titles of existing notes. {{{2 + +if !exists('s:cache_mtime') + let s:have_cached_names = 0 + let s:have_cached_titles = 0 + let s:have_cached_items = 0 + let s:cached_fnames = [] + let s:cached_titles = [] + let s:cached_pairs = {} + let s:cache_mtime = 0 + let s:shadow_notes = ['New note', 'Note taking commands', 'Note taking syntax'] +endif + +function! xolox#notes#get_fnames(include_shadow_notes) " {{{3 + " Get list with filenames of all existing notes. + if !s:have_cached_names + let starttime = xolox#misc#timer#start() + for directory in xolox#notes#find_directories(0) + let pattern = xolox#misc#path#merge(directory, '*') + let listing = glob(xolox#misc#path#absolute(pattern)) + call extend(s:cached_fnames, filter(split(listing, '\n'), 'filereadable(v:val)')) + endfor + let s:have_cached_names = 1 + call xolox#misc#timer#stop('notes.vim %s: Cached note filenames in %s.', g:xolox#notes#version, starttime) + endif + let fnames = copy(s:cached_fnames) + if a:include_shadow_notes + for title in s:shadow_notes + call add(fnames, xolox#misc#path#merge(g:notes_shadowdir, title)) + endfor + endif + return fnames +endfunction + +function! xolox#notes#get_titles(include_shadow_notes) " {{{3 + " Get list with titles of all existing notes. + if !s:have_cached_titles + let starttime = xolox#misc#timer#start() + for filename in xolox#notes#get_fnames(0) + call add(s:cached_titles, xolox#notes#fname_to_title(filename)) + endfor + let s:have_cached_titles = 1 + call xolox#misc#timer#stop('notes.vim %s: Cached note titles in %s.', g:xolox#notes#version, starttime) + endif + let titles = copy(s:cached_titles) + if a:include_shadow_notes + call extend(titles, s:shadow_notes) + endif + return titles +endfunction + +function! xolox#notes#exists(title) " {{{3 + " Return true if the note {title} exists. + return index(xolox#notes#get_titles(0), a:title, 0, xolox#misc#os#is_win()) >= 0 +endfunction + +function! xolox#notes#get_fnames_and_titles(include_shadow_notes) " {{{3 + " Get dictionary of filename => title pairs of all existing notes. + if !s:have_cached_items + let starttime = xolox#misc#timer#start() + let fnames = xolox#notes#get_fnames(0) + let titles = xolox#notes#get_titles(0) + let limit = len(fnames) + let index = 0 + while index < limit + let s:cached_pairs[fnames[index]] = titles[index] + let index += 1 + endwhile + let s:have_cached_items = 1 + call xolox#misc#timer#stop('notes.vim %s: Cached note filenames and titles in %s.', g:xolox#notes#version, starttime) + endif + let pairs = copy(s:cached_pairs) + if a:include_shadow_notes + for title in s:shadow_notes + let fname = xolox#misc#path#merge(g:notes_shadowdir, title) + let pairs[fname] = title + endfor + endif + return pairs +endfunction + +function! xolox#notes#fname_to_title(filename) " {{{3 + " Convert absolute note {filename} to title. + let fname = a:filename + " Strip suffix? + if fname[-len(g:notes_suffix):] == g:notes_suffix + let fname = fname[0:-len(g:notes_suffix)-1] + endif + " Strip directory path. + let fname = fnamemodify(fname, ':t') + " Decode special characters. + return xolox#misc#path#decode(fname) +endfunction + +function! xolox#notes#title_to_fname(title) " {{{3 + " Convert note {title} to absolute filename. + let filename = xolox#misc#path#encode(a:title) + if filename != '' + let directory = xolox#notes#select_directory() + let pathname = xolox#misc#path#merge(directory, filename . g:notes_suffix) + return xolox#misc#path#absolute(pathname) + endif + return '' +endfunction + +function! xolox#notes#select_directory() " {{{3 + " Pick the best suited directory for creating a new note. + let bufdir = expand('%:p:h') + let notes_directories = xolox#notes#find_directories(0) + for directory in notes_directories + if xolox#misc#path#equals(bufdir, directory) + return directory + endif + endfor + return notes_directories[0] +endfunction + +function! xolox#notes#cache_add(filename, title) " {{{3 + " Add {filename} and {title} of new note to cache. + let filename = xolox#misc#path#absolute(a:filename) + if index(s:cached_fnames, filename) == -1 + call add(s:cached_fnames, filename) + if !empty(s:cached_titles) + call add(s:cached_titles, a:title) + endif + if !empty(s:cached_pairs) + let s:cached_pairs[filename] = a:title + endif + let s:cache_mtime = localtime() + endif +endfunction + +function! xolox#notes#cache_del(filename) " {{{3 + " Delete {filename} from cache. + let filename = xolox#misc#path#absolute(a:filename) + let index = index(s:cached_fnames, filename) + if index >= 0 + call remove(s:cached_fnames, index) + if !empty(s:cached_titles) + call remove(s:cached_titles, index) + endif + if !empty(s:cached_pairs) + call remove(s:cached_pairs, filename) + endif + let s:cache_mtime = localtime() + endif +endfunction + +function! xolox#notes#unload_from_cache() " {{{3 + " Forget deleted notes automatically (called by "BufUnload" automatic command). + let bufname = expand(':p') + if !filereadable(bufname) + call xolox#notes#cache_del(bufname) + endif +endfunction + +" Functions called by the file type plug-in and syntax script. {{{2 + +function! xolox#notes#insert_ruler() " {{{3 + " Insert horizontal ruler delimited by empty lines. + let lnum = line('.') + if getline(lnum) =~ '\S' && getline(lnum + 1) !~ '\S' + let lnum += 1 + endif + let line1 = prevnonblank(lnum) + let line2 = nextnonblank(lnum) + if line1 < lnum && line2 > lnum + execute printf('%i,%idelete', line1 + 1, line2 - 1) + endif + call append(line1, ['', g:notes_ruler_text, '']) +endfunction + +function! xolox#notes#insert_quote(style) " {{{3 + " XXX When I pass the below string constants as arguments from the file type + " plug-in the resulting strings contain mojibake (UTF-8 interpreted as + " latin1?) even if both scripts contain a UTF-8 BOM! Maybe a bug in Vim?! + if xolox#notes#unicode_enabled() + let [open_quote, close_quote] = a:style == 1 ? ['‘', '’'] : ['“', '”'] + else + let [open_quote, close_quote] = a:style == 1 ? ['`', "'"] : ['"', '"'] + endif + return getline('.')[col('.')-2] =~ '[^\t (]$' ? close_quote : open_quote +endfunction + +function! xolox#notes#insert_bullet(chr) " {{{3 + " Insert a UTF-8 list bullet when the user types "*". + if getline('.')[0 : max([0, col('.') - 2])] =~ '^\s*$' + return xolox#notes#get_bullet(a:chr) + endif + return a:chr +endfunction + +function! xolox#notes#get_bullet(chr) + return xolox#notes#unicode_enabled() ? '•' : a:chr +endfunction + +function! xolox#notes#indent_list(direction, line1, line2) " {{{3 + " Change indent of list items from {line1} to {line2} using {command}. + let indentstr = repeat(' ', &tabstop) + if a:line1 == a:line2 && getline(a:line1) == '' + call setline(a:line1, indentstr) + else + " Regex to match a leading bullet. + let leading_bullet = xolox#notes#leading_bullet_pattern() + for lnum in range(a:line1, a:line2) + let line = getline(lnum) + " Calculate new nesting level, should not result in < 0. + let level = max([0, xolox#notes#get_list_level(line) + a:direction]) + if a:direction == 1 + " Indent the line. + let line = indentstr . line + else + " Unindent the line. + let line = substitute(line, '^' . indentstr, '', '') + endif + " Replace the bullet. + let bullet = g:notes_list_bullets[level % len(g:notes_list_bullets)] + call setline(lnum, substitute(line, leading_bullet, xolox#misc#escape#substitute(bullet), '')) + endfor + " Regex to match a trailing bullet. + if getline('.') =~ xolox#notes#trailing_bullet_pattern() + " Restore trailing space after list bullet. + call setline('.', getline('.') . ' ') + endif + endif + normal $ +endfunction + +function! xolox#notes#leading_bullet_pattern() + " Return a regular expression pattern that matches any leading list bullet. + let escaped_bullets = copy(g:notes_list_bullets) + call map(escaped_bullets, 'xolox#misc#escape#pattern(v:val)') + return '\(\_^\s*\)\@<=\(' . join(escaped_bullets, '\|') . '\)' +endfunction + +function! xolox#notes#trailing_bullet_pattern() + " Return a regular expression pattern that matches any trailing list bullet. + let escaped_bullets = copy(g:notes_list_bullets) + call map(escaped_bullets, 'xolox#misc#escape#pattern(v:val)') + return '\(' . join(escaped_bullets, '\|') . '\|\*\)$' +endfunction + +function! xolox#notes#get_comments_option() + " Get the value for the &comments option including user defined list bullets. + let items = copy(g:notes_list_bullets) + call map(items, '": " . v:val . " "') + call add(items, ':> ') " <- e-mail style block quotes. + return join(items, ',') +endfunction + +function! xolox#notes#get_list_level(line) + " Get the nesting level of the list item on the given line. This will only + " work with the list item indentation style expected by the notes plug-in + " (that is, top level list items are indented with one space, each nested + " level below that is indented by pairs of three spaces). + return (len(matchstr(a:line, '^\s*')) - 1) / 3 +endfunction + +function! xolox#notes#cleanup_list() " {{{3 + " Automatically remove empty list items on Enter. + if getline('.') =~ (xolox#notes#leading_bullet_pattern() . '\s*$') + let s:sol_save = &startofline + setlocal nostartofline " <- so that clears the complete line + return "\0\d$\o" + else + if exists('s:sol_save') + let &l:startofline = s:sol_save + unlet s:sol_save + endif + return "\" + endif +endfunction + +function! xolox#notes#refresh_syntax() " {{{3 + " Update syntax highlighting of note names and code blocks. + if xolox#notes#filetype_is_note(&ft) && line('$') > 1 + let starttime = xolox#misc#timer#start() + call xolox#notes#highlight_names(0) + call xolox#notes#highlight_sources(0) + call xolox#misc#timer#stop("notes.vim %s: Refreshed highlighting in %s.", g:xolox#notes#version, starttime) + endif +endfunction + +function! xolox#notes#highlight_names(force) " {{{3 + " Highlight the names of all notes as "notesName" (linked to "Underlined"). + if a:force || !(exists('b:notes_names_last_highlighted') && b:notes_names_last_highlighted > s:cache_mtime) + let starttime = xolox#misc#timer#start() + let current_note = xolox#notes#current_title() + let titles = filter(xolox#notes#get_titles(1), '!empty(v:val) && v:val != current_note') + call map(titles, 's:words_to_pattern(v:val)') + call sort(titles, 's:sort_longest_to_shortest') + if hlexists('notesName') + syntax clear notesName + endif + execute 'syntax match notesName /\c\%>1l\%(' . escape(join(titles, '\|'), '/') . '\)/' + let b:notes_names_last_highlighted = localtime() + call xolox#misc#timer#stop("notes.vim %s: Highlighted note names in %s.", g:xolox#notes#version, starttime) + endif +endfunction + +function! s:words_to_pattern(words) + " Quote regex meta characters, enable matching of hard wrapped words. + return substitute(xolox#misc#escape#pattern(a:words), '\s\+', '\\_s\\+', 'g') +endfunction + +function! s:sort_longest_to_shortest(a, b) + " Sort note titles by length, starting with the shortest. + return len(a:a) < len(a:b) ? 1 : -1 +endfunction + +function! xolox#notes#highlight_sources(force) " {{{3 + " Syntax highlight source code embedded in notes. + let starttime = xolox#misc#timer#start() + " Look for code blocks in the current note. + let filetypes = {} + for line in getline(1, '$') + let ft = matchstr(line, '{{' . '{\zs\w\+\>') + if ft !~ '^\d*$' | let filetypes[ft] = 1 | endif + endfor + " Don't refresh the highlighting if nothing has changed. + if !a:force && exists('b:notes_previous_sources') && b:notes_previous_sources == filetypes + return + else + let b:notes_previous_sources = filetypes + endif + " Now we're ready to actually highlight the code blocks. + if !empty(filetypes) + let startgroup = 'notesCodeStart' + let endgroup = 'notesCodeEnd' + for ft in keys(filetypes) + let group = 'notesSnippet' . toupper(ft) + let include = s:syntax_include(ft) + let command = 'syntax region %s matchgroup=%s start="{{{%s" matchgroup=%s end="}}}" keepend contains=%s%s' + execute printf(command, group, startgroup, ft, endgroup, include, has('conceal') ? ' concealends' : '') + endfor + if &vbs >= 1 + call xolox#misc#timer#stop("notes.vim %s: Highlighted embedded %s sources in %s.", g:xolox#notes#version, join(sort(keys(filetypes)), '/'), starttime) + endif + endif +endfunction + +function! s:syntax_include(filetype) + " Include the syntax highlighting of another {filetype}. + let grouplistname = '@' . toupper(a:filetype) + " Unset the name of the current syntax while including the other syntax + " because some syntax scripts do nothing when "b:current_syntax" is set. + if exists('b:current_syntax') + let syntax_save = b:current_syntax + unlet b:current_syntax + endif + try + execute 'syntax include' grouplistname 'syntax/' . a:filetype . '.vim' + execute 'syntax include' grouplistname 'after/syntax/' . a:filetype . '.vim' + catch /E484/ + " Ignore missing scripts. + endtry + " Restore the name of the current syntax. + if exists('syntax_save') + let b:current_syntax = syntax_save + elseif exists('b:current_syntax') + unlet b:current_syntax + endif + return grouplistname +endfunction + +function! xolox#notes#include_expr(fname) " {{{3 + " Translate string {fname} to absolute filename of note. + " TODO Use inputlist() when more than one note matches?! + let notes = copy(xolox#notes#get_fnames_and_titles(1)) + let pattern = xolox#misc#escape#pattern(a:fname) + call filter(notes, 'v:val =~ pattern') + if !empty(notes) + let filtered_notes = items(notes) + let lnum = line('.') + for range in range(3) + let line1 = lnum - range + let line2 = lnum + range + let text = s:normalize_ws(join(getline(line1, line2), "\n")) + for [fname, title] in filtered_notes + if text =~? xolox#misc#escape#pattern(s:normalize_ws(title)) + return fname + endif + endfor + endfor + endif + return '' +endfunction + +function! s:normalize_ws(s) + " Enable string comparison that ignores differences in whitespace. + return xolox#misc#str#trim(substitute(a:s, '\_s\+', '', 'g')) +endfunction + +function! xolox#notes#foldexpr() " {{{3 + " Folding expression to fold atx style Markdown headings. + let lastlevel = foldlevel(v:lnum - 1) + let nextlevel = match(getline(v:lnum), '^#\+\zs') + let retval = '=' + if lastlevel <= 0 && nextlevel >= 1 + let retval = '>' . nextlevel + elseif nextlevel >= 1 + if lastlevel > nextlevel + let retval = '<' . nextlevel + else + let retval = '>' . nextlevel + endif + endif + if retval != '=' + " Check whether the change in folding introduced by 'rv' + " is invalidated because we're inside a code block. + let pos_save = getpos('.') + try + call setpos('.', [0, v:lnum, 1, 0]) + if search('{{{\|\(}}}\)', 'bnpW') == 1 + let retval = '=' + endif + finally + " Always restore the cursor position! + call setpos('.', pos_save) + endtry + endif + return retval +endfunction + +function! xolox#notes#foldtext() " {{{3 + " Replace atx style "#" markers with "-" fold marker. + let line = getline(v:foldstart) + if line == '' + let line = getline(v:foldstart + 1) + endif + let matches = matchlist(line, '^\(#\+\)\s*\(.*\)$') + if len(matches) >= 3 + let prefix = repeat('-', len(matches[1])) + return prefix . ' ' . matches[2] . ' ' + else + return line + endif +endfunction + +" }}}1 + +" Make sure the plug-in configuration has been properly initialized before +" any of the auto-load functions in this Vim script can be called. +call xolox#notes#init() + +" vim: ts=2 sw=2 et bomb diff --git a/sources_non_forked/vim-notes/autoload/xolox/notes/html.vim b/sources_non_forked/vim-notes/autoload/xolox/notes/html.vim new file mode 100644 index 00000000..35d19fb2 --- /dev/null +++ b/sources_non_forked/vim-notes/autoload/xolox/notes/html.vim @@ -0,0 +1,84 @@ +" Vim auto-load script +" Author: Peter Odding +" Last Change: June 23, 2013 +" URL: http://peterodding.com/code/vim/notes/ + +if !exists('g:notes_markdown_program') + let g:notes_markdown_program = 'markdown' +endif + +function! xolox#notes#html#view() " {{{1 + " Convert the current note to a web page and show the web page in a browser. + " Requires [Markdown] [markdown] to be installed; you'll get a warning if it + " isn't. + " + " [markdown]: http://en.wikipedia.org/wiki/Markdown + try + " Convert the note's text to HTML using Markdown. + let starttime = xolox#misc#timer#start() + let note_title = xolox#notes#current_title() + let filename = xolox#notes#title_to_fname(note_title) + let note_text = join(getline(1, '$'), "\n") + let raw_html = xolox#notes#html#convert_note(note_text) + let styled_html = xolox#notes#html#apply_template({ + \ 'encoding': &encoding, + \ 'title': note_title, + \ 'content': raw_html, + \ 'version': g:xolox#notes#version, + \ 'date': strftime('%A %B %d, %Y at %H:%M'), + \ 'filename': fnamemodify(filename, ':~'), + \ }) + let filename = s:create_temporary_file(note_title) + if writefile(split(styled_html, "\n"), filename) != 0 + throw printf("Failed to write HTML file! (%s)", filename) + endif + " Open the generated HTML in a web browser. + call xolox#misc#open#url('file://' . filename) + call xolox#misc#timer#stop("notes.vim %s: Rendered HTML preview in %s.", g:xolox#notes#version, starttime) + catch + call xolox#misc#msg#warn("notes.vim %s: %s at %s", g:xolox#notes#version, v:exception, v:throwpoint) + endtry +endfunction + +function! xolox#notes#html#convert_note(note_text) " {{{1 + " Convert a note's text to a web page (HTML) using the [Markdown text + " format] [markdown] as an intermediate format. This function takes the text + " of a note (the first argument) and converts it to HTML, returning a + " string. + if !executable(g:notes_markdown_program) + throw "HTML conversion requires the `markdown' program! On Debian/Ubuntu you can install it by executing `sudo apt-get install markdown'." + endif + let markdown = xolox#notes#markdown#convert_note(a:note_text) + let result = xolox#misc#os#exec({'command': g:notes_markdown_program, 'stdin': markdown}) + let html = join(result['stdout'], "\n") + return html +endfunction + +function! xolox#notes#html#apply_template(variables) " {{{1 + " The vim-notes plug-in contains a web page template that's used to provide + " a bit of styling when a note is converted to a web page and presented to + " the user. This function takes the original HTML produced by [Markdown] + " [markdown] (the first argument) and wraps it in the configured template, + " returning the final HTML as a string. + let filename = expand(g:notes_html_template) + call xolox#misc#msg#debug("notes.vim %s: Reading web page template from %s ..", g:xolox#notes#version, filename) + let template = join(readfile(filename), "\n") + let output = substitute(template, '{{\(.\{-}\)}}', '\= s:template_callback(a:variables)', 'g') + return output +endfunction + +function! s:template_callback(variables) " {{{1 + " Callback for xolox#notes#html#apply_template(). + let key = xolox#misc#str#trim(submatch(1)) + return get(a:variables, key, '') +endfunction + +function! s:create_temporary_file(note_title) " {{{1 + " Create a temporary filename for a note converted to an HTML document, + " based on the title of the note. + if !exists('s:temporary_directory') + let s:temporary_directory = xolox#misc#path#tempdir() + endif + let filename = xolox#misc#str#slug(a:note_title) . '.html' + return xolox#misc#path#merge(s:temporary_directory, filename) +endfunction diff --git a/sources_non_forked/vim-notes/autoload/xolox/notes/markdown.vim b/sources_non_forked/vim-notes/autoload/xolox/notes/markdown.vim new file mode 100644 index 00000000..55a221b6 --- /dev/null +++ b/sources_non_forked/vim-notes/autoload/xolox/notes/markdown.vim @@ -0,0 +1,94 @@ +" Vim auto-load script +" Author: Peter Odding +" Last Change: June 23, 2013 +" URL: http://peterodding.com/code/vim/notes/ + +function! xolox#notes#markdown#view() " {{{1 + " Convert the current note to a Markdown document and show the converted text. + let note_text = join(getline(1, '$'), "\n") + let markdown_text = xolox#notes#markdown#convert_note(note_text) + vnew + call setline(1, split(markdown_text, "\n")) + setlocal filetype=markdown +endfunction + +function! xolox#notes#markdown#convert_note(note_text) " {{{1 + " Convert a note's text to the [Markdown text format] [markdown]. The syntax + " used by vim-notes has a lot of similarities with Markdown, but there are + " some notable differences like the note title and the way code blocks are + " represented. This function takes the text of a note (the first argument) + " and converts it to the Markdown format, returning a string. + " + " [markdown]: http://en.wikipedia.org/wiki/Markdown + let starttime = xolox#misc#timer#start() + let blocks = xolox#notes#parser#parse_note(a:note_text) + call map(blocks, 'xolox#notes#markdown#convert_block(v:val)') + let markdown = join(blocks, "\n\n") + call xolox#misc#timer#stop("notes.vim %s: Converted note to Markdown in %s.", g:xolox#notes#version, starttime) + return markdown +endfunction + +function! xolox#notes#markdown#convert_block(block) " {{{1 + " Convert a single block produced by `xolox#misc#notes#parser#parse_note()` + " (the first argument, expected to be a dictionary) to the [Markdown text + " format] [markdown]. Returns a string. + if a:block.type == 'title' + let text = s:make_urls_explicit(a:block.text) + return printf("# %s", text) + elseif a:block.type == 'heading' + let marker = repeat('#', 1 + a:block.level) + let text = s:make_urls_explicit(a:block.text) + return printf("%s %s", marker, text) + elseif a:block.type == 'code' + let comment = "" + let text = xolox#misc#str#indent(xolox#misc#str#dedent(a:block.text), 4) + return join([comment, text], "\n\n") + elseif a:block.type == 'divider' + return '* * *' + elseif a:block.type == 'list' + let items = [] + if a:block.ordered + let counter = 1 + for item in a:block.items + let indent = repeat(' ', item.indent * 4) + let text = s:make_urls_explicit(item.text) + call add(items, printf("%s%d. %s", indent, counter, text)) + let counter += 1 + endfor + else + for item in a:block.items + let indent = repeat(' ', item.indent * 4) + let text = s:make_urls_explicit(item.text) + call add(items, printf("%s- %s", indent, text)) + endfor + endif + return join(items, "\n\n") + elseif a:block.type == 'block-quote' + let lines = [] + for line in a:block.lines + let prefix = repeat('>', line.level) + call add(lines, printf('%s %s', prefix, line.text)) + endfor + return join(lines, "\n") + elseif a:block.type == 'paragraph' + let text = s:make_urls_explicit(a:block.text) + if len(text) <= 50 && text =~ ':$' + let text = printf('**%s**', text) + endif + return text + else + let msg = "Encountered unsupported block: %s!" + throw printf(msg, string(a:block)) + endif +endfunction + +function! s:make_urls_explicit(text) " {{{1 + " In the vim-notes syntax, URLs are implicitly hyperlinks. + " In Markdown syntax they have to be wrapped in . + return substitute(a:text, g:xolox#notes#url_pattern, '\= s:url_callback(submatch(0))', 'g') +endfunction + +function! s:url_callback(url) + let label = substitute(a:url, '^\w\+:\(//\)\?', '', '') + return printf('[%s](%s)', label, a:url) +endfunction diff --git a/sources_non_forked/vim-notes/autoload/xolox/notes/parser.vim b/sources_non_forked/vim-notes/autoload/xolox/notes/parser.vim new file mode 100644 index 00000000..f8680039 --- /dev/null +++ b/sources_non_forked/vim-notes/autoload/xolox/notes/parser.vim @@ -0,0 +1,333 @@ +" Vim auto-load script +" Author: Peter Odding +" Last Change: July 18, 2013 +" URL: http://peterodding.com/code/vim/notes/ + +function! xolox#notes#parser#parse_note(text) " {{{1 + " Parser for the note taking syntax used by vim-notes. + let starttime = xolox#misc#timer#start() + let context = s:create_parse_context(a:text) + let note_title = context.next_line() + let blocks = [{'type': 'title', 'text': note_title}] + while context.has_more() + let chr = context.peek(1) + if chr == "\n" + " Ignore empty lines. + call context.next(1) + continue + elseif chr == '#' + let block = s:parse_heading(context) + elseif chr == '>' + let block = s:parse_block_quote(context) + elseif chr == '{' && context.peek(3) == "\{\{\{" + let block = s:parse_code_block(context) + else + let lookahead = s:match_bullet_or_divider(context, 0) + if !empty(lookahead) + if lookahead.type =~ 'list' + let block = s:parse_list(context) + elseif lookahead.type == 'divider' + let block = s:parse_divider(context) + else + let msg = "Programming error! Unsupported lookahead: %s." + throw printf(msg, string(lookahead)) + endif + else + let block = s:parse_paragraph(context) + endif + endif + " Don't include empty blocks in the output. + if !empty(block) + call add(blocks, block) + endif + endwhile + call xolox#misc#timer#stop("notes.vim %s: Parsed note into %i blocks in %s.", g:xolox#notes#version, len(blocks), starttime) + return blocks +endfunction + +function! xolox#notes#parser#view_parse_nodes() " {{{1 + " Parse the current note and show the parse nodes in a temporary buffer. + let note_text = join(getline(1, '$'), "\n") + let parse_nodes = xolox#notes#parser#parse_note(note_text) + vnew + call setline(1, map(parse_nodes, 'string(v:val)')) + setlocal filetype=vim nomodified nowrap +endfunction + +function! s:create_parse_context(text) " {{{1 + " Create an object to encapsulate the lowest level of parser state. + let context = {'text': a:text, 'index': 0} + " The has_more() method returns 1 (true) when more input is available, 0 + " (false) otherwise. + function context.has_more() + return self.index < len(self.text) + endfunction + " The peek() method returns the next character without consuming it. + function context.peek(n) + if self.has_more() + return self.text[self.index : self.index + (a:n - 1)] + endif + return '' + endfunction + " The next() method returns the next character and consumes it. + function context.next(n) + let result = self.peek(a:n) + let self.index += a:n + return result + endfunction + " The next_line() method returns the current line and consumes it. + function context.next_line() + let line = '' + while self.has_more() + let chr = self.next(1) + if chr == "\n" || chr == "" + " We hit the end of line or input. + return line + else + " The line continues. + let line .= chr + endif + endwhile + return line + endfunction + return context +endfunction + +function! s:match_bullet_or_divider(context, consume_lookahead) " {{{1 + " Check whether the current line starts with a list bullet. + let result = {} + let context = copy(a:context) + let line = context.next_line() + let bullet = matchstr(line, s:bullet_pattern) + if !empty(bullet) + " Disambiguate list bullets from horizontal dividers. + if line =~ '^\s\+\*\s\*\s\*$' + let result.type = 'divider' + else + " We matched a bullet! Now we still need to distinguish ordered from + " unordered list items. + if bullet =~ '\d' + let result.type = 'ordered-list' + else + let result.type = 'unordered-list' + endif + let indent = matchstr(bullet, '^\s*') + let result.indent = len(indent) + " Since we already skipped the whitespace and matched the bullet, it's + " very little work to mark our position for the benefit of the caller. + if a:consume_lookahead + let a:context.index += len(bullet) + endif + endif + endif + return result +endfunction + +function! s:match_line(context) " {{{1 + " Get the text of the current line, stopping at end of the line or just + " before the start of a code block marker, whichever comes first. + let line = '' + while a:context.has_more() + let chr = a:context.peek(1) + if chr == '{' && a:context.peek(3) == "\{\{\{" + " XXX The start of a code block implies the end of whatever came before. + " The marker above contains back slashes so that Vim doesn't apply + " folding because of the marker :-). + return line + elseif chr == "\n" + call a:context.next(1) + return line . "\n" + else + let line .= a:context.next(1) + endif + endwhile + " We hit the end of the input. + return line +endfunction + +function! s:parse_heading(context) " {{{1 + " Parse the upcoming heading in the input stream. + let level = 0 + while a:context.peek(1) == '#' + let level += 1 + call a:context.next(1) + endwhile + let text = xolox#misc#str#trim(s:match_line(a:context)) + return {'type': 'heading', 'level': level, 'text': text} +endfunction + +function! s:parse_block_quote(context) " {{{1 + " Parse the upcoming block quote in the input stream. + let lines = [] + while a:context.has_more() + if a:context.peek(1) != '>' + break + endif + let line = s:match_line(a:context) + let level = len(matchstr(line, '^>\+')) + let text = matchstr(line, '^>\+\s*\zs.\{-}\ze\_s*$') + call add(lines, {'level': level, 'text': text}) + endwhile + return {'type': 'block-quote', 'lines': lines} +endfunction + +function! s:parse_code_block(context) " {{{1 + " Parse the upcoming code block in the input stream. + let language = '' + let text = '' + " Skip the start marker. + call a:context.next(3) + " Get the optional language name. + while a:context.peek(1) =~ '\w' + let language .= a:context.next(1) + endwhile + " Skip the whitespace separating the start marker and/or language name from + " the text. + while a:context.peek(1) =~ '[ \t]' + call a:context.next(1) + endwhile + " Get the text inside the code block. + while a:context.has_more() + let chr = a:context.next(1) + if chr == '}' && a:context.peek(2) == '}}' + call a:context.next(2) + break + endif + let text .= chr + endwhile + " Strip trailing whitespace. + let text = substitute(text, '\_s\+$', '', '') + return {'type': 'code', 'language': language, 'text': text} +endfunction + +function! s:parse_divider(context) " {{{1 + " Parse the upcoming horizontal divider in the input stream. + call a:context.next_line() + return {'type': 'divider'} +endfunction + +function! s:parse_list(context) " {{{1 + " Parse the upcoming sequence of list items in the input stream. + let list_type = 'unknown' + let items = [] + let lines = [] + let indent = 0 + " Outer loop to consume one or more list items. + while a:context.has_more() + let lookahead = s:match_bullet_or_divider(a:context, 1) + if !empty(lookahead) + " Save the previous list item with the old indent level. + call s:save_item(items, lines, indent) + let lines = [] + " Set the new indent level (three spaces -> one level). + let indent = lookahead.indent / 3 + " The current line starts with a list bullet. + if list_type == 'unknown' + " The first bullet determines the type of list. + let list_type = lookahead.type + endif + endif + let line = s:match_line(a:context) + call add(lines, line) + if line[-1:] != "\n" + " XXX When match_line() returns a line that doesn't end in a newline + " character, it means either we hit the end of the input or the current + " line continues in a code block (which is not ours to parse :-). + break + elseif line =~ '^\_s*$' + " For now an empty line terminates the list item. + " TODO Add support for list items with multiple paragraphs of text. + break + endif + endwhile + call s:save_item(items, lines, indent) + return {'type': 'list', 'ordered': (list_type == 'ordered-list'), 'items': items} +endfunction + +function! s:save_item(items, lines, indent) + let text = join(a:lines, "\n") + if text =~ '\S' + let text = xolox#misc#str#compact(text) + call add(a:items, {'text': text, 'indent': a:indent}) + endif +endfunction + +function! s:parse_paragraph(context) " {{{1 + " Parse the upcoming paragraph in the input stream. + let lines = [] + while a:context.has_more() + if !empty(s:match_bullet_or_divider(a:context, 0)) + " If the next line starts with a list bullet it shouldn't + " be included in the paragraph we're currently parsing. + break + else + let line = s:match_line(a:context) + call add(lines, line) + if line =~ '^\_s*$' + " An empty line marks the end of the paragraph. + break + elseif line[-1:] != "\n" + " XXX When match_line() returns a line that doesn't end in a newline + " character, it means either we hit the end of the input or the current + " line continues in a code block (which is not ours to parse :-). + break + endif + endif + endwhile + " Don't include empty paragraphs in the output. + let text = join(lines, "\n") + if text =~ '\S' + return {'type': 'paragraph', 'text': xolox#misc#str#compact(text)} + else + return {} + endif +endfunction + +function! s:generate_list_item_bullet_pattern() " {{{1 + " Generate a regular expression that matches any kind of list bullet. + let choices = copy(g:notes_unicode_bullets) + for bullet in g:notes_ascii_bullets + call add(choices, xolox#misc#escape#pattern(bullet)) + endfor + call add(choices, '\d\+[[:punct:]]\?') + return join(choices, '\|') +endfunction + +let s:bullet_pattern = '^\s*\(' . s:generate_list_item_bullet_pattern() . '\)\s\+' + +function! xolox#notes#parser#run_tests() " {{{1 + " Tests for the note taking syntax parser. + call xolox#misc#test#reset() + call xolox#misc#test#wrap('xolox#notes#parser#test_parsing_of_note_titles') + call xolox#misc#test#wrap('xolox#notes#parser#test_parsing_of_headings') + call xolox#misc#test#wrap('xolox#notes#parser#test_parsing_of_paragraphs') + call xolox#misc#test#wrap('xolox#notes#parser#test_parsing_of_code_blocks') + call xolox#misc#test#wrap('xolox#notes#parser#test_parsing_of_list_items') + call xolox#misc#test#wrap('xolox#notes#parser#test_parsing_of_block_quotes') + call xolox#misc#test#summarize() +endfunction + +function! xolox#notes#parser#test_parsing_of_note_titles() + call xolox#misc#test#assert_equals([{'type': 'title', 'text': 'Just the title'}], xolox#notes#parser#parse_note('Just the title')) +endfunction + +function! xolox#notes#parser#test_parsing_of_headings() + call xolox#misc#test#assert_equals([{'type': 'title', 'text': 'Just the title'}, {'type': 'heading', 'level': 1, 'text': 'This is a heading'}], xolox#notes#parser#parse_note("Just the title\n\n# This is a heading")) +endfunction + +function! xolox#notes#parser#test_parsing_of_paragraphs() + call xolox#misc#test#assert_equals([{'type': 'title', 'text': 'Just the title'}, {'type': 'paragraph', 'text': 'This is a paragraph'}], xolox#notes#parser#parse_note("Just the title\n\nThis is a paragraph")) + call xolox#misc#test#assert_equals([{'type': 'title', 'text': 'Just the title'}, {'type': 'paragraph', 'text': 'This is a paragraph'}, {'type': 'paragraph', 'text': "And here's another paragraph!"}], xolox#notes#parser#parse_note("Just the title\n\nThis is a paragraph\n\n\n\nAnd here's another paragraph!")) +endfunction + +function! xolox#notes#parser#test_parsing_of_code_blocks() + call xolox#misc#test#assert_equals([{'type': 'title', 'text': 'Just the title'}, {'type': 'code', 'language': '', 'text': "This is a code block\nwith two lines"}], xolox#notes#parser#parse_note("Just the title\n\n{{{ This is a code block\nwith two lines }}}")) +endfunction + +function! xolox#notes#parser#test_parsing_of_list_items() + call xolox#misc#test#assert_equals([{'type': 'title', 'text': 'Just the title'}, {'type': 'list', 'ordered': 1, 'items': [{'indent': 0, 'text': 'item one'}, {'indent': 0, 'text': 'item two'}, {'indent': 0, 'text': 'item three'}]}], xolox#notes#parser#parse_note("Just the title\n\n1. item one\n2. item two\n3. item three")) +endfunction + +function! xolox#notes#parser#test_parsing_of_block_quotes() + call xolox#misc#test#assert_equals([{'type': 'title', 'text': 'Just the title'}, {'type': 'block-quote', 'lines': [{'level': 1, 'text': 'block'}, {'level': 2, 'text': 'quoted'}, {'level': 1, 'text': 'text'}]}], xolox#notes#parser#parse_note("Just the title\n\n> block\n>> quoted\n> text")) +endfunction diff --git a/sources_non_forked/vim-notes/autoload/xolox/notes/recent.vim b/sources_non_forked/vim-notes/autoload/xolox/notes/recent.vim new file mode 100644 index 00000000..807b5ad5 --- /dev/null +++ b/sources_non_forked/vim-notes/autoload/xolox/notes/recent.vim @@ -0,0 +1,100 @@ +" Vim auto-load script +" Author: Peter Odding +" Last Change: May 16, 2013 +" URL: http://peterodding.com/code/vim/notes/ + +function! xolox#notes#recent#show(bang, title_filter) " {{{1 + call xolox#misc#msg#info("notes.vim %s: Generating overview of recent notes ..", g:xolox#notes#version) + " Show generated note listing all notes by last modified time. + let starttime = xolox#misc#timer#start() + let bufname = '[Recent Notes]' + " Prepare a buffer to hold the list of recent notes. + call xolox#misc#buffer#prepare({ + \ 'name': bufname, + \ 'path': xolox#misc#path#merge($HOME, bufname)}) + " Filter notes by pattern (argument)? + let notes = [] + let title_filter = '\v' . a:title_filter + for [fname, title] in items(xolox#notes#get_fnames_and_titles(0)) + if title =~? title_filter + call add(notes, [getftime(fname), title]) + endif + endfor + " Start note with "You have N note(s) [matching filter]". + let readme = "You have " + if empty(notes) + let readme .= "no notes" + elseif len(notes) == 1 + let readme .= "one note" + else + let readme .= len(notes) . " notes" + endif + if a:title_filter != '' + let quote_format = xolox#notes#unicode_enabled() ? '‘%s’' : "`%s'" + let readme .= " matching " . printf(quote_format, a:title_filter) + endif + " Explain the sorting of the notes. + if empty(notes) + let readme .= "." + elseif len(notes) == 1 + let readme .= ", it's listed below." + else + let readme .= ". They're listed below grouped by the day they were edited, starting with your most recently edited note." + endif + " Add the generated text to the buffer. + call setline(1, ["Recent notes", "", readme]) + " Reformat the text in the buffer to auto-wrap. + normal Ggqq + " Sort, group and format the list of (matching) notes. + let last_date = '' + let list_item_format = xolox#notes#unicode_enabled() ? ' • %s' : ' * %s' + call sort(notes) + call reverse(notes) + let lines = [] + for [ftime, title] in notes + let date = xolox#notes#friendly_date(ftime) + if date != last_date + call add(lines, '') + call add(lines, substitute(date, '^\w', '\u\0', '') . ':') + let last_date = date + endif + call add(lines, printf(list_item_format, title)) + endfor + " Add the formatted list of notes to the buffer. + call setline(line('$') + 1, lines) + " Load the notes file type. + call xolox#notes#set_filetype() + let &l:statusline = bufname + " Change the status line + " Lock the buffer contents. + call xolox#misc#buffer#lock() + " And we're done! + call xolox#misc#timer#stop("notes.vim %s: Generated %s in %s.", g:xolox#notes#version, bufname, starttime) +endfunction + +function! xolox#notes#recent#track() " {{{1 + let fname = expand('%:p') + let indexfile = expand(g:notes_recentindex) + call xolox#misc#msg#debug("notes.vim %s: Recording '%s' as most recent note in %s ..", g:xolox#notes#version, fname, indexfile) + if writefile([fname], indexfile) == -1 + call xolox#misc#msg#warn("notes.vim %s: Failed to record most recent note in %s!", g:xolox#notes#version, indexfile) + endif +endfunction + +function! xolox#notes#recent#edit(bang) " {{{1 + " Edit the most recently edited (not necessarily changed) note. + let indexfile = expand(g:notes_recentindex) + call xolox#misc#msg#debug("notes.vim %s: Recalling most recent note from %s ..", g:xolox#notes#version, indexfile) + try + let fname = readfile(indexfile)[0] + if empty(fname) + throw "The index of recent notes is empty?!" + endif + catch + call xolox#misc#msg#warn("notes.vim %s: Failed to recall most recent note from %s: %s", g:xolox#notes#version, indexfile, v:exception) + return + endtry + call xolox#misc#msg#info("notes.vim %s: Editing most recent note '%s' ..", g:xolox#notes#version, fname) + execute 'edit' . a:bang fnameescape(fname) + call xolox#notes#set_filetype() +endfunction diff --git a/sources_non_forked/vim-notes/autoload/xolox/notes/tags.vim b/sources_non_forked/vim-notes/autoload/xolox/notes/tags.vim new file mode 100644 index 00000000..fad9588d --- /dev/null +++ b/sources_non_forked/vim-notes/autoload/xolox/notes/tags.vim @@ -0,0 +1,201 @@ +" Vim auto-load script +" Author: Peter Odding +" Last Change: May 5, 2013 +" URL: http://peterodding.com/code/vim/notes/ + +if !exists('s:currently_tagged_notes') + let s:currently_tagged_notes = {} " The in-memory representation of tags and the notes in which they're used. + let s:previously_tagged_notes = {} " Copy of index as it is / should be now on disk (to detect changes). + let s:last_disk_sync = 0 " Whether the on-disk representation of the tags has been read. + let s:buffer_name = 'Tagged Notes' " The buffer name for the list of tagged notes. + let s:loading_index = 0 +endif + +function! xolox#notes#tags#load_index() " {{{1 + if s:loading_index + " Guard against recursive calls. + return s:currently_tagged_notes + endif + let starttime = xolox#misc#timer#start() + let indexfile = expand(g:notes_tagsindex) + let lastmodified = getftime(indexfile) + if lastmodified == -1 + let s:loading_index = 1 + call xolox#notes#tags#create_index() + let s:loading_index = 0 + elseif lastmodified > s:last_disk_sync + let s:currently_tagged_notes = {} + for line in readfile(indexfile) + let filenames = split(line, "\t") + if len(filenames) > 1 + let tagname = remove(filenames, 0) + let s:currently_tagged_notes[tagname] = filenames + endif + endfor + let s:previously_tagged_notes = deepcopy(s:currently_tagged_notes) + let s:last_disk_sync = lastmodified + call xolox#misc#timer#stop("notes.vim %s: Loaded tags index in %s.", g:xolox#notes#version, starttime) + endif + return s:currently_tagged_notes +endfunction + +function! xolox#notes#tags#create_index() " {{{1 + let exists = filereadable(expand(g:notes_tagsindex)) + let starttime = xolox#misc#timer#start() + let filenames = xolox#notes#get_fnames(0) + let s:currently_tagged_notes = {} + for idx in range(len(filenames)) + if filereadable(filenames[idx]) + let title = xolox#notes#fname_to_title(filenames[idx]) + call xolox#misc#msg#info("notes.vim %s: Scanning note %i/%i: %s", g:xolox#notes#version, idx + 1, len(filenames), title) + call xolox#notes#tags#scan_note(title, join(readfile(filenames[idx]), "\n")) + endif + endfor + if xolox#notes#tags#save_index() + let s:previously_tagged_notes = deepcopy(s:currently_tagged_notes) + call xolox#misc#timer#stop('notes.vim %s: %s tags index in %s.', g:xolox#notes#version, exists ? "Updated" : "Created", starttime) + else + call xolox#misc#msg#warn("notes.vim %s: Failed to save tags index as %s!", g:xolox#notes#version, g:notes_tagsindex) + endif +endfunction + +function! xolox#notes#tags#save_index() " {{{1 + let indexfile = expand(g:notes_tagsindex) + let existingfile = filereadable(indexfile) + let nothingchanged = (s:currently_tagged_notes == s:previously_tagged_notes) + if existingfile && nothingchanged + call xolox#misc#msg#debug("notes.vim %s: Index not dirty so not saved.", g:xolox#notes#version) + return 1 " Nothing to be done + else + let lines = [] + for [tagname, filenames] in items(s:currently_tagged_notes) + call add(lines, join([tagname] + filenames, "\t")) + endfor + let status = writefile(lines, indexfile) == 0 + if status + call xolox#misc#msg#debug("notes.vim %s: Index saved to %s.", g:xolox#notes#version, g:notes_tagsindex) + let s:last_disk_sync = getftime(indexfile) + else + call xolox#misc#msg#debug("notes.vim %s: Failed to save index to %s.", g:xolox#notes#version, g:notes_tagsindex) + endif + return status + endif +endfunction + +function! xolox#notes#tags#scan_note(title, text) " {{{1 + " Add a note to the tags index. + call xolox#notes#tags#load_index() + " Don't scan tags inside code blocks. + let text = substitute(a:text, '{{{\w\+\_.\{-}}}}', '', 'g') + " Split everything on whitespace. + for token in split(text) + " Match words that start with @ and don't contain { (BibTeX entries). + if token =~ '^@\w' && token !~ '{' + " Strip any trailing punctuation. + let token = substitute(token[1:], '[[:punct:]]*$', '', '') + if token != '' + if !has_key(s:currently_tagged_notes, token) + let s:currently_tagged_notes[token] = [a:title] + elseif index(s:currently_tagged_notes[token], a:title) == -1 + " Keep the tags sorted. + call xolox#misc#list#binsert(s:currently_tagged_notes[token], a:title, 1) + endif + endif + endif + endfor +endfunction + +function! xolox#notes#tags#forget_note(title) " {{{1 + " Remove a note from the tags index. + call xolox#notes#tags#load_index() + for tagname in keys(s:currently_tagged_notes) + call filter(s:currently_tagged_notes[tagname], "v:val != a:title") + if empty(s:currently_tagged_notes[tagname]) + unlet s:currently_tagged_notes[tagname] + endif + endfor +endfunction + +function! xolox#notes#tags#show_tags(minsize) " {{{1 + " TODO Mappings to "zoom" in/out (show only big tags). + let starttime = xolox#misc#timer#start() + call xolox#notes#tags#load_index() + let lines = [s:buffer_name, ''] + if empty(s:currently_tagged_notes) + call add(lines, "You haven't used any tags yet!") + else + " Create a dictionary with note titles as keys. + let unmatched = {} + for title in xolox#notes#get_titles(0) + let unmatched[title] = 1 + endfor + let totalnotes = len(unmatched) + " Group matching notes and remove them from the dictionary. + let grouped_notes = [] + let numtags = 0 + for tagname in sort(keys(s:currently_tagged_notes), 1) + let numnotes = len(s:currently_tagged_notes[tagname]) + if numnotes >= a:minsize + let matched_notes = s:currently_tagged_notes[tagname] + for title in matched_notes + if has_key(unmatched, title) + unlet unmatched[title] + endif + endfor + call add(grouped_notes, {'name': tagname, 'notes': matched_notes}) + let numtags += 1 + endif + endfor + " Add a "fake tag" with all unmatched notes. + if !empty(unmatched) + call add(grouped_notes, {'name': "Unmatched notes", 'notes': keys(unmatched)}) + endif + " Format the results as a note. + let bullet = xolox#notes#get_bullet('*') + for group in grouped_notes + let tagname = group['name'] + let friendly_name = xolox#notes#tags#friendly_name(tagname) + let numnotes = len(group['notes']) + if numnotes >= a:minsize + call extend(lines, ['', printf('# %s (%i note%s)', friendly_name, numnotes, numnotes == 1 ? '' : 's'), '']) + for title in group['notes'] + let lastmodified = xolox#notes#friendly_date(getftime(xolox#notes#title_to_fname(title))) + call add(lines, ' ' . bullet . ' ' . title . ' (last edited ' . lastmodified . ')') + endfor + endif + endfor + if a:minsize <= 1 + let message = printf("You've used %i %s in %i %s", + \ numtags, numtags == 1 ? "tag" : "tags", + \ totalnotes, totalnotes == 1 ? "note" : "notes") + else + let message = printf("There %s %i %s that %s been used at least %s times", + \ numtags == 1 ? "is" : "are", numtags, + \ numtags == 1 ? "tag" : "tags", + \ numtags == 1 ? "has" : "have", a:minsize) + endif + let message .= ", " . (numtags == 1 ? "it's" : "they're") + let message .= " listed below. Tags and notes are sorted alphabetically and after each note is the date when it was last modified." + if !empty(unmatched) + if a:minsize <= 1 + let message .= " At the bottom is a list of untagged notes." + else + let message .= " At the bottom is a list of unmatched notes." + endif + endif + if numtags > 1 && !(&foldmethod == 'expr' && &foldenable) + let message .= " You can enable text folding to get an overview of just the tag names and how many times they've been used." + endif + call insert(lines, message, 2) + endif + call xolox#misc#buffer#prepare(s:buffer_name) + call setline(1, lines) + call xolox#misc#buffer#lock() + call xolox#notes#set_filetype() + setlocal nospell wrap + call xolox#misc#timer#stop('notes.vim %s: Generated [%s] in %s.', g:xolox#notes#version, s:buffer_name, starttime) +endfunction + +function! xolox#notes#tags#friendly_name(tagname) " {{{1 + return substitute(a:tagname, '\(\U\)\(\u\)', '\1 \2', 'g') +endfunction diff --git a/sources_non_forked/vim-notes/doc/notes.txt b/sources_non_forked/vim-notes/doc/notes.txt new file mode 100644 index 00000000..757c9aed --- /dev/null +++ b/sources_non_forked/vim-notes/doc/notes.txt @@ -0,0 +1,677 @@ +*notes.txt* Easy note taking in Vim + +=============================================================================== +Contents ~ + + 1. Introduction |notes-introduction| + 2. Install & usage |notes-install-usage| + 3. Options |notes-options| + 1. The |g:notes_directories| option + 1. Backwards compatibility |notes-backwards-compatibility| + 2. The |g:notes_suffix| option + 3. The |g:notes_title_sync| option + 4. The |g:notes_smart_quotes| option + 5. The |g:notes_ruler_text| option + 6. The |g:notes_list_bullets| option + 7. The |g:notes_tab_indents| option + 8. The |g:notes_alt_indents| option + 9. The |g:notes_shadowdir| option + 10. The |g:notes_indexfile| option + 11. The |g:notes_indexscript| option + 12. The |g:notes_tagsindex| option + 13. The |g:notes_markdown_program| option + 4. Commands |notes-commands| + 1. The |:Note| command + 2. The |:NoteFromSelectedText| command + 3. The |:SplitNoteFromSelectedText| command + 4. The |:TabNoteFromSelectedText| command + 5. The |:DeleteNote| command + 6. The |:SearchNotes| command + 1. |:SearchNotes| understands @tags |searchnotes-understands-tags| + 2. Accelerated searching with Python |notes-accelerated-searching-with-python| + 7. The |:RelatedNotes| command + 8. The |:RecentNotes| command + 9. The |:MostRecentNote| command + 10. The |:ShowTaggedNotes| command + 11. The |:IndexTaggedNotes| command + 12. The |:NoteToHtml| command + 13. The |:NoteToMarkdown| command + 5. Mappings |notes-mappings| + 1. Insert mode mappings |notes-insert-mode-mappings| + 6. Customizing the syntax highlighting of notes |customizing-syntax-highlighting-of-notes| + 7. Other plug-ins that work well with the notes plug-in |other-plug-ins-that-work-well-with-notes-plug-in| + 1. utl.vim |notes-utl.vim| + 2. shell.vim |notes-shell.vim| + 3. VOoM |notes-voom| + 4. Txtfmt |notes-txtfmt| + 8. Contact |notes-contact| + 9. License |notes-license| + 10. References |notes-references| + +=============================================================================== + *notes-introduction* +Introduction ~ + +The vim-notes plug-in for the Vim text editor makes it easy to manage your +notes in Vim: + +- **Starting a new note:** Execute the |:Note| command to create a new buffer + and load the appropriate file type and syntax + +- You can also start a note with Vim commands like ':edit', ':tabedit' and + ':split' by starting the filename with 'note:', as in ':edit note:todo' + (the part after 'note:' doesn't have to be the complete note title and if + it's empty a new note will be created) + +- You can start a new note with the selected text as title in the current + window using the '\en' mapping or |:NoteFromSelectedText| command (there + are similar mappings and commands for opening split windows and tab pages) + +- **Saving notes:** Just use Vim's |:write| and |:update| commands, you don't + need to provide a filename because it will be set based on the title (first + line) of your note (you also don't need to worry about special characters, + they'll be escaped) + +- **Editing existing notes:** Execute ':Note anything' to edit a note + containing 'anything' in its title (if no notes are found a new one is + created with its title set to 'anything') + +- The |:Note| and |:DeleteNote| commands support tab completion of note + titles + +- **Deleting notes:** The |:DeleteNote| command enables you to delete the + current note + +- **Searching notes:**':SearchNotes keyword …' searches for keywords and + ':SearchNotes /pattern/' searches for regular expressions + +- The |:SearchNotes| command supports tab completion of keywords and sorts + candidates by relevance (Levenshtein distance [1]) + +- **Smart defaults:** Without an argument |:SearchNotes| searches for the + word under the cursor (if the word starts with '@' that character will be + included in the search, this means you can easily search for _@tagged_ + notes) + +- **Back-references:** The |:RelatedNotes| command find all notes referencing + the current file + +- A Python 2 [2] script is included that accelerates keyword searches using a + keyword index + +- The |:RecentNotes| command lists your notes by modification date, starting + with the most recently edited note + +- **Navigating between notes:** The included syntax script highlights note + names as hyper links and the file type plug-in redefines |gf| to jump + between notes (the Control-w f (see |CTRL-W_f|) mapping to jump to a note + in a split window and the Control-w gf (see |CTRL-W_gf|) mapping to jump to + a note in a new tab page also work) + +- **Writing aids:** The included file type plug-in contains mappings for + automatic curly quotes, arrows and list bullets and supports completion of + note titles using Control-X Control-U and completion of tags using + Control-X Control-O + +- **Embedded file types:** The included syntax script supports embedded + highlighting using blocks marked with '{{{type … }}}' which allows you to + embed highlighted code and configuration snippets in your notes + +Here's a screen shot of the syntax mode using the Slate [3] color scheme and +the font Monaco [4]: + + Image: Syntax mode screen shot (see reference [5]) + +=============================================================================== + *notes-install-usage* +Install & usage ~ + +_Please note that the vim-notes plug-in requires my vim-misc plug-in which is +separately distributed._ + +Unzip the most recent ZIP archives of the vim-notes [6] and vim-misc [7] plug- +ins inside your Vim profile directory (usually this is '~/.vim' on UNIX and +'%USERPROFILE%\vimfiles' on Windows), restart Vim and execute the command +':helptags ~/.vim/doc' (use ':helptags ~\vimfiles\doc' instead on Windows). To +get started execute |:Note| or ':edit note:', this will start a new note that +contains instructions on how to continue from there (and how to use the plug-in +in general). + +If you prefer you can also use Pathogen [8], Vundle [9] or a similar tool to +install & update the vim-notes [10] and vim-misc [11] plug-ins using a local +clone of the git repository. + +=============================================================================== + *notes-options* +Options ~ + +All options have reasonable defaults so if the plug-in works after installation +you don't need to change any options. The options are available for people who +like to customize how the plug-in works. You can set these options in your +|vimrc| script by including a line like this: +> + :let g:notes_directories = ['~/Documents/Notes', '~/Dropbox/Shared Notes'] +< +Note that after changing an option in your |vimrc| script you have to restart +Vim for the changes to take effect. + +------------------------------------------------------------------------------- +The *g:notes_directories* option + +Your notes are stored in one or more directories. This option defines where you +want to store your notes. Its value should be a list (there's an example above) +with one or more pathnames. The default is a single value which depends on +circumstances but should work for most people: + +- If the profile directory where the plug-in is installed is writable, the + directory 'misc/notes/user' under the profile directory is used. This is + for compatibility with Pathogen [8]; the notes will be stored inside the + plug-in's bundle. + +- If the above doesn't work out, the default depends on the platform: + '~/vimfiles/misc/notes/user' on Windows and '~/.vim/misc/notes/user' on + other platforms. + +------------------------------------------------------------------------------- + *notes-backwards-compatibility* +Backwards compatibility ~ + +In the past the notes plug-in only supported a single directory and the +corresponding option was called 'g:notes_directory'. When support for multiple +notes directories was introduced the option was renamed to +|g:notes_directories| to reflect that the value is now a list of directory +pathnames. + +For backwards compatibility with old configurations (all of them as of this +writing :-) the notes plug-in still uses 'g:notes_directory' when it is defined +(its no longer defined by the plug-in). However when the plug-in warns you to +change your configuration you probably should because this compatibility will +be removed at some point. + +------------------------------------------------------------------------------- +The *g:notes_suffix* option + +The suffix to add to generated filenames. The plug-in generates filenames for +your notes based on the title (first line) of each note and by default these +filenames don't include an extension like '.txt'. You can use this option to +make the plug-in automatically append an extension without having to embed the +extension in the note's title, e.g.: +> + :let g:notes_suffix = '.txt' +< +------------------------------------------------------------------------------- +The *g:notes_title_sync* option + +When you rename a file in your notes directory but don't change the title, the +plug-in will notice this the next time you open the note in Vim. Likewise when +you change the title in another text editor but don't rename the file. By +default the plug-in will prompt you whether you want it to update the title of +the note, rename the file on disk or dismiss the prompt without doing anything. + +If you set this option to the string "'no'" this feature will be completely +disabled. If you set it to "'change_title'" it will automatically change the +title to match the filename. If you set it to "'rename_file'" it will +automatically rename the file on disk to match the title. + +------------------------------------------------------------------------------- +The *g:notes_smart_quotes* option + +By default the notes plug-in automatically performs several substitutions on +the text you type in insert mode, for example regular quote marks are replaced +with curly quotes. The full list of substitutions can be found below in the +documentation on mappings. If you don't want the plug-in to perform these +substitutions, you can set this option to zero like this: +> + :let g:notes_smart_quotes = 0 +< +------------------------------------------------------------------------------- +The *g:notes_ruler_text* option + +The text of the ruler line inserted when you type '***' in quick succession. It +defaults to three asterisks separated by spaces, center aligned to the text +width. + +------------------------------------------------------------------------------- +The *g:notes_list_bullets* option + +A list of characters used as list bullets. When you're using a Unicode encoding +this defaults to "['•', '◦', '▸', '▹', '▪', '▫']", otherwise it defaults to +"['*', '-', '+']". + +When you change the nesting level (indentation) of a line containing a bullet +point using one of the mappings 'Tab', 'Shift-Tab', 'Alt-Left' and 'Alt-Right' +the bullet point will be automatically changed to correspond to the new nesting +level. + +The first level of list items gets the first bullet point in +|g:notes_list_bullets|, the second level gets the second, etc. When you're +indenting a list item to a level where the |g:notes_list_bullets| doesn't have +enough bullets, the plug-in starts again at the first bullet in the list (in +other words the selection of bullets wraps around). + +------------------------------------------------------------------------------- +The *g:notes_tab_indents* option + +By default 'Tab' is mapped to indent list items and 'Shift-Tab' is mapped to +dedent list items. You can disable these mappings by adding the following to +your |vimrc| script: +> + :let g:notes_tab_indents = 0 +< +------------------------------------------------------------------------------- +The *g:notes_alt_indents* option + +By default 'Alt-Right' is mapped to indent list items and 'Alt-Left' is mapped +to dedent list items. You can disable these mappings by adding the following to +your |vimrc| script: +> + :let g:notes_alt_indents = 0 +< +------------------------------------------------------------------------------- +The *g:notes_shadowdir* option + +The notes plug-in comes with some default notes containing documentation about +the plug-in. This option defines the path of the directory containing these +notes. + +------------------------------------------------------------------------------- +The *g:notes_indexfile* option + +This option defines the pathname of the optional keyword index used by the +|:SearchNotes| to perform accelerated keyword searching. + +------------------------------------------------------------------------------- +The *g:notes_indexscript* option + +This option defines the pathname of the Python script that's used to perform +accelerated keyword searching with |:SearchNotes|. + +------------------------------------------------------------------------------- +The *g:notes_tagsindex* option + +This option defines the pathname of the text file that stores the list of known +tags used for tag name completion and the |:ShowTaggedNotes| command. The text +file is created automatically when it's first needed, after that you can +recreate it manually by executing |:IndexTaggedNotes| (see below). + +------------------------------------------------------------------------------- +The *g:notes_markdown_program* option + +The |:NoteToHtml| command requires the Markdown [12] program. By default the +name of this program is assumed to be simply 'markdown'. If you want to use a +different program for Markdown to HTML conversion, set this option to the name +of the program. + +=============================================================================== + *notes-commands* +Commands ~ + +To edit one of your existing notes (or create a new one) you can use Vim +commands such as |:edit|, |:split| and |:tabedit| with a filename that starts +with _note:_ followed by (part of) the title of one of your notes, e.g.: +> + :edit note:todo +< +This shortcut also works from the command line: +> + $ gvim note:todo +< +When you don't follow _note:_ with anything a new note is created like when you +execute |:Note| without any arguments. + +------------------------------------------------------------------------------- +The *:Note* command + +When executed without any arguments this command starts a new note in the +current window. If you pass one or more arguments the command will edit an +existing note containing the given words in the title. If more than one note is +found you'll be asked which note you want to edit. If no notes are found a new +note is started with the given word(s) as title. + +This command will fail when changes have been made to the current buffer, +unless you use ':Note!' which discards any changes. + +When you are using multiple directories to store your notes and you run |:Note| +while editing an existing note, a new note will inherit the directory of the +note from which you started. Otherwise the note is created in the first +directory in |g:notes_directories|. + +_This command supports tab completion:_ If you complete one word, all existing +notes containing the given word somewhere in their title are suggested. If you +type more than one word separated by spaces, the plug-in will complete only the +missing words so that the resulting command line contains the complete note +title and nothing more. + +------------------------------------------------------------------------------- +The *:NoteFromSelectedText* command + +Start a new note in the current window with the selected text as the title of +the note. The name of this command isn't very well suited to daily use, that's +because it's intended to be executed from a mapping. The default mapping for +this command is '\en' (the backslash is actually the character defined by the +|mapleader| variable). + +When you are using multiple directories to store your notes and you run +|:NoteFromSelectedText| while editing an existing note, the new note will +inherit the directory of the note from which it was created. + +------------------------------------------------------------------------------- +The *:SplitNoteFromSelectedText* command + +Same as |:NoteFromSelectedText| but opens the new note in a vertical split +window. The default mapping for this command is '\sn'. + +------------------------------------------------------------------------------- +The *:TabNoteFromSelectedText* command + +Same as |:NoteFromSelectedText| but opens the new note in a new tab page. The +default mapping for this command is '\tn'. + +------------------------------------------------------------------------------- +The *:DeleteNote* command + +The |:DeleteNote| command deletes a note file, destroys the buffer and removes +the note from the internal cache of filenames and note titles. If you pass a +note name as an argument to |:DeleteNote| it will delete the given note, +otherwise it will delete the current note. This fails when changes have been +made to the buffer, unless you use ':DeleteNote!' which discards any changes. + +------------------------------------------------------------------------------- +The *:SearchNotes* command + +This command wraps |:vimgrep| and enables you to search through your notes +using one or more keywords or a regular expression pattern. To search for a +pattern you pass a single argument that starts/ends with a slash: +> + :SearchNotes /TODO\|FIXME\|XXX/ +< +To search for one or more keywords you can just omit the slashes, this matches +notes containing all of the given keywords: +> + :SearchNotes syntax highlighting +< +------------------------------------------------------------------------------- + *searchnotes-understands-tags* +:SearchNotes understands @tags ~ + +If you don't pass any arguments to the |:SearchNotes| command it will search +for the word under the cursor. If the word under the cursor starts with '@' +this character will be included in the search, which makes it possible to +easily add _@tags_ to your _@notes_ and then search for those tags. To make +searching for tags even easier you can create key mappings for the +|:SearchNotes| command: +> + " Make the C-] combination search for @tags: + imap :SearchNotes + nmap :SearchNotes + + " Make double mouse click search for @tags. This is actually quite a lot of + " fun if you don't use the mouse for text selections anyway; you can click + " between notes as if you're in a web browser: + imap <2-LeftMouse> :SearchNotes + nmap <2-LeftMouse> :SearchNotes +< +These mappings are currently not enabled by default because they conflict with +already useful key mappings, but if you have any suggestions for alternatives +feel free to contact me through GitHub or at peter@peterodding.com. + +------------------------------------------------------------------------------- + *notes-accelerated-searching-with-python* +Accelerated searching with Python ~ + +After collecting a fair amount of notes (say more than 5 MB) you will probably +start to get annoyed at how long it takes Vim to search through all of your +notes. To make searching more scalable the notes plug-in includes a Python +script which uses a persistent full text index of your notes stored in a file. + +The first time the Python script is run it will need to build the complete +index which can take a moment, but after the index has been initialized updates +and searches should be more or less instantaneous. + +------------------------------------------------------------------------------- +The *:RelatedNotes* command + +This command makes it easy to find all notes related to the current file: If +you are currently editing a note then a search for the note's title is done, +otherwise this searches for the absolute path of the current file. + +------------------------------------------------------------------------------- +The *:RecentNotes* command + +If you execute the |:RecentNotes| command it will open a Vim buffer that lists +all your notes grouped by the day they were edited, starting with your most +recently edited note. If you pass an argument to |:RecentNotes| it will filter +the list of notes by matching the title of each note against the argument which +is interpreted as a Vim pattern. + +------------------------------------------------------------------------------- +The *:MostRecentNote* command + +This command edits your most recently edited note (whether you just opened the +note or made changes to it). The plug-in will remember the most recent note +between restarts of Vim and is shared between all instances of Vim. + +------------------------------------------------------------------------------- +The *:ShowTaggedNotes* command + +To show a list of all notes that contains _@tags_ you can use the +|:ShowTaggedNotes| command. If you pass a count to this command it will limit +the list of tags to those that have been used at least this many times. For +example the following two commands show tags that have been used at least ten +times: +> + :10ShowTaggedNotes + :ShowTaggedNotes 10 +< +------------------------------------------------------------------------------- +The *:IndexTaggedNotes* command + +The notes plug-in defines an omni completion function that can be used to +complete the names of tags. To trigger the omni completion you type Control-X +Control-O. When you type '@' in insert mode the plug-in will automatically +start omni completion. + +The completion menu is populated from a text file listing all your tags, one on +each line. The first time omni completion triggers, an index of tag names is +generated and saved to the location set by |g:notes_tagsindex|. After this file +is created, it will be updated automatically as you edit notes and add/remove +tags. + +If for any reason you want to recreate the list of tags you can execute the +|:IndexTaggedNotes| command. + +------------------------------------------------------------------------------- +The *:NoteToHtml* command + +This command converts the current note to HTML. It works by first converting +the current note to Markdown [12] and then using the 'markdown' program to +convert that to HTML. It requires an external program to convert Markdown to +HTML. By default the program 'markdown' is used, but you can change the name of +the program using the |g:notes_markdown_program| option. + +Note that this command can be a bit slow, because the parser for the note +taking syntax is written in Vim script (for portability) and has not been +optimized for speed (yet). + +------------------------------------------------------------------------------- +The *:NoteToMarkdown* command + +Convert the current note to a Markdown document [12]. The vim-notes syntax +shares a lot of similarities with the Markdown text format, but there are some +notable differences, which this command takes care of: + +- The first line of a note is an implicit document title. In Markdown format + it has to be marked with '#'. This also implies that the remaining headings + should be shifted by one level. + +- Preformatted blocks are marked very differently in notes and Markdown + ('{{{' and '}}}' markers versus 4 space indentation). + +- The markers and indentation of list items differ between notes and Markdown + (dumb bullets vs Unicode bullets and 3 vs 4 spaces). + +Note that this command can be a bit slow, because the parser for the note +taking syntax is written in Vim script (for portability) and has not been +optimized for speed (yet). + +=============================================================================== + *notes-mappings* +Mappings ~ + +The following key mappings are defined inside notes. + +------------------------------------------------------------------------------- + *notes-insert-mode-mappings* +Insert mode mappings ~ + +- '@' automatically triggers tag completion +- "'" becomes '‘' or '’' depending on where you type it +- '"' becomes '“' or '”' (same goes for these) +- '--' becomes '—' +- '->' becomes '→' +- '<-' becomes '←' +- the bullets '*', '-' and '+' become '•' +- the three characters '***' in insert mode in quick succession insert a + horizontal ruler delimited by empty lines +- 'Tab' and 'Alt-Right' increase indentation of list items (works on the + current line and selected lines) +- 'Shift-Tab' and 'Alt-Left' decrease indentation of list items +- 'Enter' on a line with only a list bullet removes the bullet and starts a + new line below the current line +- '\en' executes |:NoteFromSelectedText| +- '\sn' executes |:SplitNoteFromSelectedText| +- '\tn' executes |:TabNoteFromSelectedText| + +=============================================================================== + *customizing-syntax-highlighting-of-notes* +Customizing the syntax highlighting of notes ~ + +The syntax mode for notes is written so you can override styles you don't like. +To do so you can add lines such as the following to your |vimrc| script: +> + " Don't highlight single quoted strings. + highlight link notesSingleQuoted Normal + + " Show double quoted strings in italic font. + highlight notesDoubleQuoted gui=italic +< +See the documentation of the |:highlight| command for more information. Below +are the names of the syntax items defined by the notes syntax mode: + +- 'notesName' - the names of other notes, usually highlighted as a hyperlink +- 'notesTagName' - words preceded by an '@' character, also highlighted as a + hyperlink +- 'notesListBullet' - the bullet characters used for list items +- 'notesListNumber' - numbers in front of list items +- 'notesDoubleQuoted' - double quoted strings +- 'notesSingleQuoted' - single quoted strings +- 'notesItalic' - strings between two '_' characters +- 'notesBold' - strings between two '*' characters +- 'notesTextURL' - plain domain name (recognized by leading 'www.') +- 'notesRealURL' - URLs (e.g. http://vim.org/) +- 'notesEmailAddr' - e-mail addresses +- 'notesUnixPath' - UNIX file paths (e.g. '~/.vimrc' and + '/home/peter/.vimrc') +- 'notesPathLnum' - line number following a UNIX path +- 'notesWindowsPath' - Windows file paths (e.g. 'c:\users\peter\_vimrc') +- 'notesTodo' - 'TODO' markers +- 'notesXXX' - 'XXX' markers +- 'notesFixMe' - 'FIXME' markers +- 'notesInProgress' - 'CURRENT', 'INPROGRESS', 'STARTED' and 'WIP' markers +- 'notesDoneItem' - lines containing the marker 'DONE', usually highlighted + as a comment +- 'notesDoneMarker' - 'DONE' markers +- 'notesVimCmd' - Vim commands, words preceded by an ':' character +- 'notesTitle' - the first line of each note +- 'notesShortHeading' - short sentences ending in a ':' character +- 'notesAtxHeading' - lines preceded by one or more '#' characters +- 'notesBlockQuote' - lines preceded by a '>' character +- 'notesRule' - lines containing only whitespace and '* * *' +- 'notesCodeStart' - the '{{{' markers that begin a block of code (including + the syntax name) +- 'notesCodeEnd' - the '}}}' markers that end a block of code +- 'notesModeLine' - Vim |modeline| in last line of notes +- 'notesLastEdited' - last edited dates in |:ShowTaggedNotes| buffers + +=============================================================================== + *other-plug-ins-that-work-well-with-notes-plug-in* +Other plug-ins that work well with the notes plug-in ~ + +------------------------------------------------------------------------------- + *notes-utl.vim* +utl.vim ~ + +The utl.vim [13] universal text linking plug-in enables links between your +notes, other local files and remote resources like web pages. + +------------------------------------------------------------------------------- + *notes-shell.vim* +shell.vim ~ + +My shell.vim [14] plug-in also enables easy navigation between your notes and +environment like local files and directories, web pages and e-mail addresses by +providing key mappings and commands to e.g. open the file/URL under the text +cursor. This plug-in can also change Vim to full screen which can be really +nice for large notes. + +------------------------------------------------------------------------------- + *notes-voom* +VOoM ~ + +The VOoM [15] outlining plug-in should work well for notes if you use the +Markdown style headers starting with '#', however it has been reported that +this combination may not always work so well in practice (sometimes losing +notes!) + +------------------------------------------------------------------------------- + *notes-txtfmt* +Txtfmt ~ + +If the text formatting supported by the notes plug-in is not enough for you, +consider trying the Txtfmt [16] (The Vim Highlighter) plug-in. To use the two +plug-ins together, create the file 'after/ftplugin/notes.vim' inside your Vim +profile with the following contents: +> + " Enable Txtfmt formatting inside notes. + setlocal filetype=notes.txtfmt +< +=============================================================================== + *notes-contact* +Contact ~ + +If you have questions, bug reports, suggestions, etc. the author can be +contacted at peter@peterodding.com. The latest version is available at +http://peterodding.com/code/vim/notes/ and http://github.com/xolox/vim-notes. +If you like the script please vote for it on Vim Online [17]. + +=============================================================================== + *notes-license* +License ~ + +This software is licensed under the MIT license [18]. © 2013 Peter Odding +. + +=============================================================================== + *notes-references* +References ~ + +[1] http://en.wikipedia.org/wiki/Levenshtein_distance +[2] http://python.org/ +[3] http://code.google.com/p/vim/source/browse/runtime/colors/slate.vim +[4] http://en.wikipedia.org/wiki/Monaco_(typeface) +[5] http://peterodding.com/code/vim/notes/syntax.png +[6] http://peterodding.com/code/vim/downloads/notes.zip +[7] http://peterodding.com/code/vim/downloads/misc.zip +[8] http://www.vim.org/scripts/script.php?script_id=2332 +[9] https://github.com/gmarik/vundle +[10] http://github.com/xolox/vim-notes +[11] http://github.com/xolox/vim-misc +[12] http://en.wikipedia.org/wiki/Markdown +[13] http://www.vim.org/scripts/script.php?script_id=293 +[14] http://www.vim.org/scripts/script.php?script_id=3123 +[15] http://www.vim.org/scripts/script.php?script_id=2657 +[16] http://www.vim.org/scripts/script.php?script_id=2208 +[17] http://www.vim.org/scripts/script.php?script_id=3375 +[18] http://en.wikipedia.org/wiki/MIT_License + +vim: ft=help diff --git a/sources_non_forked/vim-notes/ftplugin/notes.vim b/sources_non_forked/vim-notes/ftplugin/notes.vim new file mode 100644 index 00000000..663c1719 --- /dev/null +++ b/sources_non_forked/vim-notes/ftplugin/notes.vim @@ -0,0 +1,141 @@ +" Vim file type plug-in +" Author: Peter Odding +" Last Change: May 16, 2013 +" URL: http://peterodding.com/code/vim/notes/ + +if exists('b:did_ftplugin') + finish +else + let b:did_ftplugin = 1 +endif + +" Copy indent from previous line. {{{1 +setlocal autoindent +let b:undo_ftplugin = 'set autoindent<' + +" Set &tabstop and &shiftwidth options for bulleted lists. {{{1 +setlocal tabstop=3 shiftwidth=3 expandtab +let b:undo_ftplugin .= ' | set tabstop< shiftwidth< expandtab<' + +" Automatic formatting for bulleted lists. {{{1 +let &l:comments = xolox#notes#get_comments_option() +setlocal formatoptions=tcron +let b:undo_ftplugin .= ' | set comments< formatoptions<' + +" Automatic text folding based on headings. {{{1 +setlocal foldmethod=expr +setlocal foldexpr=xolox#notes#foldexpr() +setlocal foldtext=xolox#notes#foldtext() +let b:undo_ftplugin .= ' | set foldmethod< foldexpr< foldtext<' + +" Enable concealing of notes syntax markers? {{{1 +if has('conceal') + setlocal conceallevel=3 + let b:undo_ftplugin .= ' | set conceallevel<' +endif + +" Change to jump to notes by name. {{{1 +setlocal includeexpr=xolox#notes#include_expr(v:fname) +let b:undo_ftplugin .= ' | set includeexpr<' + +" Enable completion of note titles using C-x C-u. {{{1 +setlocal completefunc=xolox#notes#user_complete +let b:undo_ftplugin .= ' | set completefunc<' + +" Enable completion of tag names using C-x C-o. {{{1 +setlocal omnifunc=xolox#notes#omni_complete +let b:undo_ftplugin .= ' | set omnifunc<' + +" Automatic completion of tag names after typing "@". {{{1 + +inoremap @ @ +let b:undo_ftplugin .= ' | execute "iunmap @"' + +" Automatic completion of tag names should not interrupt the flow of typing, +" for this we have to change the (unfortunately) global option &completeopt. +set completeopt+=longest + +" Change double-dash to em-dash as it is typed. {{{1 +if g:notes_smart_quotes && xolox#notes#unicode_enabled() + inoremap -- — + let b:undo_ftplugin .= ' | execute "iunmap --"' +endif + +" Change plain quotes to curly quotes as they're typed. {{{1 +if g:notes_smart_quotes + inoremap ' xolox#notes#insert_quote(1) + inoremap " xolox#notes#insert_quote(2) + let b:undo_ftplugin .= ' | execute "iunmap ''"' + let b:undo_ftplugin .= ' | execute ''iunmap "''' +endif + +" Change ASCII style arrows to Unicode arrows. {{{1 +if g:notes_smart_quotes && xolox#notes#unicode_enabled() + inoremap -> → + inoremap <- ← + let b:undo_ftplugin .= ' | execute "iunmap ->"' + let b:undo_ftplugin .= ' | execute "iunmap <-"' +endif + +" Convert ASCII list bullets to Unicode bullets. {{{1 +if g:notes_smart_quotes + inoremap * xolox#notes#insert_bullet('*') + inoremap - xolox#notes#insert_bullet('-') + inoremap + xolox#notes#insert_bullet('+') + let b:undo_ftplugin .= ' | execute "iunmap *"' + let b:undo_ftplugin .= ' | execute "iunmap -"' + let b:undo_ftplugin .= ' | execute "iunmap +"' +endif + +" Format three asterisks as a horizontal ruler. {{{1 +inoremap *** :call xolox#notes#insert_ruler() +let b:undo_ftplugin .= ' | execute "iunmap ***"' + +" Indent list items using and ? {{{1 +if g:notes_tab_indents + inoremap :call xolox#notes#indent_list(1, line('.'), line('.')) + snoremap :call xolox#notes#indent_list(1, line("'<"), line("'>"))gv + let b:undo_ftplugin .= ' | execute "iunmap "' + let b:undo_ftplugin .= ' | execute "sunmap "' + inoremap :call xolox#notes#indent_list(-1, line('.'), line('.')) + snoremap :call xolox#notes#indent_list(-1, line("'<"), line("'>"))gv + let b:undo_ftplugin .= ' | execute "iunmap "' + let b:undo_ftplugin .= ' | execute "sunmap "' +endif + +" Indent list items using and ? {{{1 +if g:notes_alt_indents + inoremap :call xolox#notes#indent_list(1, line('.'), line('.')) + snoremap :call xolox#notes#indent_list(1, line("'<"), line("'>"))gv + let b:undo_ftplugin .= ' | execute "iunmap "' + let b:undo_ftplugin .= ' | execute "sunmap "' + inoremap :call xolox#notes#indent_list(-1, line('.'), line('.')) + snoremap :call xolox#notes#indent_list(-1, line("'<"), line("'>"))gv + let b:undo_ftplugin .= ' | execute "iunmap "' + let b:undo_ftplugin .= ' | execute "sunmap "' +endif + +" Automatically remove empty list items on Enter. {{{1 +inoremap xolox#notes#cleanup_list() +let b:undo_ftplugin .= ' | execute "iunmap "' + +" Shortcuts to create new notes from the selected text. {{{1 + +vnoremap en :NoteFromSelectedText +let b:undo_ftplugin .= ' | execute "vunmap en"' + +vnoremap sn :SplitNoteFromSelectedText +let b:undo_ftplugin .= ' | execute "vunmap sn"' + +vnoremap tn :TabNoteFromSelectedText +let b:undo_ftplugin .= ' | execute "vunmap tn"' + +" }}}1 + +" This is currently the only place where a command is guaranteed to be +" executed when the user edits a note. Maybe I shouldn't abuse this (it +" doesn't feel right ;-) but for now it will do. +call xolox#notes#recent#track() +call xolox#notes#check_sync_title() + +" vim: ts=2 sw=2 et diff --git a/sources_non_forked/vim-notes/misc/notes/search-notes.py b/sources_non_forked/vim-notes/misc/notes/search-notes.py new file mode 100755 index 00000000..2bbc0bc3 --- /dev/null +++ b/sources_non_forked/vim-notes/misc/notes/search-notes.py @@ -0,0 +1,312 @@ +#!/usr/bin/env python + +# Python script for fast text file searching using keyword index on disk. +# +# Author: Peter Odding +# Last Change: September 2, 2013 +# URL: http://peterodding.com/code/vim/notes/ +# License: MIT +# +# This Python script can be used by the notes.vim plug-in to perform fast +# keyword searches in the user's notes. It has two advantages over just +# using Vim's internal :vimgrep command to search all of the user's notes: +# +# - Very large notes don't slow searching down so much; +# - Hundreds of notes can be searched in less than a second. +# +# The keyword index is a Python dictionary that's persisted using the pickle +# module. The structure of the dictionary may seem very naive but it's quite +# fast. Also the pickle protocol makes sure repeating strings are stored only +# once, so it's not as bad as it may appear at first sight :-). +# +# For more information about the Vim plug-in see http://peterodding.com/code/vim/notes/. + +""" +Usage: search-notes.py [OPTIONS] KEYWORD... + +Search one or more directories of plain text files using a full text index, +updated automatically during each invocation of the program. + +Valid options include: + + -i, --ignore-case ignore case of keyword(s) + -l, --list=SUBSTR list keywords matching substring + -d, --database=FILE set path to keywords index file + -n, --notes=DIR set directory with user notes (can be repeated) + -e, --encoding=NAME set character encoding of notes + -v, --verbose make more noise + -h, --help show this message and exit + +For more information see http://peterodding.com/code/vim/notes/ +""" + +# Standard library modules. +import fnmatch +import getopt +import logging +import os +import re +import sys +import time + +# Load the faster C variant of the pickle module where possible, but +# fall back to the Python implementation that's always available. +try: + import cPickle as pickle +except ImportError: + import pickle + +# Try to import the Levenshtein module, don't error out if it's not installed. +try: + import Levenshtein + levenshtein_supported = True +except ImportError: + levenshtein_supported = False + +# The version of the index format that's supported by this revision of the +# `search-notes.py' script; if an existing index file is found with an +# unsupported version, the script knows that it should rebuild the index. +INDEX_VERSION = 2 + +class NotesIndex: + + def __init__(self): + ''' Entry point to the notes search. ''' + global_timer = Timer() + self.init_logging() + keywords = self.parse_args() + self.load_index() + self.update_index() + if self.dirty: + self.save_index() + print "Python works fine!" + if self.keyword_filter is not None: + self.list_keywords(self.keyword_filter) + self.logger.debug("Finished listing keywords in %s", global_timer) + else: + matches = self.search_index(keywords) + if matches: + print '\n'.join(sorted(matches)) + self.logger.debug("Finished searching index in %s", global_timer) + + def init_logging(self): + ''' Initialize the logging subsystem. ''' + self.logger = logging.getLogger('search-notes') + self.logger.addHandler(logging.StreamHandler(sys.stderr)) + if os.isatty(0): + self.logger.setLevel(logging.INFO) + + def parse_args(self): + ''' Parse the command line arguments. ''' + try: + opts, keywords = getopt.getopt(sys.argv[1:], 'il:d:n:e:vh', + ['ignore-case', 'list=', 'database=', 'notes=', 'encoding=', 'verbose', 'help']) + except getopt.GetoptError, error: + print str(error) + self.usage() + sys.exit(2) + # Define the command line option defaults. + self.database_file = '~/.vim/misc/notes/index.pickle' + self.user_directories = ['~/.vim/misc/notes/user/'] + self.character_encoding = 'UTF-8' + self.case_sensitive = True + self.keyword_filter = None + # Map command line options to variables. + for opt, arg in opts: + if opt in ('-i', '--ignore-case'): + self.case_sensitive = False + self.logger.debug("Disabling case sensitivity") + elif opt in ('-l', '--list'): + self.keyword_filter = arg.strip().lower() + elif opt in ('-d', '--database'): + self.database_file = arg + elif opt in ('-n', '--notes'): + self.user_directories.append(arg) + elif opt in ('-e', '--encoding'): + self.character_encoding = arg + elif opt in ('-v', '--verbose'): + self.logger.setLevel(logging.DEBUG) + elif opt in ('-h', '--help'): + self.usage() + sys.exit(0) + else: + assert False, "Unhandled option" + self.logger.debug("Index file: %s", self.database_file) + self.logger.debug("Notes directories: %r", self.user_directories) + self.logger.debug("Character encoding: %s", self.character_encoding) + if self.keyword_filter is not None: + self.keyword_filter = self.decode(self.keyword_filter) + # Canonicalize pathnames, check validity. + self.database_file = self.munge_path(self.database_file) + self.user_directories = map(self.munge_path, self.user_directories) + self.user_directories = filter(os.path.isdir, self.user_directories) + if not any(os.path.isdir(p) for p in self.user_directories): + sys.stderr.write("None of the notes directories exist!\n") + sys.exit(1) + # Return tokenized keyword arguments. + return [self.normalize(k) for k in self.tokenize(' '.join(keywords))] + + def load_index(self): + ''' Load the keyword index or start with an empty one. ''' + try: + load_timer = Timer() + self.logger.debug("Loading index from %s ..", self.database_file) + with open(self.database_file) as handle: + self.index = pickle.load(handle) + self.logger.debug("Format version of index loaded from disk: %i", self.index['version']) + assert self.index['version'] == INDEX_VERSION, "Incompatible index format detected!" + self.first_use = False + self.dirty = False + self.logger.debug("Loaded %i notes from index in %s", len(self.index['files']), load_timer) + except Exception, e: + self.logger.warn("Failed to load index from file: %s", e) + self.first_use = True + self.dirty = True + self.index = {'keywords': {}, 'files': {}, 'version': INDEX_VERSION} + + def save_index(self): + ''' Save the keyword index to disk. ''' + save_timer = Timer() + with open(self.database_file, 'w') as handle: + pickle.dump(self.index, handle) + self.logger.debug("Saved index to disk in %s", save_timer) + + def update_index(self): + ''' Update the keyword index by scanning the notes directory. ''' + update_timer = Timer() + # First we find the filenames and last modified times of the notes on disk. + notes_on_disk = {} + last_count = 0 + for directory in self.user_directories: + for filename in os.listdir(directory): + # Vim swap files are ignored. + if (filename != '.swp' and not fnmatch.fnmatch(filename, '.s??') + and not fnmatch.fnmatch(filename, '.*.s??')): + abspath = os.path.join(directory, filename) + if os.path.isfile(abspath): + notes_on_disk[abspath] = os.path.getmtime(abspath) + self.logger.info("Found %i notes in %s ..", len(notes_on_disk) - last_count, directory) + last_count = len(notes_on_disk) + # Check for updated and/or deleted notes since the last run? + if not self.first_use: + for filename in self.index['files'].keys(): + if filename not in notes_on_disk: + # Forget a deleted note. + self.delete_note(filename) + else: + # Check whether previously seen note has changed? + last_modified_on_disk = notes_on_disk[filename] + last_modified_in_db = self.index['files'][filename] + if last_modified_on_disk > last_modified_in_db: + self.delete_note(filename) + self.add_note(filename, last_modified_on_disk) + # Already checked this note, we can forget about it. + del notes_on_disk[filename] + # Add new notes to index. + for filename, last_modified in notes_on_disk.iteritems(): + self.add_note(filename, last_modified) + self.logger.debug("Updated index in %s", update_timer) + + def add_note(self, filename, last_modified): + ''' Add a note to the index (assumes the note is not already indexed). ''' + self.logger.info("Adding file to index: %s", filename) + self.index['files'][filename] = last_modified + with open(filename) as handle: + for kw in self.tokenize(handle.read()): + if kw not in self.index['keywords']: + self.index['keywords'][kw] = [filename] + else: + self.index['keywords'][kw].append(filename) + self.dirty = True + + def delete_note(self, filename): + ''' Remove a note from the index. ''' + self.logger.info("Removing file from index: %s", filename) + del self.index['files'][filename] + for kw in self.index['keywords']: + self.index['keywords'][kw] = [x for x in self.index['keywords'][kw] if x != filename] + self.dirty = True + + def search_index(self, keywords): + ''' Return names of files containing all of the given keywords. ''' + matches = None + normalized_db_keywords = [(k, self.normalize(k)) for k in self.index['keywords']] + for usr_kw in keywords: + submatches = set() + for original_db_kw, normalized_db_kw in normalized_db_keywords: + # Yes I'm using a nested for loop over all keywords in the index. If + # I really have to I'll probably come up with something more + # efficient, but really it doesn't seem to be needed -- I have over + # 850 notes (about 8 MB) and 25000 keywords and it's plenty fast. + if usr_kw in normalized_db_kw: + submatches.update(self.index['keywords'][original_db_kw]) + if matches is None: + matches = submatches + else: + matches &= submatches + return list(matches) if matches else [] + + def list_keywords(self, substring, limit=25): + ''' Print all (matching) keywords to standard output. ''' + decorated = [] + substring = self.normalize(substring) + for kw, filenames in self.index['keywords'].iteritems(): + normalized_kw = self.normalize(kw) + if substring in normalized_kw: + if levenshtein_supported: + decorated.append((Levenshtein.distance(normalized_kw, substring), -len(filenames), kw)) + else: + decorated.append((-len(filenames), kw)) + decorated.sort() + selection = [d[-1] for d in decorated[:limit]] + print self.encode(u'\n'.join(selection)) + + def tokenize(self, text): + ''' Tokenize a string into a list of normalized, unique keywords. ''' + words = set() + text = self.decode(text) + for word in re.findall(r'\w+', text, re.UNICODE): + word = word.strip() + if word != '' and not word.isspace() and len(word) >= 2: + words.add(word) + return words + + def normalize(self, keyword): + ''' Normalize the case of a keyword if configured to do so. ''' + return keyword if self.case_sensitive else keyword.lower() + + def encode(self, text): + ''' Encode a string in the user's preferred character encoding. ''' + return text.encode(self.character_encoding, 'ignore') + + def decode(self, text): + ''' Decode a string in the user's preferred character encoding. ''' + return text.decode(self.character_encoding, 'ignore') + + def munge_path(self, path): + ''' Canonicalize user-defined path, making it absolute. ''' + return os.path.abspath(os.path.expanduser(path)) + + def usage(self): + print __doc__.strip() + +class Timer: + + """ + Easy to use timer to keep track of long during operations. + """ + + def __init__(self): + self.start_time = time.time() + + def __str__(self): + return "%.2f seconds" % self.elapsed_time + + @property + def elapsed_time(self): + return time.time() - self.start_time + +if __name__ == '__main__': + NotesIndex() + +# vim: ts=2 sw=2 et diff --git a/sources_non_forked/vim-notes/misc/notes/shadow/New note b/sources_non_forked/vim-notes/misc/notes/shadow/New note new file mode 100644 index 00000000..c7c6a02c --- /dev/null +++ b/sources_non_forked/vim-notes/misc/notes/shadow/New note @@ -0,0 +1,13 @@ +New note + +To get started enter a title for your note above. When you’re ready to save +your note just use Vim’s :write or :update commands, a filename will be picked +automatically based on the title. + + * * * + +The notes plug-in comes with self hosting documentation. To jump to these notes +position your cursor on the highlighted name and press ‘gf’ in normal mode: + + • Note taking syntax + • Note taking commands diff --git a/sources_non_forked/vim-notes/misc/notes/shadow/Note taking commands b/sources_non_forked/vim-notes/misc/notes/shadow/Note taking commands new file mode 100644 index 00000000..75c76fc2 --- /dev/null +++ b/sources_non_forked/vim-notes/misc/notes/shadow/Note taking commands @@ -0,0 +1,94 @@ +Note taking commands + +To edit existing notes you can use Vim commands such as :edit, :split and +:tabedit with a filename that starts with ‘note:’ followed by (part of) the +title of one of your notes, e.g.: + {{{vim + :edit note:todo + }}} +When you don’t follow ‘note:’ with anything a new note is created. +The following commands can be used to manage your notes: + +# :Note starts new notes and edits existing ones + +If you don’t pass any arguments to the :Note command it will start editing a +new note. If you pass (part of) of the title of one of your existing notes that +note will be edited. If no notes match the given argument then a new note is +created with its title set to the text you passed to :Note. This command will +fail when changes have been made to the current buffer, unless you use :Note! +which discards any changes. + +To start a new note and use the currently selected text as the title for the +note you can use the :NoteFromSelectedText command. The name of this command +isn’t very well suited to daily use, however the idea is that users will define +their own mapping to invoke this command. For example: + {{{vim + " Map \ns in visual mode to start new note with selected text as title. + vmap ns :NoteFromSelectedText + }}} +# :DeleteNote deletes the current note + +The :DeleteNote command deletes the current note, destroys the buffer and +removes the note from the internal cache of filenames and note titles. This +fails when changes have been made to the current buffer, unless you use +:DeleteNote! which discards any changes. + +# :SearchNotes searches your notes + +This command wraps :vimgrep and enables you to search through your notes using +a regular expression pattern or keywords. To search for a pattern you pass a +single argument that starts & ends with a slash: + + :SearchNotes /TODO\|FIXME\|XXX/ + +To search for one or more keywords you can just omit the slashes, this matches +notes containing all of the given keywords: + + :SearchNotes syntax highlighting + +## :SearchNotes understands @tags + +If you don’t pass any arguments to the :SearchNotes command it will search for +the word under the cursor. If the word under the cursor starts with ‘@’ this +character will be included in the search, which makes it possible to easily +add @tags to your @notes and then search for those tags. To make searching for +tags even easier you can create key mappings for the :SearchNotes command: + {{{vim + " Make the C-] combination search for @tags: + imap :SearchNotes + nmap :SearchNotes + + " Make double mouse click search for @tags. This is actually quite a lot of + " fun if you don’t use the mouse for text selections anyway; you can click + " between notes as if you’re in a web browser: + imap <2-LeftMouse> :SearchNotes + nmap <2-LeftMouse> :SearchNotes + }}} +These mappings are currently not enabled by default because they conflict with +already useful key mappings, but if you have any suggestions for alternatives +feel free to contact me through GitHub or at peter@peterodding.com. + +## Accelerated searching with Python + +After collecting a fair amount of notes (say >= 5 MB) you will probably start +to get annoyed at how long it takes Vim to search through all of your notes. To +make searching more scalable the notes plug-in includes a Python script which +uses a persistent keyword index of your notes stored in a file. + +The first time the Python script is run it will need to build the complete +index which can take a moment, but after the index has been initialized +updates and searches should be more or less instantaneous. + +# :RelatedNotes finds related notes + +This command makes it easy to find all notes related to the current file: If +you are currently editing a note then a search for the note’s title is done, +otherwise this searches for the absolute path of the current file. + +# :RecentNotes lists notes by modification date + +If you execute the :RecentNotes command it will open a Vim buffer that lists +all your notes grouped by the day they were edited, starting with your most +recently edited note. If you pass an argument to :RecentNotes it will filter +the list of notes by matching the title of each note against the argument which +is interpreted as a Vim pattern. diff --git a/sources_non_forked/vim-notes/misc/notes/shadow/Note taking syntax b/sources_non_forked/vim-notes/misc/notes/shadow/Note taking syntax new file mode 100644 index 00000000..1179f364 --- /dev/null +++ b/sources_non_forked/vim-notes/misc/notes/shadow/Note taking syntax @@ -0,0 +1,54 @@ +Note taking syntax + +This note contains examples of the syntax highlighting styles supported by the +notes plug-in. When your Vim configuration supports concealing of text, the +markers which enable the syntax highlighting won’t be visible. In this case you +can make the markers visible by selecting the text. + +# Headings + +Lines prefixed with one or more ‘#’ symbols are headings which can be used for +automatic text folding. There’s also an alternative heading format which isn’t +folded, it consists of a line shorter than 60 letters that starts with an +uppercase letter and ends in a colon (the hard wrapping in this paragraph +illustrates why the “starts with uppercase” rule is needed): + +# Inline formatting + +Text styles: + • _italic text_ + • *bold text* + +Hyper links and such: + • Hyper links: http://www.vim.org/, sftp://server/file + • Domain names: www.python.org + • E-mail addresses: user@host.ext + • UNIX filenames: ~/relative/to/home, /absolute/path + • Windows filenames: ~\relative\to\home, c:\absolute\path, \\server\share + +# Lists + +Bulleted lists can be used for to-do lists: + • DONE Publish my notes.vim plug-in + • TODO Write an indent script for atx headings + • XXX This one is really important + +Numbered lists are also supported: + 1. And You can + 2) use any type + 3/ of marker + +# Block quotes + +> Quotes are written using +> the convention from e-mail + +# Embedded syntax highlighting + +If you type three ‘{’ characters followed by the name of a Vim file type, all +text until the three closing ‘}’ characters will be highlighted using the +indicated file type. Here are some examples of the Fibonacci sequence: + +Lua: {{{lua function fib(n) return n < 2 and n or fib(n - 1) + fib(n - 2) end }}} +Vim script: {{{vim function fib(n) | return n < 2 ? n : fib(n - 1) + fib(n - 2) | endfunction }}} +Python: {{{python def fib(n): return n < 2 and n or fib(n - 1) + fib(n - 2) }}} diff --git a/sources_non_forked/vim-notes/misc/notes/template.html b/sources_non_forked/vim-notes/misc/notes/template.html new file mode 100644 index 00000000..8f4a68bf --- /dev/null +++ b/sources_non_forked/vim-notes/misc/notes/template.html @@ -0,0 +1,40 @@ + + + + + {{ title }} + + + + + + + + +
+ {{ content }} +
+
+ + diff --git a/sources_non_forked/vim-notes/plugin/notes.vim b/sources_non_forked/vim-notes/plugin/notes.vim new file mode 100644 index 00000000..89d06fcb --- /dev/null +++ b/sources_non_forked/vim-notes/plugin/notes.vim @@ -0,0 +1,79 @@ +" Vim plug-in +" Author: Peter Odding +" Last Change: August 19, 2013 +" URL: http://peterodding.com/code/vim/notes/ + +" Support for automatic update using the GLVS plug-in. +" GetLatestVimScripts: 3375 1 :AutoInstall: notes.zip + +" Don't source the plug-in when it's already been loaded or &compatible is set. +if &cp || exists('g:loaded_notes') + finish +endif + +" Make sure vim-misc is installed. +try + " The point of this code is to do something completely innocent while making + " sure the vim-misc plug-in is installed. We specifically don't use Vim's + " exists() function because it doesn't load auto-load scripts that haven't + " already been loaded yet (last tested on Vim 7.3). + call type(g:xolox#misc#version) +catch + echomsg "Warning: The vim-notes plug-in requires the vim-misc plug-in which seems not to be installed! For more information please review the installation instructions in the readme (also available on the homepage and on GitHub). The vim-notes plug-in will now be disabled." + let g:loaded_notes = 1 + finish +endtry + +" Initialize the configuration defaults. +call xolox#notes#init() + +" User commands to create, delete and search notes. +command! -bar -bang -nargs=? -complete=customlist,xolox#notes#cmd_complete Note call xolox#notes#edit(, ) +command! -bar -bang -nargs=? -complete=customlist,xolox#notes#cmd_complete DeleteNote call xolox#notes#delete(, ) +command! -bang -nargs=? -complete=customlist,xolox#notes#keyword_complete SearchNotes call xolox#notes#search(, ) +command! -bar -bang RelatedNotes call xolox#notes#related() +command! -bar -bang -nargs=? RecentNotes call xolox#notes#recent#show(, ) +command! -bar -bang MostRecentNote call xolox#notes#recent#edit() +command! -bar -count=1 ShowTaggedNotes call xolox#notes#tags#show_tags() +command! -bar IndexTaggedNotes call xolox#notes#tags#create_index() +command! -bar NoteToMarkdown call xolox#notes#markdown#view() +command! -bar NoteToHtml call xolox#notes#html#view() + +" TODO Generalize this so we have one command + modifiers (like :tab)? +command! -bar -bang -range NoteFromSelectedText call xolox#notes#from_selection(, 'edit') +command! -bar -bang -range SplitNoteFromSelectedText call xolox#notes#from_selection(, 'vsplit') +command! -bar -bang -range TabNoteFromSelectedText call xolox#notes#from_selection(, 'tabnew') + +" Automatic commands to enable the :edit note:… shortcut and load the notes file type. + +augroup PluginNotes + autocmd! + au SwapExists * call xolox#notes#swaphack() + au BufUnload * call xolox#notes#unload_from_cache() + au BufReadPost,BufWritePost * call xolox#notes#refresh_syntax() + au InsertEnter,InsertLeave * call xolox#notes#refresh_syntax() + au CursorHold,CursorHoldI * call xolox#notes#refresh_syntax() + " NB: "nested" is used here so that SwapExists automatic commands apply + " to notes (which is IMHO better than always showing the E325 prompt). + au BufReadCmd note:* nested call xolox#notes#shortcut() + " Automatic commands to read/write notes (used for automatic renaming). + exe 'au BufReadCmd' xolox#notes#autocmd_pattern(g:notes_shadowdir, 0) 'call xolox#notes#edit_shadow()' + for s:directory in xolox#notes#find_directories(0) + exe 'au BufWriteCmd' xolox#notes#autocmd_pattern(s:directory, 1) 'call xolox#notes#save()' + endfor + unlet s:directory +augroup END + +augroup filetypedetect + let s:template = 'au BufNewFile,BufRead %s if &bt == "" | setl ft=notes | end' + for s:directory in xolox#notes#find_directories(0) + execute printf(s:template, xolox#notes#autocmd_pattern(s:directory, 1)) + endfor + unlet s:directory + execute printf(s:template, xolox#notes#autocmd_pattern(g:notes_shadowdir, 0)) +augroup END + +" Make sure the plug-in is only loaded once. +let g:loaded_notes = 1 + +" vim: ts=2 sw=2 et diff --git a/sources_non_forked/vim-notes/syntax/notes.vim b/sources_non_forked/vim-notes/syntax/notes.vim new file mode 100644 index 00000000..5d3fd485 --- /dev/null +++ b/sources_non_forked/vim-notes/syntax/notes.vim @@ -0,0 +1,162 @@ +" Vim syntax script +" Author: Peter Odding +" Last Change: July 16, 2013 +" URL: http://peterodding.com/code/vim/notes/ + +" Note: This file is encoded in UTF-8 including a byte order mark so +" that Vim loads the script using the right encoding transparently. + +" Quit when a syntax file was already loaded. +if exists('b:current_syntax') + finish +endif + +" Check for spelling errors in all text. +syntax spell toplevel + +" Inline elements. {{{1 + +" Cluster of elements which never contain a newline character. +syntax cluster notesInline contains=notesName + +" Default highlighting style for notes syntax markers. +highlight def link notesHiddenMarker Ignore + +" Highlight note names as hyperlinks. {{{2 +call xolox#notes#highlight_names(1) +syntax cluster notesInline add=notesName +highlight def link notesName Underlined + +" Highlight @tags as hyperlinks. {{{2 +syntax match notesTagName /\(^\|\s\)\@<=@\k\+/ +highlight def link notesTagName Underlined + +" Highlight list bullets and numbers. {{{2 +execute 'syntax match notesListBullet /' . escape(xolox#notes#leading_bullet_pattern(), '/') . '/' +highlight def link notesListBullet Comment +syntax match notesListNumber /^\s*\zs\d\+[[:punct:]]\?\ze\s/ +highlight def link notesListNumber Comment + +" Highlight quoted fragments. {{{2 +if xolox#notes#unicode_enabled() + syntax match notesDoubleQuoted /“.\{-}”/ + syntax match notesSingleQuoted /‘.\{-}’/ +else + syntax match notesDoubleQuoted /".\{-}"/ + syntax match notesSingleQuoted /`.\{-}'/ +endif +highlight def link notesSingleQuoted Special +highlight def link notesDoubleQuoted String + +" Highlight text emphasized in italic font. {{{2 +if has('conceal') + syntax region notesItalic matchgroup=notesItalicMarker start=/\<_\k\@=/ end=/_\>\|\n/ contains=@Spell concealends + highlight link notesItalicMarker notesHiddenMarker +else + syntax match notesItalic /\<_\k[^_]*\k_\>/ +endif +syntax cluster notesInline add=notesItalic +highlight notesItalic gui=italic cterm=italic + +" Highlight text emphasized in bold font. {{{2 +if has('conceal') + syntax region notesBold matchgroup=notesBoldMarker start=/\*\k\@=/ end=/\S\@<=\*/ contains=@Spell concealends + highlight link notesBoldMarker notesHiddenMarker +else + syntax match notesBold /\*\k[^*]*\k\*/ +endif +syntax cluster notesInline add=notesBold +highlight notesBold gui=bold cterm=bold + +" Highlight domain names, URLs, e-mail addresses and filenames. {{{2 + +" FIXME This setting is lost once the user switches color scheme! +highlight notesSubtleURL gui=underline guifg=fg + +syntax match notesTextURL @\/ +syntax cluster notesInline add=notesEmailAddr +highlight def link notesEmailAddr notesSubtleURL +syntax match notesUnixPath /\k\@/ +syntax match notesXXX /\/ +syntax match notesFixMe /\/ +syntax match notesInProgress /\<\(CURRENT\|INPROGRESS\|STARTED\|WIP\)\>/ +syntax match notesDoneItem /^\(\s\+\).*\.*\(\n\1\s.*\)*/ contains=@notesInline +syntax match notesDoneMarker /\/ containedin=notesDoneItem +highlight def link notesTodo WarningMsg +highlight def link notesXXX WarningMsg +highlight def link notesFixMe WarningMsg +highlight def link notesDoneItem Comment +highlight def link notesDoneMarker Question +highlight def link notesInProgress Directory + +" Highlight Vim command names in :this notation. {{{2 +syntax match notesVimCmd /:\w\+\(!\|\>\)/ contains=ALLBUT,@Spell +syntax cluster notesInline add=notesVimCmd +highlight def link notesVimCmd Special + +" Block level elements. {{{1 + +" The first line of each note contains the title. {{{2 +syntax match notesTitle /^.*\%1l.*$/ contains=@notesInline +highlight def link notesTitle ModeMsg + +" Short sentences ending in a colon are considered headings. {{{2 +syntax match notesShortHeading /^\s*\zs\u.\{1,50}\k:\ze\(\s\|$\)/ contains=@notesInline +highlight def link notesShortHeading Title + +" Atx style headings are also supported. {{{2 +syntax match notesAtxHeading /^#\+.*/ contains=notesAtxMarker,@notesInline +highlight def link notesAtxHeading Title +syntax match notesAtxMarker /^#\+/ contained +highlight def link notesAtxMarker Comment + +" E-mail style block quotes are highlighted as comments. {{{2 +syntax match notesBlockQuote /\(^\s*>.*\n\)\+/ contains=@notesInline +highlight def link notesBlockQuote Comment + +" Horizontal rulers. {{{2 +syntax match notesRule /\(^\s\+\)\zs\*\s\*\s\*$/ +highlight def link notesRule Comment + +" Highlight embedded blocks of source code, log file messages, basically anything Vim can highlight. {{{2 +" NB: I've escaped these markers so that Vim doesn't interpret them when editing this file… +syntax match notesCodeStart /{{[{]\w*/ +syntax match notesCodeEnd /}}[}]/ +highlight def link notesCodeStart Ignore +highlight def link notesCodeEnd Ignore +call xolox#notes#highlight_sources(1) + +" Hide mode line at end of file. {{{2 +syntax match notesModeLine /\_^vim:.*\_s*\%$/ +highlight def link notesModeLine LineNr + +" Last edited dates in :ShowTaggedNotes buffers. +syntax match notesLastEdited /(last edited \(today\|yesterday\|\w\+, \w\+ \d\+, \d\+\))/ +highlight def link notesLastEdited LineNr + +" }}}1 + +" Set the currently loaded syntax mode. +let b:current_syntax = 'notes' + +" vim: ts=2 sw=2 et bomb fdl=1 diff --git a/sources_non_forked/vim-ruby b/sources_non_forked/vim-ruby deleted file mode 160000 index b60da6c6..00000000 --- a/sources_non_forked/vim-ruby +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b60da6c63bba329aa0327a2859639f9a02afc3ed diff --git a/sources_non_forked/vim-ruby/.gitignore b/sources_non_forked/vim-ruby/.gitignore new file mode 100644 index 00000000..926ccaaf --- /dev/null +++ b/sources_non_forked/vim-ruby/.gitignore @@ -0,0 +1 @@ +doc/tags diff --git a/sources_non_forked/vim-ruby/.rspec b/sources_non_forked/vim-ruby/.rspec new file mode 100644 index 00000000..4e1e0d2f --- /dev/null +++ b/sources_non_forked/vim-ruby/.rspec @@ -0,0 +1 @@ +--color diff --git a/sources_non_forked/vim-ruby/CONTRIBUTORS b/sources_non_forked/vim-ruby/CONTRIBUTORS new file mode 100644 index 00000000..20888fc1 --- /dev/null +++ b/sources_non_forked/vim-ruby/CONTRIBUTORS @@ -0,0 +1,18 @@ +Maintainers: + Mark Guzman + Doug Kearns + Tim Pope + Andrew Radev + Nikolai Weibull + +Other contributors: + Michael Brailsford + Sean Flanagan + Tim Hammerquist + Ken Miller + Hugh Sasse + Tilman Sauerbeck + Bertram Scharpf + Gavin Sinclair + Aaron Son + Ned Konz diff --git a/sources_non_forked/vim-ruby/ChangeLog b/sources_non_forked/vim-ruby/ChangeLog new file mode 100644 index 00000000..65b659f2 --- /dev/null +++ b/sources_non_forked/vim-ruby/ChangeLog @@ -0,0 +1,1579 @@ +This file is no longer maintained. Consult the Git log for newer changes. + +2009-09-27 Mark Guzman + + * autoload/rubycomplete.vim: pplying a patch from Yoshimasa Niwa resolving + a possible runaway CPU issue when matching context regexes + +2008-08-11 Doug Kearns + + * ftdetect/ruby.vim: match irbrc as a Ruby filetype + +2008-07-15 Doug Kearns + + * FAQ, README, etc/website/index.html: update the references to + RubyGarden's VimRubySupport page + +2008-07-08 Doug Kearns + + * NEWS: begin updating for the pending release + +2008-06-29 Mark Guzman + + * autoload/rubycomplete.vim: resolve a typo in the configuration initialization + section + +2008-06-29 Tim Pope + + * syntax/ruby.vim: revert highlighting of - as number + +2008-06-29 Tim Pope + + * indent/eruby.vim: fix quirk in optional argument handling + +2008-06-29 Tim Pope + + * syntax/ruby.vim: don't match $_foo as an invalid variable + +2008-04-25 Tim Pope + + * ftplugin/eruby.vim, syntax/eruby.vim: guard against recursion + +2008-04-21 Tim Pope + + * indent/eruby.vim: don't let ruby indent %> lines + * indent/ruby.vim: hack around <%= and <%- from eruby + +2008-04-20 Tim Pope + + * syntax/ruby.vim: don't highlight x /= y as regexp + +2008-02-17 Tim Pope + + * indent/ruby.vim: Copy previous string indent inside strings + +2008-02-13 Tim Pope + + * syntax/ruby.vim: keepend on // regexps and add \/ escape + +2008-02-01 Mark Guzman + + * autoload/rubycomplete.vim: switch vim variable checking to a more + rubyish method + +2008-01-31 Tim Pope + + * indent/eruby.vim: setlocal, not set indentexpr + +2008-01-28 Tim Pope + + * syntax/ruby.vim: better heuristic for regexps as method arguments + +2008-01-25 Tim Pope + + * syntax/ruby.vim: highlight several regexp constructs + +2008-01-21 Tim Pope + + * indent/eruby.vim: per Bram's advice, use 'W' searchpair flag + +2008-01-21 Tim Pope + + * indent/eruby.vim: indent { and } like do and end + +2007-12-17 Tim Pope + + * indent/eruby.vim: treat <%- like <% + +2007-10-01 Tim Pope + + * syntax/ruby.vim: removed some false positives (e.g., include?, nil?) + +2007-09-14 Tim Pope + + * compiler/rspec.vim: new compiler plugin for rspec + +2007-09-06 Tim Pope + + * syntax/eruby.vim: remove Vim 5.x specific sections + * syntax/ruby.vim: highlight negative sign in numbers + +2007-08-07 Tim Pope + + * indent/ruby.vim: fix while/until/for match in skip regexp + +2007-07-30 Tim Pope + + * syntax/ruby.vim: highlight undef like def + +2007-07-16 Tim Pope + + * indent/ruby.vim: prevent symbols like :for from indenting + +2007-07-14 Tim Pope + + * syntax/eruby.vim: fixed ALLBUT clauses to refer to right group + +2007-06-22 Tim Pope + + * syntax/ruby.vim: include operator highlighting in class/module + declarations (for ::) + +2007-06-04 Tim Pope + + * syntax/ruby.vim: fixed %s() highlighting + +2007-05-26 Tim Pope + + * syntax/ruby.vim: added rubyBlockParameter to @rubyNoTop + +2007-05-25 Tim Pope + + * indent/ruby.vim: removed string delimiters from string matches + +2007-05-25 Tim Pope + + * syntax/ruby.vim: cleaned up string highlighting + * indent/ruby.vim: lines starting with strings are no longer ignored + +2007-05-22 Tim Pope + + * syntax/ruby.vim: made module declaration match mirror class + declaration match + * ftdetect/ruby.vim: added .irbrc + +2007-05-16 Tim Pope + + * syntax/ruby.vim: revert from using TOP to ALLBUT + +2007-05-15 Tim Pope + + * syntax/eruby.vim: handle %%> properly + +2007-05-14 Tim Pope + + * syntax/ruby.vim: fixed problem highlighting [foo[:bar]] + * syntax/ruby.vim: don't highlight = in {:foo=>"bar"} + +2007-05-11 Tim Pope + + * indent/eruby.vim: GetRubyIndent() takes an argument for debugging + * doc/ft-ruby-syntax.txt: clean up some cruft + +2007-05-09 Tim Pope + + * syntax/ruby.vim: added module_function keyword + +2007-05-06 Tim Pope + + * doc/ft-ruby-syntax.txt: bring into sync with upstream + * ftdetect/ruby.vim: Rails extensions + +2007-05-06 Tim Pope + + * NEWS: update documentation for next release + * syntax/eruby.vim: allow for nesting (foo.erb.erb) + * syntax/ruby.vim: removed : from rubyOptionalDoLine (falsely matches + on symbols, and the syntax is deprecated anyways) + +2007-05-06 Tim Pope + + * ftplugin/ruby.vim: maps for [[, ]], [], ][, [m, ]m, [M, ]M + +2007-05-06 Tim Pope + + * ftplugin/eruby.vim, syntax/eruby.vim: added a default subtype option + +2007-05-06 Tim Pope + + * syntax/ruby.vim: Highlight punctuation variables in string + interpolation, and flag invalid ones as errors + +2007-05-05 Tim Pope + + * syntax/ruby.vim: eliminated some false positves for here docs, + symbols, ASCII codes, and conditionals as statement modifiers + * syntax/ruby.vim: added "neus" to regexp flags + +2007-04-24 Tim Pope + + * ftplugin/eruby.vim, syntax/eruby.vim: fixed typo in subtype + detection + +2007-04-20 Tim Pope + + * ftplugin/eruby.vim, syntax/eruby.vim: refined subtype detection + +2007-04-17 Tim Pope + + * syntax/ruby.vim: highlight %s() as a symbol, not a string + * ftplugin/eruby.vim: determine and use eruby subtype + +2007-04-16 Tim Pope + + * ftplugin/ruby.vim: add *.erb to the browse filter + * indent/eruby.vim: use 'indentexpr' from subtype + +2007-04-16 Tim Pope + + * ftdetect/ruby.vim: detect *.erb as eruby + * syntax/eruby.vim: determine subtype by inspecting filename + +2007-04-03 Doug Kearns + + * syntax/ruby.vim: allow text to appear after, and on the same line, + as '=begin' in rubyDocumentation regions + +2007-03-31 Doug Kearns + + * ftplugin/ruby.vim: add break, redo, next, and retry to b:match_words + +2007-03-28 Doug Kearns + + * syntax/ruby.vim: add matchgroup to rubyArrayLiteral so that + contained square brackets do not match in the start/end patterns + +2007-03-28 Doug Kearns + + * syntax/ruby.vim: don't match [!=?] as part of a sigil prefixed + symbol name + +2007-03-28 Doug Kearns + + * syntax/ruby.vim: rename the rubyNoDoBlock, rubyCaseBlock, + rubyConditionalBlock, and rubyOptionalDoBlock syntax groups to + rubyBlockExpression, rubyCaseExpression, rubyConditionalExpression, + and rubyRepeatExpression respectively + +2007-03-28 Doug Kearns + + * syntax/ruby.vim: remove accidentally included matchgroup from + rubyArrayLiteral + +2007-03-20 Doug Kearns + + * indent/ruby.vim: ignore instance, class, and global variables named + "end" when looking to deindent the closing end token + +2007-03-20 Doug Kearns + + * syntax/ruby.vim, syntax/eruby.vim: remove the Vim version 5 + compatibility code + +2007-03-20 Doug Kearns + + * syntax/ruby.vim: add rubyArrayLiteral syntax group for folding + multiline array literals + +2007-03-19 Doug Kearns + + * syntax/ruby.vim: highlight the scope and range operators when + ruby_operators is set; simplify block parameter highlighting by adding + the rubyBlockParameterList syntax group + +2007-03-17 Doug Kearns + + * syntax/ruby.vim: when ruby_operators is set don't match '>' in '=>'; + fix some minor bugs in the highlighting of pseudo operators and + contain TOP in rubyBracketOperator + +2007-03-17 Doug Kearns + + * syntax/ruby.vim: allow regexp literals to be highlighted after the + 'else' keyword + +2007-03-09 Tim Pope + + * syntax/ruby.vim: Added OPTIMIZE alongside FIXME and TODO. Mirrors + Edge Rails' new annotations extractor tasks. + +2007-03-09 Tim Pope + + * ftplugin/ruby.vim: Skip class= and for= with matchit (really belongs + in ftplugin/eruby.vim). + +2007-03-05 Doug Kearns + + * ftplugin/ruby.vim: add sigil prefixed identifiers to b:match_skip + +2007-03-03 Doug Kearns + + * ftplugin/ruby.vim: simplify the b:match_words pattern by making + better use of b:match_skip in concert with the previous syntax group + additions + +2007-03-03 Doug Kearns + + * syntax/ruby.vim: add rubyConditionalModifier and rubyRepeatModifier + syntax groups for conditional and loop modifiers and match the + optional 'do' or ':' in looping statements with a new rubyOptionalDo + syntax group + +2007-03-02 Doug Kearns + + * NEWS: fix typo + +2007-03-02 Doug Kearns + + * NEWS: update documentation for next release + +2007-03-02 Tim Pope + + * syntax/ruby.vim: Cope with (nonsensical) inclusion of : in + iskeyword. + +2007-03-02 Tim Pope + + * NEWS: Documented changes to omnicompletion. + +2007-03-02 Doug Kearns + + * ftplugin/ruby.vim: refine the conditional/loop expression vs + modifier matchit heuristic + +2007-03-01 Doug Kearns + + * syntax/ruby.vim: refine the conditional/loop expression vs modifier + highlighting heuristic + +2007-02-28 Doug Kearns + + * syntax/ruby.vim: highlight conditional and loop expressions properly + when used with the ternary operator and in blocks + +2007-02-28 Doug Kearns + + * NEWS, CONTRIBUTORS: update documentation for next release + +2007-02-27 Tim Pope + + * ftplugin/ruby.vim: Provide 'balloonexpr'. + +2007-02-27 Doug Kearns + + * syntax/ruby.vim: add rubyPredefinedVariable to short-form + rubyInterpolation's contains list + +2007-02-27 Doug Kearns + + * syntax/ruby.vim: :retab! the file to save a few bytes + +2007-02-26 Tim Pope + + * syntax/ruby.vim: Limit then, else, elsif, and when to inside + conditional statements. + +2007-02-26 Doug Kearns + + * syntax/ruby.vim: make sure 'class << self' is always highlighted + +2007-02-26 Doug Kearns + + * syntax/ruby.vim: reorganise string interpolation syntax groups + +2007-02-26 Doug Kearns + + * syntax/ruby.vim: highlight interpolation regions preceded by + multiple backslashes properly + +2007-02-26 Doug Kearns + + * syntax/ruby.vim: highlight methods named "end" when the definition + is distributed over multiple lines (i.e. allow more "def end" madness) + +2007-02-25 Tim Pope + + * syntax/ruby.vim: Highlight predefined global variables in aliases. + +2007-02-25 Tim Pope + + * syntax/ruby.vim: Highlight symbols and global variables in aliases. + Highlight capitalized method names. + +2007-02-24 Tim Pope + + * ftplugin/ruby.vim: set keywordprg=ri + + * syntax/ruby.vim: Allow for "def end" madness + +2007-02-24 Doug Kearns + + * syntax/ruby.vim: allow escape sequences and interpolation inside + symbol 'names' specified with a string + +2007-02-24 Doug Kearns + + * syntax/ruby.vim: highlight == and & 'operator' redefinitions + properly + +2007-02-23 Tim Pope + + * doc/ft-ruby-syntax.txt: Recommend hi link rubyIdentifier NONE over + ruby_no_identifiers. + +2007-02-23 Tim Pope + + * syntax/ruby.vim: Fixed method highlighting when not at the end of + the line. Highlight aliases. Account for \ before #{} interpolation. + +2007-02-23 Doug Kearns + + * syntax/ruby.vim: make sure multi-line backslash escaped + interpolation regions are highlighted as rubyString + +2007-02-23 Doug Kearns + + * syntax/ruby.vim: link the rubyLoop syntax group to the Repeat + highlight group + +2007-02-22 Tim Pope + + * indent/eruby.vim: Fixed an edge case. + + * syntax/ruby.vim: Simpler method and class declaration highlighting. + Changed some contains=ALLBUT,... to contains=TOP. Altered some + highlight links: rubyConstant is now Type; rubySymbol is now Constant. + New groups like rubyLoop and rubyCondition. + +2007-02-22 Doug Kearns + + * syntax/ruby.vim: highlight short format interpolated variables + +2007-02-20 Tim Pope + + * syntax/ruby.vim: Place class/module declarations in a separate + group. Allow self to be highlighted in a method declaration. + +2007-02-18 Tim Pope + + * syntax/ruby.vim: Separate Regexp group. Nest Ruby code inside + string interpolation. Restored highlighting of method, class, and + module declarations. + +2007-02-10 Doug Kearns + + * ftplugin/ruby.vim: only reset 'ofu' if it exists and was set by the + ftplugin (for Vim 6 compatibility) + +2007-01-22 Tim Pope + + * ftplugin/ruby.vim: Limited path detection code to Windows, again. + +2006-12-13 Mark Guzman + + * autoload/rubycomplete.vim: added support for lambda and '&' defined + procs. + +2006-12-07 Mark Guzman + + * ftplugin/ruby.vim: modified the path detection code use + the built-in interpreter if it's available in all cases. + +2006-12-04 Tim Pope + + * indent/eruby.vim: Special case for "end" on first line of multi-line + eRuby block. + +2006-12-03 Doug Kearns + + * CONTRIBUTORS: add tpope + +2006-12-01 Mark Guzman + + * ftplugin/ruby.vim: changed the path detection code to use the + built-in interpreter if it's available under windows + +2006-11-30 Mark Guzman + + * autoload/rubycomplete.vim: Display constants as defines. Added a + rails preloading option. Fixed a bug detecting ranges defined with + %r{. Added support for completion in rails migrations. Will now + fail-over to syntax completion automatically, if the vim isn't built + with ruby support. Added support for class detection using + ObjectSpace. Tweeked buffer searching code to find modules/classes + reliably in more cases. + +2006-11-09 Tim Pope + + * indent/ruby.vim: Only increase one 'shiftwidth' after a line ending + with an open parenthesis. + +2006-11-08 Tim Pope + + * indent/eruby.vim: Rearranged keywords; new 'indentkeys' + +2006-11-08 Tim Pope + + * indent/eruby.vim: new indenting algorithm + +2006-11-08 Doug Kearns + + * syntax/ruby.vim: don't include trailing whitespace in matches for + 'def', 'class', and 'module' keywords + +2006-10-28 Doug Kearns + + * syntax/ruby.vim: remove accidently included nextgroup arg in + 'heredoc' syntax group definitions + +2006-10-24 Doug Kearns + + * syntax/eruby.vim: recognise '-' trim mode block delimiters (Nikolai + Weibull) + +2006-09-19 Mark Guzman + + * autoload/rubycomplete.vim: improved rails view support. included + rails helpers in rails completions. kernel elements are also included + in default completions. improved the handling of "broken" code. + +2006-09-07 Mark Guzman + + * autoload/rubycomplete.vim: autoload rubygems if possible. added + debugging print. clean up the buffer loading code a bit + +2006-08-21 Mark Guzman + + * autoload/rubycomplete.vim: modified the buffer loading code to prevent + syntax errors from stopping completion + +2006-07-12 Mark Guzman + + * autoload/rubycomplete.vim: added in-buffer method def handling. also + added an inital attempt at handling completion in a rails view + +2006-07-11 Doug Kearns + + * FAQ, INSTALL, NEWS, README, doc/ft-ruby-syntax.txt: update + documentation for next release + + * ftplugin/ruby.vim: only set 'omnifunc' if Vim has been compiled with + the Ruby interface + +2006-07-10 Doug Kearns + + * syntax/ruby.vim: fold all multiline strings + +2006-06-19 Mark Guzman + + * autoload/rubycomplete.vim: modified to change the default + buffer loading behavior. buffers are no longer loaded/parsed + automatically. enabling this feature requires setting the + variable g:rubycomplete_buffer_loading. this was done as + a security measure, the default vim7 install should not + execute any code. + + * autoload/rubycomplete.vim: symbol completion now works. i + tested with global symbols as well as rails symbols. + +2006-05-26 Doug Kearns + + * ftplugin/ruby.vim: fix typo + +2006-05-25 Mark Guzman + + * autoload/rubycomplete.vim: added rails column support. + switched to dictionary with type specifiers for methods, + classes, and variables. started/added rails 1.0 support. + added rails database connection support. + +2006-05-25 Doug Kearns + + * syntax/ruby.vim: use a region for the rubyMultiLineComment syntax + group instead of a multiline match pattern as it is faster; rename + rubyMultiLineComment to rubyMultilineComment + +2006-05-13 Doug Kearns + + * ftplugin/ruby.vim: test for '&omnifunc', rather than the Vim + version, before setting it; add omnifunc to b:undo_ftplugin + +2006-05-12 Doug Kearns + + * syntax/ruby.vim: match the pseudo operators such as '+=' when + ruby_operators is defined + +2006-05-11 Mark Guzman + + * autoload/rubycomplete.vim: added checks for the existance of + global config variables per dkearns' patch. refined error messages + to use vim error style + +2006-05-11 Doug Kearns + + * syntax/ruby.vim: make sure rubyDocumentation is highlighted even if + ruby_no_comment_fold is defined; improve rubyDocumentation match + patterns + +2006-05-09 Doug Kearns + + * syntax/ruby.vim: make folding of comments configurable via the + ruby_no_comment_fold variable + + * syntax/ruby.vim: add rubyMultiLineComment syntax group to allow + folding of comment blocks + +2006-05-08 Doug Kearns + + * syntax/ruby.vim: simplify rubyNoDoBlock, rubyOptDoLine match + patterns + + * syntax/ruby.vim: add initial support for highlighting 'operators'. + This is off by default and enabled by defining the ruby_operators + variable + + * syntax/ruby.vim: if/unless immediately following a method name + should always be highlighted as modifiers and not the beginning of an + expression + +2006-05-07 Mark Guzman + + * autoload/rubycomplete.vim: Switched to script local vars, + per patch from dkearns. removed secondary array clause. applied + patch provided by dkearns, fixes input handling. + +2006-05-07 Doug Kearns + + * autoload/rubycomplete.vim: set 'foldmethod' to marker in the + modeline + +2006-05-03 Doug Kearns + + * ftplugin/ruby.vim: add patterns for braces, brackets and parentheses + to b:match_words + +2006-05-01 Mark Guzman + + * autoload/rubycomplete.vim: Added error trapping and messages + for class import errors + +2006-04-28 Mark Guzman + + * autoload/rubycomplete.vim: started adding raw range support + 1..2.. fixed the symbol completion bug, where you + would end up with a double colon. + +2006-04-27 Mark Guzman + + * autoload/rubycomplete.vim: added variable type detection for + Ranges. added handlers for string completion: "test". + +2006-04-26 Mark Guzman + + * autoload/rubycomplete.vim: removed cWORD expansion in favor of + grabbing the whole line. added support for completing variables + inside operations and parameter lists. removed excess cruft code. + removed commented code. + + * autoload/rubycomplete.vim: fixed the truncation code. this fixes + f.chomp! returning chomp! again, where it should provide + the global list. It also fixes f.foo( a.B, b. returning a's + list when it should return b's. + +2006-04-26 Doug Kearns + + * autoload/rubycomplete.vim: set 'expandtab' properly + +2006-04-25 Mark Guzman + + * autoload/rubycomplete.vim: started stripping out preceding + assigment operation stuff. "x = A", would attempt to complete + A using the global list. I've started removing old/commented + code in an effort to slim down the file. + +2006-04-25 Doug Kearns + + * autoload/rubycomplete.vim: remove excess whitespace + + * indent/ruby.vim: make sure 'smartindent' is disabled + +2006-04-24 Mark Guzman + + * autoload/rubycomplete.vim: fixed a completion bug where the entered + text was not taken to account. it will now be used to limit the entries + returned + +2006-04-24 Doug Kearns + + * Rakefile: add vim help files, the new FAQ and rubycomplete.vim to + the gemspec file list + +2006-04-22 Mark Guzman + + * autoload/rubycomplete.vim: changed the rails load code to match the + console load, we're now pulling everything in. completion of class + members from within the class definition now works properly. + +2006-04-21 Mark Guzman + + * autoload/rubycomplete.vim: renamed the vim global variable + controlling the addition of classes defined in the current buffer to + the global completion list + + * autoload/rubycomplete.vim: the global variable list is now sorted + and dups are removed + + * autoload/rubycomplete.vim: fixed a bug with rails support, where + rails standard methods would be added to a completion list when not + in a rails project + + * doc/ft-ruby-omni.txt: added information about the classes in global + completion option + +2006-04-21 Doug Kearns + + * doc/ft-ruby-omni.txt: add highlighting to example setting of + g:rubycomplete_rails variable + +2006-04-21 Mark Guzman + + * autoload/rubycomplete.vim: added support for adding classes defined + in the current buffer to the global completion list - when completing + with no text outside of a class definition + +2006-04-20 Doug Kearns + + * doc/ft-ruby-omni.txt: add new omni completion documentation + + * doc/ft-ruby-syntax.txt, syntax/doc/ruby.txt: move syntax + documentation to ft-ruby-syntax.txt + +2006-04-20 Mark Guzman + + * autoload/rubycomplete.vim: fixed a completion hang/crash when + completing symbols globally switched to smaller chunks being added to + the dictionary + + * autoload/rubycomplete.vim: it will now complete rails classes + + * autoload/rubycomplete.vim: removed left over debug prints + +2006-04-19 Mark Guzman + + * autoload/rubycomplete.vim: in-buffer class completion seems to work + properly in my test cases added range variable detection - contributed + +2006-04-19 Doug Kearns + + * ftdetect/ruby.vim: add RJS and RXML template file detection + +2006-04-19 Gavin Sinclair + + * CONTRIBUTORS, ftplugin/ruby.vim: update Gavin's email address + +2006-04-18 Mark Guzman + + * autoload/rubycomplete.vim: revised the in-buffer class loading, + needs a little more work but its testable + +2006-04-17 Doug Kearns + + * CONTRIBUTORS, indent/ruby.vim: update Nikolai's email address + +2006-04-16 Mark Guzman + + * autoload/rubycomplete.vim: added a work-around for the cWORD bug + found by dkearns; added support for completion of in-buffer classes; + switched return-type over to a dictionary + +2006-04-15 Doug Kearns + + * autoload/rubycomplete.vim: rename rbcomplete#Complete to match + script file name + + * autoload/rubycomplete.vim, compiler/rubyunit.vim, ftdetect/ruby.vim, + ftplugin/ruby.vim, indent/ruby.vim, syntax/ruby.vim, + compiler/eruby.vim, compiler/ruby.vim, ftplugin/eruby.vim, + indent/eruby.vim, syntax/eruby.vim: add Release-Coordinator header + line and remove GPL license + + * CONTRIBUTORS, bin/vim-ruby-install.rb: add Mark to the list of + maintainers; add rubycomplete.vim to the installer script's list of + files + +2006-04-14 Mark Guzman + + * autoload/rubycomplete.vim, ftplugin/ruby.vim: added ruby + omni-completion files; modified the ftplugin to set the omnifunc + +2005-10-14 Gavin Sinclair + + * indent/ruby.vim: Changed maintainer to Nikolai. + +2005-10-13 Doug Kearns + + * compiler/eruby.vim, compiler/rubyunit.vim, ftplugin/eruby.vim, + ftplugin/ruby.vim, indent/eruby.vim, indent/ruby.vim, + syntax/eruby.vim, syntax/ruby.vim: fix typo in URL header + + * ftdetect/ruby.vim: add filetype detection for Rantfiles + +2005-10-07 Doug Kearns + + * NEWS: updated for new release + + * syntax/doc/ruby.txt: update formatting for Vim 6.4 release + +2005-10-06 Doug Kearns + + * ftplugin/ruby.vim: prevent symbols from matching as matchit + match_words + +2005-10-05 Doug Kearns + + * NEWS: updated for new release + + * bin/vim-ruby-install.rb: raise an exception if there are unknown + args passed to the script + + * ftplugin/ruby.vim: add '.' to the head of 'path' so that files + relative to the directory of the current file are found first + +2005-10-04 Doug Kearns + + * syntax/ruby.vim: make the use of 'ruby_no_expensive' local to the + buffer for eruby files + + * compiler/eruby.vim, compiler/rubyunit.vim, compiler/ruby.vim, + ftdetect/ruby.vim, ftplugin/eruby.vim, ftplugin/ruby.vim, + indent/eruby.vim, indent/ruby.vim, syntax/eruby.vim, syntax/ruby.vim: + replace spaces with tabs, where possible, to reduce file sizes as + requested by BM + +2005-09-30 Doug Kearns + + * ftplugin/ruby.vim: place Gems after the standard $LOAD_PATH in + 'path' + +2005-09-27 Doug Kearns + + * ftplugin/ruby.vim: replace a single '.' with ',,' in all locations + in 'path' + +2005-09-26 Doug Kearns + + * ftplugin/ruby.vim: use print instead of puts to generate s:rubypath + +2005-09-25 Doug Kearns + + * syntax/ruby.vim: allow comments to be highlighted directly after + module/class/method definitions without intervening whitespace + +2005-09-24 Doug Kearns + + * syntax/ruby.vim: allow regexp's as hash values and after a ';' + + * NEWS: updated for new release + + * syntax/ruby.vim: fix typo in rubyControl highlight group name + + * bin/vim-ruby-install.rb: add --backup option and include short + options for it and --windows; make sure the backup directory is + written to CWD + +2005-09-22 Doug Kearns + + * compiler/rubyunit.vim: improve compiler message output and behaviour + to match that of the GUI test runners + + * syntax/ruby: allow while/until modifiers after methods with names + ending in [!=?]; assume (for now) that while/until expressions used as + args will be specified with parentheses + +2005-09-21 Doug Kearns + + * bin/vim-ruby-install.rb, indent/eruby.vim: add a new indent file for + eRuby; just use the html indent file for now + + * compiler/eruby.vim: use the ruby compiler plugin 'efm' and add a + eruby_compiler config variable to allow for using eruby as the + 'makeprg' rather than the default erb + +2005-09-20 Doug Kearns + + * syntax/ruby.vim: match and highlight exit! as a 'special' method + +2005-09-18 Nikolai Weibull + + * indent/ruby.vim: Fix bug #2481 + +2005-09-18 Nikolai Weibull + + * indent/ruby.vim: Fix for #2473 + +2005-09-18 Doug Kearns + + * bin/vim-ruby-install.rb: make sure that the latest vim-ruby, rather + than vim-ruby-devel, gem is being used + +2005-09-16 Doug Kearns + + * ftdetect/ruby.vim: use 'set filetype' rather than 'setfiletype' to + override any previously set filetype + +2005-09-15 Doug Kearns + + * syntax/ruby.vim: add $LOADED_FEATURES and $PROGRAM_NAME to + rubyPredefinedVariable + + * NEWS: correct release number + + * INSTALL: add a precautionary note about backing up files prior to + using the installer + +2005-09-14 Doug Kearns + + * Rakefile: add INSTALL and NEWS files to FileList + + * INSTALL, NEWS: add INSTALL and NEWS files + +2005-09-13 Doug Kearns + + * syntax/eruby.vim: make sure escaped eRuby tags aren't highlighted as + block delimiters with a trailing '%' + +2005-09-11 Doug Kearns + + * CONTRIBUTORS: update pcp's email address + + * indent/ruby.vim: reinsert license in header + + * ftplugin/ruby.vim: include gems load path in 'path' option + + * indent/ruby.vim: ignore the rescue 'modifier' when indenting (#2296) + + * indent/ruby.vim: fix comment typo + +2005-09-10 Nikolai Weibull + + * indent/ruby.vim: Fixes bugs introduced in earlier commits. Been + running without fault for two-three weeks now. It's about as good as + it gets without a major reworking. Enjoy! + +2005-09-10 Doug Kearns + + * Rakefile: use GMT time in the version string + + * compiler/rubyunit.vim: save each message from error backtraces + + * README, etc/website/index.html: update the package naming + description + + * Rakefile: set the package task's need_zip attribute so that zip + package archives are also created + + * ftplugin/ruby.vim: remove 'multiline' patterns from b:match_words + +2005-09-09 Doug Kearns + + * syntax/ruby: allow if/unless/while/until expressions to be + highlighted when used as method args following a ',' + +2005-09-08 Doug Kearns + + * syntax/ruby.vim: allow while/until expressions to be highlighted + + * bin/vim-ruby-install.rb: rescue Win32::Registry::Error when + accessing the Windows registry + + * ChangeLog, Rakefile, compiler/eruby.vim, compiler/rubyunit.vim, + compiler/ruby.vim, ftplugin/eruby.vim, indent/ruby.vim, + syntax/eruby.vim, syntax/ruby.vim: normalise vim modelines + + * etc/release/release.sh: add -z to cvsrelease call to create a zip + release file as well as a tar.gz + + * Rakefile: add CONTRIBUTORS file to FileList + + * ftplugin/ruby.vim: escape \'s in b:match_skip pattern + + * Rakefile: update filetype/ to ftdetect/ in FileList + +2005-09-07 Doug Kearns + + * ftplugin/ruby.vim: improve b:match_words pattern + +2005-09-06 Doug Kearns + + * syntax/ruby.vim: move hyphen to end of collection in rubyNoDoBlock + pattern + +2005-09-03 Doug Kearns + + * syntax/ruby.vim: allow if/unless expressions after the %, ^, | and & + operators + +2005-09-02 Doug Kearns + + * bin/vim-ruby-install.rb: add ftplugin/eruby.vim to list of source + files + + * ftplugin/eruby.vim: add new eRuby ftplugin + + * ftplugin/ruby.vim: merge most features from Ned Konz's ftplugin + + * compiler/eruby.vim: match eruby specific error messages and parse + the error's column number when provided + +2005-09-01 Doug Kearns + + * bin/vim-ruby-install.rb, compiler/eruby.vim: add new eruby compiler + plugin + + * syntax/eruby.vim, syntax/ruby.vim: split erubyBlock into erubyBlock + and erubyExpression; allow expressions inside blocks; set + ruby_no_expensive if highlighting eRuby; add spell checking and + rubyTodo to erubyComment + + * syntax/eruby.vim: make sure that eRubyOneLiner starts at the + very beginning of a line + + * syntax/eruby.vim: make sure that eRubyOneLiner cannot be extended + over multiple lines + +2005-08-30 Doug Kearns + + * syntax/ruby.vim: remove rubyIterator HiLink command line + +2005-08-27 Doug Kearns + + * bin/vim-ruby-install.rb: add Env.determine_home_dir using + %HOMEDRIVE%%HOMEPATH% as HOME on Windows if HOME is not explicitly set + + * syntax/ruby.vim: fix regression in rubyOptDoBlock + + * syntax/ruby.vim: fix typo in rubyBlockParameter pattern + +2005-08-26 Nikolai Weibull + + * indent/ruby.vim: Updated to indent correctly. There's more to be + done, as a statement may be contained in other stuff than a '... = ', + so that '=' should be [=+-...]. Soon to be fixed. + +2005-08-26 Doug Kearns + + * syntax/ruby.vim: only match rubyBlockParameter after 'do' that is a + 'keyword' + +2005-08-25 Doug Kearns + + * syntax/ruby.vim: rename rubyIterator to rubyBlockParameter; ensure + it only highlights these after a 'do' or '{'; match parameters in + parentheses + + * syntax/doc/ruby.txt: minor reorganisation of options + + * bin/vim-ruby-install.rb: don't use $0 == __FILE__ idiom to start + installer file as this will fail when running as a gem as + vim-ruby-install.rb is loaded by the gem driver; make _same_contents + a private method; fix a bug in BackupDir.backup where it was writing + the backup to an incorrect location + +2005-08-24 Nikolai Weibull + + * indent/ruby.vim: + 1. resetting of cpoptions (wouldn't always be done, depending on if + GetRubyIndent was defined. + + 2. Bugs #166, #1914, #2296 should be fixed + + 3. Somewhat simpler processing of the contents of the file. + + Most of the work was removing complexity that was trying to be clever + about understanding the syntax/semantics of the file, while actually + making things slow and actually not matching correctly. + +2005-08-24 Doug Kearns + + * syntax/ruby.vim: remove 'contains=rubyString' from the + rubyInterpolation group until that is more comprehensively improved + +2005-08-18 Doug Kearns + + * syntax/ruby.vim: explicitly match block arguments so that &keyword + isn't highlighted as a 'keyword' prefixed with & + + * syntax/ruby.vim: improve highlighting of heredocs used as method + arguments + +2005-08-17 Doug Kearns + + * syntax/ruby.vim: improve highlighting of the optional 'do' in + looping constructs + + * syntax/ruby.vim: remove accidentally added 'keepend' from + rubyOptDoBlock + + * syntax/ruby.vim: merge 'while|until' start patterns of + rubyOptDoBlock syntax group + +2005-08-16 Doug Kearns + + * bin/vim-ruby-install.rb: wrap 'main' in a begin/end block + + * bin/vim-ruby-install.rb: add FIXME comment (Hugh Sasse) + + * README, bin/vim-ruby-install.rb, etc/website/index.html: offer + $VIM/vimfiles and $HOME/{.vim,vimfiles} rather than $VIMRUNTIME as the + two default installation directories + +2005-08-15 Doug Kearns + + * syntax/ruby.vim: remove character offset 'hs' from the + rubyOptDoBlock start match + + * syntax/ruby.vim: exclude leading whitespace from the rubyOptDoBlock + syntax group start patterns with \zs + +2005-08-11 Doug Kearns + + * CONTRIBUTORS, bin/vim-ruby-install.rb, syntax/eruby.vim: add syntax + highlighting for eRuby files + + * ftdetect/ruby.vim: reorder autocommands for eRuby setf line + +2005-08-08 Doug Kearns + + * bin/vim-ruby-install.rb: add ftdetect/ruby.vim to list of source + files + +2005-08-07 Doug Kearns + + * filetype/ruby.vim, ftdetect/ruby.vim: move ruby.vim from filetype/ + to ftdetect/ + + * filetype/filetype.vim, filetype/ruby.vim: move filetype.vim to + ruby.vim; add eRuby filetype detection + +2005-08-06 Doug Kearns + + * syntax/ruby.vim: match rubyConstant and rubyLocalVariableOrMethod + with a leading word boundary + + * syntax/ruby.vim: move ruby_no_identifiers test to the default + highlighting block so that all identifiers are still matched when this + is config variable set + + * syntax/ruby.vim: remove display argument from rubyConstant now that + the match is multiline + +2005-08-03 Doug Kearns + + * CONTRIBUTORS: add new file listing project contributors + +2005-08-02 Doug Kearns + + * syntax/ruby.vim: differentiate between constants and capitalized + class methods invoked with the scope operator '::' + +2005-08-01 Doug Kearns + + * syntax/ruby.vim: undo reordering of identifier matching and make $_ + a special case to prevent it matching against global variables with a + leading underscore + +2005-07-30 Doug Kearns + + * syntax/ruby.vim: reorder identifier matching so that identifiers + 'containing' predefined identifiers, such as $_, match properly + +2005-07-28 Doug Kearns + + * syntax/ruby.vim: improve matching of conditional expressions + +2005-07-27 Doug Kearns + + * Rakefile: add 'package' as the default target + +2005-07-26 Doug Kearns + + * syntax/ruby.vim: replace leading context 'lc' offsets with the + '\@<=' pattern construct when matching 'normal regular expressions' + (Aaron Son) + +2005-07-22 Doug Kearns + + * syntax/ruby.vim: allow strings inside interpolation regions + +2005-07-04 Doug Kearns + + * bin/vim-ruby-install.rb: improve source directory detection (Hugh + Sasse) + +2005-04-05 Doug Kearns + + * syntax/ruby.vim: match rubyNested*, and rubyDelimEscape as + transparent items; add closing escaped delimiters to rubyDelimEscape + syntax group + +2005-04-04 Doug Kearns + + * syntax/ruby.vim: highlight nested delimiters in generalized quotes + (Aaron Son, Bertram Scharpf and Ken Miller) + +2005-04-04 Doug Kearns + + * syntax/ruby.vim: minor improvement to block parameter highlighting + +2005-04-04 Doug Kearns + + * syntax/doc/ruby.txt: add documentation for the ruby_space_errors, + ruby_no_trail_space_error and ruby_no_tab_space_error configuration + variables + +2005-03-30 Doug Kearns + + * syntax/ruby.vim: add configurable highlighting of trailing space and + 'space before tab' errors (Tilman Sauerbeck) + +2005-03-24 Gavin Sinclair + + * syntax/ruby.vim: Improved hilighting of %{...} strings with + nested brackets (Ken Miller). + * indent/ruby.vim: Improved indenting of %{...} strings with + nested brackets (Ken Miller). + * syntax/ruby.vim: Corrected hilighting of |(x,y)| iterator + parameters (Tilman Sauerbeck). + +2004-11-27 Doug Kearns + + * compiler/ruby.vim, compiler/rubyunit.vim, syntax/ruby.vim: update + DJK's email address + +2004-09-30 Doug Kearns + + * syntax/ruby.vim: match regexp values in hash literals + +2004-09-20 Gavin Sinclair + + * bin/vim-ruby-install.rb: added + * Rakefile: 'rake package' generates TGZ and GEM + * install.rb: removed + * build.rb: removed + +2004-09-04 Doug Kearns + + * compiler/rubyunit.vim, compiler/ruby.vim: update to use new + CompilerSet command + +2004-05-19 Doug Kearns + + * compiler/rubyunit.vim: match assert messages + +2004-05-12 Doug Kearns + + * syntax/ruby.vim: check for the folding feature rather than just the + vim version when testing if the foldmethod should be set to syntax + +2004-05-11 Doug Kearns + + * compiler/rubyunit.vim: add initial support for parsing Test::Unit + errors + +2004-05-11 Doug Kearns + + * syntax/doc/ruby.txt: add documentation for the + ruby_no_special_methods and ruby_fold configuration variables + +2004-04-29 Doug Kearns + + * filetype/filetype.vim: move matching of [Rr]akefile* to a separate + section which is located later in the file to avoid incorrectly + matching other filetypes prefixed with [Rr]akefile + +2005-04-27 Doug Kearns + + * filetype/filetype.vim: match 'rakefile' as a Rakefile + +2004-04-23 Ward Wouts + + * syntax/ruby.vim: add ruby_fold variable to control the setting of + the foldmethod option + +2004-04-06 Doug Kearns + + * filetype/filetype.vim: add RubyGems specification and installation + files and Rakefiles + +2004-04-01 Doug Kearns + + * compiler/rubyunit.vim: add a new compiler plugin for Test::Unit + +2004-03-23 Doug Kearns + + * etc/website/index.html, etc/website/djk-theme.css: add simple CSS + style sheet + +2004-02-08 Doug Kearns + + * etc/website/index.html: convert to valid HTML 4.01 Strict. + +2004-01-11 Gavin Sinclair + + * ftplugin/ruby.vim: Added matchit instructions. + +2003-11-06 Doug Kearns + + * README: update DJK's current location. + +2003-11-06 Doug Kearns + + * syntax/ruby.vim: add support for the new decimal and octal base + indicators and capitalization of all base indicators. + +2003-10-20 Nikolai Weibull + + * indent/ruby.vim: Added support for ?: multilining, such as + a ? + b : + c. + +2003-10-18 Nikolai Weibull + + * indent/ruby.vim: Fixed a silly bug with the [] matching. + +2003-10-17 Gavin Sinclair + + * README: Minor addition. + * etc/website/index.html: Synced with README. + +2003-10-15 Nikolai Weibull + + * indent/ruby.vim: Fixed bug #114. Also fixed a related problem with + documentation blocks. They would indent relative to the other code. + Now it simply indents with zero width (to match =begin) by default. + Otherwise acts like 'autoindent'. Also fixed a problem with | and & + not being recognized as continuation lines. This may cause problems + with do blocks, we'll see. + * indent/ruby.vim: In response to previous note. It proved fatal. + Fixed now. + +2003-10-14 Nikolai Weibull + + * syntax/ruby.vim: Readded matching of $' and $" when + ruby_no_identifiers was off. Got accidentaly removed with previous + fix. + +2003-10-13 Nikolai Weibull + + * indent/ruby.vim: General cleanup, speedup, fixup. Fixes bug #62. + Indentiation of tk.rb (5200+ lines) takes under 13 seconds now. + * ftplugin/ruby.vim: Cleanup. Nested if's unnecessary. Also modified + modeline. + +2003-10-12 Nikolai Weibull + + * indent/ruby.vim: Fixed bugs #89 and #102. + * syntax/ruby.vim: The $' and $" variables weren't being matched if + ruby_no_identifiers was on. This messed up string matching. + * indent/ruby.vim: Basically did a total rewrite in the process. + Everything is well documented now, and should be rather simple to + understand. There is probably room for optimization still, but it + works rather fast, indenting tk.rb (5200+ lines) in under 15 seconds. + I'm betting searchpair() may be executing a bit too often still, but a + lot of special cases have now been taken care of. This version also + fixes bug #59 and #71. + +2003-10-03 Doug Kearns + + * syntax/ruby.vim: simplify the rubyData pattern by using the new EOF + atom. + +2003-10-03 Doug Kearns + + * syntax/ruby.vim: link rubyBoolean to rubyPseudoVariable; link + rubyPseudoVariable to the Constant highlight group. + +2003-09-30 Doug Kearns + + * syntax/ruby.vim: create rubyPseudoVariable syntax group; move self, + nil, __LINE__ and __FILE_ to rubyPseudoVariable. + +2003-09-30 Doug Kearns + + * etc/website/index.html: update DJK's current location. + +2003-09-26 Doug Kearns + + * etc/website/index.html: close the open PRE element and add a DOCTYPE + declaration. + +2003-09-26 Doug Kearns + + * indent/ruby.vim: update references to rubyExprSubst - this syntax + group has been split into rubyInterpolation, rubyNoInterpolation and + rubyEscape. + +2003-09-26 Gavin Sinclair + + * etc/release/*: added to aid in the production of releases. + * etc/website/*: now anyone can have a crack at the + vim.ruby.rubyforge.org website! + +2003-09-25 Doug Kearns + + * syntax/ruby.vim: link the rubyNoInterpolation syntax group to + rubyString; merge rubyHexadecimal, rubyDecimal, rubyOctal, rubyBinary + into rubyInteger. + +2003-09-22 Doug Kearns + + * syntax/ruby.vim: link the rubyOperator syntax group to the Operator + highlight group. + +2003-09-21 Doug Kearns + + * syntax/ruby.vim: match regexps after split, scan, sub and gsub. + +2003-09-21 Doug Kearns + + * syntax/ruby.vim: highlight escaped string interpolation correctly; + allow hexadecimal and octal escape sequences to match with less than 3 + and 2 digits respectively; split rubyExprSubst into multiple syntax + groups - rubyInterpolation, rubyNoInterpolation, rubyEscape. + +2003-09-19 Doug Kearns + + * syntax/ruby.vim: match singleton class definitions with no + whitespace between 'class' and '<<'. + +2003-09-19 Doug Kearns + + * install.rb, syntax/doc/ruby.txt: fix minor typos. + +2003-09-18 Doug Kearns + + * syntax/ruby.vim: improve float and decimal matching; split + rubyInteger into multiple syntax groups - rubyASCIICode, + rubyHexadecimal, rubyDecimal, rubyOctal, rubyBinary. + +2003-09-18 Doug Kearns + + * syntax/ruby.vim: replace all patterns surrounded by \(\) with \%(\) + when the sub-expression is not used. + +2003-09-18 Gavin Sinclair + + * install.rb: Included comments and USAGE string from revisino 1.1. + +2003-09-18 Doug Kearns + + * syntax/ruby.vim: match regexp after 'not' and 'then'; match if and + unless expressions following '=' and '('. + +2003-09-17 Gavin Sinclair + + * ftplugin/ruby.vim: implemented matchit support (thanks to Ned Konz + and Hugh Sasse). + +2003-09-17 Gavin Sinclair + + * install.rb: replaced with Hugh Sasse's contribution. Alpha state + until tested, and with several issues and todos listed. + +2003-09-11 Doug Kearns + + * syntax/ruby.vim: fix my accidental redefinition of the + ruby_no_expensive matchgroups. + +2003-09-11 Doug Kearns + + * syntax/ruby.vim: improve support for symbols, integers and floating + point numbers; add the display argument to :syntax where appropriate. + +2003-09-09 Doug Kearns + + * syntax/ruby.vim: remove Vim 5.x specific sections and simplify the + generalized string, regular expression, symbol, and word list literal + syntax groups. + +2003-09-09 Doug Kearns + + * indent/ruby.vim, syntax/ruby.vim: rename the rubyStringDelimit + syntax group rubyStringDelimiter. + +2003-09-09 Doug Kearns + + * syntax/ruby.vim: highlight one line module, class, and method + definitions, using the ';' terminator, correctly; split + rubyClassOrModule into two new syntax groups - rubyClass and + rubyModule. + +2003-09-08 Doug Kearns + + * syntax/ruby.vim: add the @Spell cluster to support spell checking + of comment text. + +2003-09-08 Doug Kearns + + * syntax/ruby.vim: add support for the new %s() symbol literal. + +2003-09-03 Doug Kearns + + * compiler/ruby.vim: update the maintainer's email address. + +2003-09-02 Doug Kearns + + * syntax/ruby.vim: make sure that the optional do after for, until or + while is not matched as the beginning of a do/end code block; also + highlight the optional ':' for these loop constructs. + +2003-08-28 Doug Kearns + + * syntax/ruby.vim: add folding support to embedded data sections after + an __END__ directive. + +2003-08-27 Doug Kearns + + * syntax/ruby.vim: don't allow '<<' after '.' or '::' to match as the + beginning of a heredoc. + +2003-08-26 Doug Kearns + + * syntax/ruby.vim: fix shebang highlighting which was being ignored + all together. + +2003-08-25 Doug Kearns + + * syntax/ruby.vim: add the new %W() word list literal with + interpolation; add folding to %q() single quoted strings and %w() word + list literals. + +2003-08-24 Doug Kearns + + * syntax/ruby.vim: add $deferr to rubyPredefinedVariable; add several + new methods (abort, at_exit, attr, attr_accessor, attr_reader, + attr_writer, autoload, callcc, caller, exit, extend, fork, eval, + class_eval, instance_eval, module_eval, private, protected, public, + trap) to the Special Methods section. + +2003-08-21 Doug Kearns + + * syntax/ruby.vim: add access control methods (public, protected and + private) to a new rubyAccess syntax group. + +2003-08-21 Doug Kearns + + * syntax/ruby.vim: no longer match NotImplementError as a predefined + global constant; move rubyTodo to the Comments and Documentation + section; create a Special Methods section and add the + ruby_no_special_methods variable to allow the highlighting of these + 'special' methods to be disabled. + +2003-08-18 Doug Kearns + + * compiler/ruby.vim, ftplugin/ruby.vim, indent/ruby.vim, + syntax/ruby.vim: retab the header section - Bram prefers as many TAB + characters as possible. + +2003-08-18 Doug Kearns + + * syntax/ruby.vim: allow for, while and until loop bodies to contain + do...end and {...} blocks - rubyOptDoBlock should contain rubyDoBlock + and rubyCurlyBlock. + +2003-08-16 Doug Kearns + + * syntax/ruby.vim: string expression substitution of class variables + does not require braces. + diff --git a/sources_non_forked/vim-ruby/FAQ b/sources_non_forked/vim-ruby/FAQ new file mode 100644 index 00000000..2776d614 --- /dev/null +++ b/sources_non_forked/vim-ruby/FAQ @@ -0,0 +1,251 @@ +*vim-ruby.txt* *vim-ruby* *vim-ruby-faq* + + VIM/RUBY CONFIGURATION FILES + + The vim-ruby Project FAQ + + https://github.com/vim-ruby/vim-ruby + +The vim-ruby project maintains Ruby-related configuration files for Vim. This +FAQ contains all you need to know about it. + +*** TOC *** + +============================================================================== + +*vim-ruby-faq-X* What is the vim-ruby project? + +It maintains all the configuration files that help Vim edit Ruby code. By +installing these files, Vim will properly highlight and indent Ruby files, and +will be able to run them and go directly to the location of any errors. +Rakefiles, ERB files, and unit tests are also identified and supported. + +If you make use of this project, make sure you read the installation and +configuration instructions in this FAQ. + + +*vim-ruby-faq-X* Doesn't Vim include these files? + +Yes it does. You should only want to download and install this project if it +has changed since you last installed your version of Vim. Read the "News" +section of the |vim-ruby-homepage| to see when the most recent release was +made. + + +*vim-ruby-faq-X* How do you get it? + +The easiest way is to run: > + + gem install vim-ruby + +(This really only downloads it. See installation instructions +|vim-ruby-install| below.) + +If you don't have RubyGems, download a tarball from: > + + https://github.com/vim-ruby/vim-ruby/downloads + +Again, see installation instructions below. + + +*vim-ruby-faq-X* How do you install it? *vim-ruby-install* + +If you obtained the vim-ruby files via RubyGems, run: > + + vim-ruby-install.rb + +If you downloaded a tarball, unpack it, change to the created directory, and +run: > + + ruby bin/vim-ruby-install.rb + +Whichever way you run it, the effect is the same. The installer will: + - Search for a Vim config directory to put its files and ask you to confirm. + - Copy the configuration files to the appropriate places underneath the + directory you selected. + +Here is an example installation transcript: + + Possible Vim installation directories: ~ + 1) D:/Gavin/vimfiles ~ + 2) E:/Vim/vimfiles ~ + ~ + Please select one (or anything else to specify another directory): 2 ~ + autoload/rubycomplete.vim -> E:/Vim/vimfiles/autoload/rubycomplete.vim ~ + compiler/eruby.vim -> E:/Vim/vimfiles/compiler/eruby.vim ~ + compiler/ruby.vim -> E:/Vim/vimfiles/compiler/ruby.vim ~ + compiler/rubyunit.vim -> E:/Vim/vimfiles/compiler/rubyunit.vim ~ + ftdetect/ruby.vim -> E:/Vim/vimfiles/ftdetect/ruby.vim ~ + ftplugin/eruby.vim -> E:/Vim/vimfiles/ftplugin/eruby.vim ~ + ftplugin/ruby.vim -> E:/Vim/vimfiles/ftplugin/ruby.vim ~ + indent/eruby.vim -> E:/Vim/vimfiles/indent/eruby.vim ~ + indent/ruby.vim -> E:/Vim/vimfiles/indent/ruby.vim ~ + syntax/eruby.vim -> E:/Vim/vimfiles/syntax/eruby.vim ~ + syntax/ruby.vim -> E:/Vim/vimfiles/syntax/ruby.vim ~ + +Existing files are overwritten. This is safe, because it's a slow-maturing +project, so new files are better than old ones. However, if you had edited the +files, you will have lost your changes. Better make your changes in, for +instance: + + ~/.vim/after/ftplugin/ruby.vim ~ + +This file will be loaded _after_ the regular config files are loaded, so your +customisations will definitely take effect. + + +*vim-ruby-faq-X* What Vim config do I need? *vim-ruby-config* + +Without the following lines in your .vimrc, _vimrc, or other startup file, the +files in the vim-ruby project will be largely useless. > + + set nocompatible " We're running Vim, not Vi! + syntax on " Enable syntax highlighting + filetype on " Enable filetype detection + filetype indent on " Enable filetype-specific indenting + filetype plugin on " Enable filetype-specific plugins + compiler ruby " Enable compiler support for ruby + +See |.vimrc| for more information about this important Vim configuration file. + +See |matchit-install| for instructions on installing "matchit", which will +allow you to use |%| to bounce between Ruby keywords (class, def, while, ...) +and their respective "end" keywords. + + +*vim-ruby-faq-X* How do I know that everything's working? + +If you've run the installer and added the configuration |vim-ruby-config| +above, everything should be fine when you restart Vim. To test this: + - Edit a Ruby file with Vim (make sure it has a .rb extension). + - The code should be syntax highlighted. + - Type in some code. When you start a new line, it should be automatically + indented to the correct spot. + - Add or remove some space from the beginning of a line of code and hit ==. + That line should be reindented. + - Put the cursor on a "class" or "def" keyword and hit %. The cursor should + now be on the matching "end" keyword. + - TODO: what else? + + +*vim-ruby-faq-X* How do I use it? + +TODO: write. + + +*vim-ruby-faq-X* How do I customise it? *vim-ruby-customize* + +The most important customisation for editing Ruby code is the amount of space to +indent. The following is a typical setup. Look up the various options to read +about them. > + + set expandtab + set tabstop=2 shiftwidth=2 softtabstop=2 + set autoindent + +TODO: is autoindent necessary? What other options should go here? What about +Ruby comments? +FIXME: Autoindent is good. maybe mention |i_CTRL_D| and |i_CTRL_T| for +moving lines about in this context? +COMMENT: I never use ^D and ^T in insert mode, though I always knew what they +do. Might try them! + + +*vim-ruby-faq-X* I want feature X. Will you include it? + +The idea of the vim-ruby project is to maintain configuration files that are +actually distributed with Vim. Therefore all functionality should be helpful to +all Vim/Ruby users. So the project does not deal with people's individual +tastes. + +That said, we are considering creating a separate configuration file for less +universal features, whose features users can pick and choose. So don't hesitate +to send us your suggestions. + + +*vim-ruby-faq-X* What are some other cool Ruby-related Vim tricks I can use? + +An example is the following (put it in ~/.vimrc/ftplugin/ruby_extra.vim or +similar): [similar? |$VIMRUNTIME| or what?] > + + if !exists( "*EndToken" ) + function EndToken() + let current_line = getline( '.' ) + let braces_at_end = '{\s*\(|\(,\|\s\|\w\)*|\s*\)\?$' + if match( current_line, braces_at_end ) >= 0 + return '}' + else + return 'end' + endif + endfunction + endif + + imap :execute 'normal o' . EndToken()O + +This will help you create ruby blocks of code, by inserting "}" or "end" as +appropriate. Try creating these lines of code and hitting SHIFT-ENTER: + + array.map { |elem| ~ + + def fibonacci(n) ~ + +For other suggestions, search the web or look at: > + + https://github.com/vim-ruby/vim-ruby/wiki/VimRubySupport + + +*vim-ruby-faq-X* How can I report a bug? *vim-ruby-bug-reporting* + +Bug reports are most welcome. In order of preference: + - submit a bug at https://github.com/vim-ruby/vim-ruby/issues + - send an email to the mailing list (see below) + - email the maintainer (email address appears in each configuration file) + + + *vim-ruby-list* +*vim-ruby-faq-X* Does the project have a mailing list? + +Yes: vim-ruby-devel@rubyforge.org. Only subscribers can post. To join, visit: +> + http://rubyforge.org/mailman/listinfo/vim-ruby-devel + +The list is mirrored at: > + + http://news.gmane.org/gmane.comp.editors.vim.vim%2druby.devel + + +*vim-ruby-faq-X* Why is this project separate from Vim? + +We can't use Vim's CVS to keep track of these files, so we organise it ourselves +and give Bram the latest files in time for each release of Vim. By keeping the +Ruby stuff together, we can release it all at once and people can update it +independently of Vim. + + +*vim-ruby-faq-X* I have another question... + +The mailing list or the file maintainer is a good place to ask. Or perhaps +comp.lang.ruby, but please make sure you've read the FAQ thoroughly before +asking there. + + +*vim-ruby-faq-X* Can you repeat all the web pages listed in this FAQ? + +Homepage *vim-ruby-homepage* : > + https://github.com/vim-ruby/vim-ruby/ + +Bug tracker: > + https://github.com/vim-ruby/vim-ruby/issues + +Relevant Wiki page: > + https://github.com/vim-ruby/vim-ruby/wiki + +Mailing list archives: > + http://news.gmane.org/gmane.comp.editors.vim.vim%2druby.devel + http://rubyforge.org/pipermail/vim-ruby-devel/ + +Mailing list join: > + http://rubyforge.org/mailman/listinfo/vim-ruby-devel + + +vim: ft=help tw=78 noet : diff --git a/sources_non_forked/vim-ruby/Gemfile b/sources_non_forked/vim-ruby/Gemfile new file mode 100644 index 00000000..c543a5dd --- /dev/null +++ b/sources_non_forked/vim-ruby/Gemfile @@ -0,0 +1,4 @@ +source 'http://rubygems.org' + +gem 'rspec' +gem 'vimrunner' diff --git a/sources_non_forked/vim-ruby/Gemfile.lock b/sources_non_forked/vim-ruby/Gemfile.lock new file mode 100644 index 00000000..66a9ec64 --- /dev/null +++ b/sources_non_forked/vim-ruby/Gemfile.lock @@ -0,0 +1,20 @@ +GEM + remote: http://rubygems.org/ + specs: + diff-lcs (1.1.3) + rspec (2.11.0) + rspec-core (~> 2.11.0) + rspec-expectations (~> 2.11.0) + rspec-mocks (~> 2.11.0) + rspec-core (2.11.1) + rspec-expectations (2.11.2) + diff-lcs (~> 1.1.3) + rspec-mocks (2.11.2) + vimrunner (0.1.1) + +PLATFORMS + ruby + +DEPENDENCIES + rspec + vimrunner diff --git a/sources_non_forked/vim-ruby/INSTALL.markdown b/sources_non_forked/vim-ruby/INSTALL.markdown new file mode 100644 index 00000000..29ba3fb1 --- /dev/null +++ b/sources_non_forked/vim-ruby/INSTALL.markdown @@ -0,0 +1,36 @@ +Installation +============ + +In general, your favorite method works. Here are some options. + +With pathogen.vim +----------------- + +Install [pathogen.vim](https://github.com/tpope/vim-pathogen), +then copy and paste: + + git clone git://github.com/vim-ruby/vim-ruby.git ~/.vim/bundle/vim-ruby + +With Vundle +----------- + +Install [Vundle](https://github.com/gmarik/vundle), then add the +following to your vimrc: + + Bundle 'vim-ruby/vim-ruby' + +With patience +------------- + +Wait for an upgrade to Vim and install it. Vim ships with the latest +version of vim-ruby at the time of its release. (Remember this when +choosing another installation method. The version you download will +supersede the version that ships with Vim, so you will now be +responsible for keeping it up-to-date.) + +Manually +-------- + +[Download](https://github.com/vim-ruby/vim-ruby/archives/master) and +extract an archive, and run `bin/vim-ruby-install.rb` to copy the +relevant files to `~/.vim`. diff --git a/sources_non_forked/vim-ruby/NEWS b/sources_non_forked/vim-ruby/NEWS new file mode 100644 index 00000000..388dffe7 --- /dev/null +++ b/sources_non_forked/vim-ruby/NEWS @@ -0,0 +1,243 @@ +This file is no longer maintained. Consult the Git log for newer changes. + += 2008.07.XX + +== Filetype Detection + +The IRB RC file (.irbrc) is now detected as being a Ruby file. + + += 2007.05.07 + +== Ruby Syntax Highlighting + +Highlight OPTIMIZE alongside FIXME and TODO. + +Multiline array literals can now be folded. + +== Ruby Filetype Support + +Added mappings for [[, ]], [], ][, [m, ]m, [M, and ]M. The first four bounce +between class and module declarations, and the last four between method +declarations. + +== eRuby Syntax Highlighting + +Tim Pope has taken over maintenance of the eRuby syntax file. The subtype of +the file is now determined dynamically from the filename, rather than being +hardwired to HTML. It can be overridden with b:eruby_subtype. + +== eRuby Filetype Support + +Tim Pope has taken over maintenance of the eRuby filetype plugin. Like with +the syntax file, the subtype is now determined dynamically. + +== eRuby Indenting + +As with the syntax file and filetype plugin, the subtype is now determined +dynamically. + +== Bug Fixes + +Ruby syntax file + - when ruby_operators is set, highlight scope and range operators, and don't + match '>' in =>' + - regexp literals are highlighted after the 'else' keyword + - don't match [!=?] as part of a sigil prefixed symbol name + - allow text to appear after, and on the same line, as '=begin' in + rubyDocumentation regions + - highlight %s() ans a symbol, not a string + - eliminated some false positves for here docs, symbols, ASCII codes, and + conditionals as statement modifiers + - added "neus" to regexp flags + - Highlight punctuation variables in string interpolation, and flag invalid + ones as errors + - removed : from rubyOptionalDoLine (falsely matches on symbols) + +Ruby filetype plugin + - eliminated some false positives with the matchit patterns + +Ruby indent plugin + - ignore instance, class, and global variables named "end" + + += 2007.03.02 + +== Omni Completion + +Fall back to syntax highlighting completion if Vim lacks the Ruby interface. + +RubyGems is now loaded by default if available. + +Classes are detected using ObjectSpace. Kernel methods are included in method +completion. + +Added completion in Rails views. Rails helpers are included. Rails migrations +now have completion. + +== Ruby Syntax Highlighting + +Ruby code is highlighted inside interpolation regions. + +Symbols are now highlighted with the Constant highlight group; Constants and +class names with the Type highlight group. + +Symbol names specified with a string recognise interpolation and escape +sequences. + +Alias statements receive special highlighting similar to other 'definitions'. + +== Ruby Filetype Support + +Matchit support has been improved to include (), {}, and [] in the list of +patterns so that these will be appropriately skipped when included in comments. + +ri has been added as the 'keywordprg' and 'balloonexpr' is set to return the +output of ri. + +== eRuby Indenting + +Tim Pope has taken over maintenance of the eRuby indent file. Ruby code is now +indented appropriately. + +== Bug Fixes + +Ruby syntax file + - trailing whitespace is no longer included with the def, class, module + keywords. + - escaped interpolation regions should now be ignored in all cases. + - conditional and loop statements are now highlighted correctly in more + locations (where they're used as expressions). + +eRuby syntax file + - '-' trim mode block delimiters are now recognised. + +Omni Completion + - more robustness; failure to parse buffer no longer errors or prevents + completion. + + += 2006.07.11 + +== Omni Completion + +A new omni completion function is now included which offers IntelliSense-like +functionality. See :help ft-ruby-omni for further information. + +Note: This will only work with Vim 7.x, compiled with the Ruby interface +(+ruby), and Ruby 1.8.x + +== Ruby Filetype Support + +Matchit support has been improved to include (), {}, and [] in the list of +patterns meaning these will be appropriately skipped when included in comments. + +== Ruby Syntax Highlighting + +Operators can now be highlighted by defining the Vim global variable +"ruby_operators". + +Multiline comments will now be folded. This can be disabled by defining the +"ruby_no_comment_fold" Vim variable. + +== Filetype Detection + +RJS and RXML templates are now detected as being 'filetype=ruby'. + +== FAQ + +There is a new FAQ document included. This is a work in progress and any +feedback would be appreciated. + +== Bug Fixes + +Ruby syntax file - if/unless modifiers after a method name ending with [?!=] +should now be highlighted correctly. + + += 2005.10.07 + +== Vim 6.4 + +This release is included in Vim 6.4. + +== Bug Fixes + +Ruby filetype plugin - symbols were incorrectly being matched as match_words +causing the matchit motion command to jump to an incorrect location in some +circumstances. + + += 2005.10.05 + +== Bug Fixes + +Ruby syntax file - allow for comments directly after module/class/def lines +without intervening whitespace (fold markers were breaking syntax highlighting). + +Ruby filetype plugin - improve ordering of 'path' elements. + +eRuby syntax file - make use of ruby_no_expensive local to the buffer. + + += 2005.09.24 + +== Filetype Detection + +The eruby filetype is now detected solely based on the file's extension. This +was being overridden by the scripts.vim detection script. + +Note: Only files ending in *.rhtml are detected as filetype eruby since these +are currently assumed to be Ruby embedded in (X)HTML only. Other filetypes +could be supported if requested. + +== eRuby Indent File + +There is a new eRuby indent file which simply sources the HTML indent file for +now. + +== eRuby Compiler Plugin + +This now supports erb as the default 'makeprg'. To use eruby set the +eruby_compiler variable to "eruby" in your .vimrc + +== Test::Unit Compiler Plugin + +This has been improved and should now display messages similar to, though more +detailed than, the GUI test runners. + +== Bug Fixes + +A few minor bugs have been fixed in the Ruby syntax and indent files. + + += 2005.09.15 + +== eRuby Support + +There are new syntax, compiler, and ftplugin files for eRuby. This support is +incomplete and we're keen to hear of any problems or suggestions you may have +to improve it. + +== Ruby Filetype Support + +The Ruby filetype plugin has been improved to include as many useful settings +as possible without intruding too much on an individual user's preferences. +Matchit support has been improved, and the following options are now set to +appropriate values: comments, commentstring, formatoptions, include, +includeexpr, path, and suffixesadd + +== Filetype Detection + +The new ftdetect mechanism of Vim 6.3 is being utilized to enable filetype +detection of eRuby files until this is officially added to the next release of +Vim. + +== Installation Directories + +The installer script now, where possible, automatically determines both the +user and system-wide preferences directory. + +== Bug Fixes + +A large number of bugs have been fixed in the Ruby syntax and indent files. diff --git a/sources_non_forked/vim-ruby/README b/sources_non_forked/vim-ruby/README new file mode 100644 index 00000000..6f1bb2e1 --- /dev/null +++ b/sources_non_forked/vim-ruby/README @@ -0,0 +1,74 @@ + +---------------------------------+ + | vim-ruby github project README | + +---------------------------------+ + +Summary: + This project contains Vim configuration files for editing and compiling Ruby + within Vim. See the project homepage for more details. + +Web links: + Homepage: https://github.com/vim-ruby + Explanation: https://github.com/vim-ruby/vim-ruby/wiki + +For regular users: + - The project page should have two tarballs for download: + - vim-ruby-YYYY.MM.DD.tar.gz (the current stable release) + - vim-ruby-devel-YYYY.MM.DD.tar.gz (cutting-edge features we'd like you + to test) + - Please give feedback through the bug tracking and feature request features + of github. + - Feel free to join discussions on the vim-ruby-devel mailing list: + http://rubyforge.org/mail/?group_id=16 + +For would-be contributors: + - Please get the latest from Git. + - Please join the mailing list and discuss changes, submit patches, etc. + - Thank you very much for taking an interest. + +Contents of the project: + - The autoload, compiler, ftdetect, ftplugin, indent and syntax directories + contain the ruby*.vim files that are to be copied to a location somewhere + in the Vim 'runtimepath'. + - vim-ruby-install.rb performs this copying. + +How you get these files into Vim: + - By downloading the project via a snapshot or Git, you can keep up with + the latest, make changes, and install the files to a Vim directory. + - By downloading one of the tarballs, you can easily install the latest + stable or development version wherever you like on your machine. No + README, no vim-ruby-install.rb, just Vim files. You would typically + install these into either $VIM/vimfiles, for system-wide use, or $HOME/.vim + ($HOME/vimfiles on Windows) for personal use. + - Remember that when you install Vim in the first place, all of these files + are present. The purpose of downloading and installing them from + github is to get the latest version of them. + +Git topics: + - Project was migrated from CVS in August, 2008. + - Files are tagged according to which version of Vim they are released in. + - The project was initiated in July 2003, when the current version of Vim + was 6.2. Thus every file began its life tagged as vim6.2. + - Modifications to the files are made in the expectation that they need to + be tested by interested users. They therefore (probably) don't have a + tag, and are available via "git pull --rebase", or a development snapshot. + - When a modification is considered stable, it is given a tag. + Everything that is stable gets released in vim-ruby-YYY.MM.DD.tar.gz files. + - When a new version of Vim is about to be released, the stable tarball is + contributed to it. After it has been released, the files are tagged + accordingly. + - MORAL OF THE STORY: modifications are committed to the head of the tree; + when they are ready for release into userland, they are tagged "stable". + +Any questions or suggestions? + - If there's something about the project or its concepts that you don't + understand, send an email to the release coordinator, Doug Kearns + (dougkearns at gmail.com). + - To ask about the contents of the configuration files, open a GitHub issue + or ask on the mailing list, as different people maintain the different + files. + +Project gossip: + - While the individual effort to maintain these files has a long history, + this actual project began in late July 2003. + + --= End of Document =-- diff --git a/sources_non_forked/vim-ruby/Rakefile b/sources_non_forked/vim-ruby/Rakefile new file mode 100644 index 00000000..37c6d573 --- /dev/null +++ b/sources_non_forked/vim-ruby/Rakefile @@ -0,0 +1,42 @@ +require 'rubygems' +require 'rake/gempackagetask' + +PACKAGE_NAME = 'vim-ruby' +RELEASE_FILES = FileList[ + 'ChangeLog', 'CONTRIBUTORS', 'FAQ', 'INSTALL', 'NEWS', 'README', 'bin/*.rb', + 'doc/*.txt','{autoload,compiler,ftdetect,ftplugin,indent,syntax}/*.vim' +] +PACKAGE_VERSION = Time.now.gmtime.strftime('%Y.%m.%d') + +desc "Build all the packages" +task :default => :package + + +def gemspec + Gem::Specification.new do |s| + s.name = PACKAGE_NAME + s.version = PACKAGE_VERSION + s.files = RELEASE_FILES.to_a + s.summary = "Ruby configuration files for Vim. Run 'vim-ruby-install.rb' to complete installation." + s.description = s.summary + "\n\nThis package doesn't contain a Ruby library." + s.requirements << 'RubyGems 0.8+' << 'Vim 6.0+' + s.required_ruby_version = '>= 1.8.0' + s.require_path = '.' + s.bindir = 'bin' + s.executables = ['vim-ruby-install.rb'] + s.author = 'Gavin Sinclair et al.' + s.email = 'gsinclair@soyabean.com.au' + s.homepage = 'https://github.com/vim-ruby/vim-ruby' + s.has_rdoc = false + end +end + +Rake::GemPackageTask.new(gemspec) do |t| + t.package_dir = 'etc/package' + t.need_tar = true + t.need_zip = true +end + +# Supporting methods + +# vim: nowrap sw=2 sts=2 ts=8 ff=unix ft=ruby: diff --git a/sources_non_forked/vim-ruby/autoload/rubycomplete.vim b/sources_non_forked/vim-ruby/autoload/rubycomplete.vim new file mode 100644 index 00000000..e1064c8a --- /dev/null +++ b/sources_non_forked/vim-ruby/autoload/rubycomplete.vim @@ -0,0 +1,805 @@ +" Vim completion script +" Language: Ruby +" Maintainer: Mark Guzman +" URL: https://github.com/vim-ruby/vim-ruby +" Release Coordinator: Doug Kearns +" Maintainer Version: 0.8.1 +" ---------------------------------------------------------------------------- +" +" Ruby IRB/Complete author: Keiju ISHITSUKA(keiju@ishitsuka.com) +" ---------------------------------------------------------------------------- + +" {{{ requirement checks + +function! s:ErrMsg(msg) + echohl ErrorMsg + echo a:msg + echohl None +endfunction + +if !has('ruby') + call s:ErrMsg( "Error: Rubycomplete requires vim compiled with +ruby" ) + call s:ErrMsg( "Error: falling back to syntax completion" ) + " lets fall back to syntax completion + setlocal omnifunc=syntaxcomplete#Complete + finish +endif + +if version < 700 + call s:ErrMsg( "Error: Required vim >= 7.0" ) + finish +endif +" }}} requirement checks + +" {{{ configuration failsafe initialization +if !exists("g:rubycomplete_rails") + let g:rubycomplete_rails = 0 +endif + +if !exists("g:rubycomplete_classes_in_global") + let g:rubycomplete_classes_in_global = 0 +endif + +if !exists("g:rubycomplete_buffer_loading") + let g:rubycomplete_buffer_loading = 0 +endif + +if !exists("g:rubycomplete_include_object") + let g:rubycomplete_include_object = 0 +endif + +if !exists("g:rubycomplete_include_objectspace") + let g:rubycomplete_include_objectspace = 0 +endif +" }}} configuration failsafe initialization + +" {{{ vim-side support functions +let s:rubycomplete_debug = 0 + +function! s:dprint(msg) + if s:rubycomplete_debug == 1 + echom a:msg + endif +endfunction + +function! s:GetBufferRubyModule(name, ...) + if a:0 == 1 + let [snum,enum] = s:GetBufferRubyEntity(a:name, "module", a:1) + else + let [snum,enum] = s:GetBufferRubyEntity(a:name, "module") + endif + return snum . '..' . enum +endfunction + +function! s:GetBufferRubyClass(name, ...) + if a:0 >= 1 + let [snum,enum] = s:GetBufferRubyEntity(a:name, "class", a:1) + else + let [snum,enum] = s:GetBufferRubyEntity(a:name, "class") + endif + return snum . '..' . enum +endfunction + +function! s:GetBufferRubySingletonMethods(name) +endfunction + +function! s:GetBufferRubyEntity( name, type, ... ) + let lastpos = getpos(".") + let lastline = lastpos + if (a:0 >= 1) + let lastline = [ 0, a:1, 0, 0 ] + call cursor( a:1, 0 ) + endif + + let stopline = 1 + + let crex = '^\s*\<' . a:type . '\>\s*\<' . a:name . '\>\s*\(<\s*.*\s*\)\?' + let [lnum,lcol] = searchpos( crex, 'w' ) + "let [lnum,lcol] = searchpairpos( crex . '\zs', '', '\(end\|}\)', 'w' ) + + if lnum == 0 && lcol == 0 + call cursor(lastpos[1], lastpos[2]) + return [0,0] + endif + + let curpos = getpos(".") + let [enum,ecol] = searchpairpos( crex, '', '\(end\|}\)', 'wr' ) + call cursor(lastpos[1], lastpos[2]) + + if lnum > enum + return [0,0] + endif + " we found a the class def + return [lnum,enum] +endfunction + +function! s:IsInClassDef() + return s:IsPosInClassDef( line('.') ) +endfunction + +function! s:IsPosInClassDef(pos) + let [snum,enum] = s:GetBufferRubyEntity( '.*', "class" ) + let ret = 'nil' + + if snum < a:pos && a:pos < enum + let ret = snum . '..' . enum + endif + + return ret +endfunction + +function! s:GetRubyVarType(v) + let stopline = 1 + let vtp = '' + let pos = getpos('.') + let sstr = '^\s*#\s*@var\s*'.escape(a:v, '*').'\>\s\+[^ \t]\+\s*$' + let [lnum,lcol] = searchpos(sstr,'nb',stopline) + if lnum != 0 && lcol != 0 + call setpos('.',pos) + let str = getline(lnum) + let vtp = substitute(str,sstr,'\1','') + return vtp + endif + call setpos('.',pos) + let ctors = '\(now\|new\|open\|get_instance' + if exists('g:rubycomplete_rails') && g:rubycomplete_rails == 1 && s:rubycomplete_rails_loaded == 1 + let ctors = ctors.'\|find\|create' + else + endif + let ctors = ctors.'\)' + + let fstr = '=\s*\([^ \t]\+.' . ctors .'\>\|[\[{"''/]\|%[xwQqr][(\[{@]\|[A-Za-z0-9@:\-()\.]\+...\?\|lambda\|&\)' + let sstr = ''.a:v.'\>\s*[+\-*/]*'.fstr + let [lnum,lcol] = searchpos(sstr,'nb',stopline) + if lnum != 0 && lcol != 0 + let str = matchstr(getline(lnum),fstr,lcol) + let str = substitute(str,'^=\s*','','') + + call setpos('.',pos) + if str == '"' || str == '''' || stridx(tolower(str), '%q[') != -1 + return 'String' + elseif str == '[' || stridx(str, '%w[') != -1 + return 'Array' + elseif str == '{' + return 'Hash' + elseif str == '/' || str == '%r{' + return 'Regexp' + elseif strlen(str) >= 4 && stridx(str,'..') != -1 + return 'Range' + elseif stridx(str, 'lambda') != -1 || str == '&' + return 'Proc' + elseif strlen(str) > 4 + let l = stridx(str,'.') + return str[0:l-1] + end + return '' + endif + call setpos('.',pos) + return '' +endfunction + +"}}} vim-side support functions + +"{{{ vim-side completion function +function! rubycomplete#Init() + execute "ruby VimRubyCompletion.preload_rails" +endfunction + +function! rubycomplete#Complete(findstart, base) + "findstart = 1 when we need to get the text length + if a:findstart + let line = getline('.') + let idx = col('.') + while idx > 0 + let idx -= 1 + let c = line[idx-1] + if c =~ '\w' + continue + elseif ! c =~ '\.' + idx = -1 + break + else + break + endif + endwhile + + return idx + "findstart = 0 when we need to return the list of completions + else + let g:rubycomplete_completions = [] + execute "ruby VimRubyCompletion.get_completions('" . a:base . "')" + return g:rubycomplete_completions + endif +endfunction +"}}} vim-side completion function + +"{{{ ruby-side code +function! s:DefRuby() +ruby << RUBYEOF +# {{{ ruby completion + +begin + require 'rubygems' # let's assume this is safe...? +rescue Exception + #ignore? +end +class VimRubyCompletion +# {{{ constants + @@debug = false + @@ReservedWords = [ + "BEGIN", "END", + "alias", "and", + "begin", "break", + "case", "class", + "def", "defined", "do", + "else", "elsif", "end", "ensure", + "false", "for", + "if", "in", + "module", + "next", "nil", "not", + "or", + "redo", "rescue", "retry", "return", + "self", "super", + "then", "true", + "undef", "unless", "until", + "when", "while", + "yield", + ] + + @@Operators = [ "%", "&", "*", "**", "+", "-", "/", + "<", "<<", "<=", "<=>", "==", "===", "=~", ">", ">=", ">>", + "[]", "[]=", "^", ] +# }}} constants + +# {{{ buffer analysis magic + def load_requires + buf = VIM::Buffer.current + enum = buf.line_number + nums = Range.new( 1, enum ) + nums.each do |x| + ln = buf[x] + begin + eval( "require %s" % $1 ) if /.*require\s*(.*)$/.match( ln ) + rescue Exception + #ignore? + end + end + end + + def load_buffer_class(name) + dprint "load_buffer_class(%s) START" % name + classdef = get_buffer_entity(name, 's:GetBufferRubyClass("%s")') + return if classdef == nil + + pare = /^\s*class\s*(.*)\s*<\s*(.*)\s*\n/.match( classdef ) + load_buffer_class( $2 ) if pare != nil && $2 != name # load parent class if needed + + mixre = /.*\n\s*(include|prepend)\s*(.*)\s*\n/.match( classdef ) + load_buffer_module( $2 ) if mixre != nil && $2 != name # load mixins if needed + + begin + eval classdef + rescue Exception + VIM::evaluate( "s:ErrMsg( 'Problem loading class \"%s\", was it already completed?' )" % name ) + end + dprint "load_buffer_class(%s) END" % name + end + + def load_buffer_module(name) + dprint "load_buffer_module(%s) START" % name + classdef = get_buffer_entity(name, 's:GetBufferRubyModule("%s")') + return if classdef == nil + + begin + eval classdef + rescue Exception + VIM::evaluate( "s:ErrMsg( 'Problem loading module \"%s\", was it already completed?' )" % name ) + end + dprint "load_buffer_module(%s) END" % name + end + + def get_buffer_entity(name, vimfun) + loading_allowed = VIM::evaluate("exists('g:rubycomplete_buffer_loading') && g:rubycomplete_buffer_loading") + return nil if loading_allowed.to_i.zero? + return nil if /(\"|\')+/.match( name ) + buf = VIM::Buffer.current + nums = eval( VIM::evaluate( vimfun % name ) ) + return nil if nums == nil + return nil if nums.min == nums.max && nums.min == 0 + + dprint "get_buffer_entity START" + visited = [] + clscnt = 0 + bufname = VIM::Buffer.current.name + classdef = "" + cur_line = VIM::Buffer.current.line_number + while (nums != nil && !(nums.min == 0 && nums.max == 0) ) + dprint "visited: %s" % visited.to_s + break if visited.index( nums ) + visited << nums + + nums.each do |x| + if x != cur_line + next if x == 0 + ln = buf[x] + if /^\s*(module|class|def|include)\s+/.match(ln) + clscnt += 1 if $1 == "class" + #dprint "\$1$1 + classdef += "%s\n" % ln + classdef += "end\n" if /def\s+/.match(ln) + dprint ln + end + end + end + + nm = "%s(::.*)*\", %s, \"" % [ name, nums.last ] + nums = eval( VIM::evaluate( vimfun % nm ) ) + dprint "nm: \"%s\"" % nm + dprint "vimfun: %s" % (vimfun % nm) + dprint "got nums: %s" % nums.to_s + end + if classdef.length > 1 + classdef += "end\n"*clscnt + # classdef = "class %s\n%s\nend\n" % [ bufname.gsub( /\/|\\/, "_" ), classdef ] + end + + dprint "get_buffer_entity END" + dprint "classdef====start" + lns = classdef.split( "\n" ) + lns.each { |x| dprint x } + dprint "classdef====end" + return classdef + end + + def get_var_type( receiver ) + if /(\"|\')+/.match( receiver ) + "String" + else + VIM::evaluate("s:GetRubyVarType('%s')" % receiver) + end + end + + def dprint( txt ) + print txt if @@debug + end + + def escape_vim_singlequote_string(str) + str.to_s.gsub(/'/,"\\'") + end + + def get_buffer_entity_list( type ) + # this will be a little expensive. + loading_allowed = VIM::evaluate("exists('g:rubycomplete_buffer_loading') && g:rubycomplete_buffer_loading") + allow_aggressive_load = VIM::evaluate("exists('g:rubycomplete_classes_in_global') && g:rubycomplete_classes_in_global") + return [] if allow_aggressive_load.to_i.zero? || loading_allowed.to_i.zero? + + buf = VIM::Buffer.current + eob = buf.length + ret = [] + rg = 1..eob + re = eval( "/^\s*%s\s*([A-Za-z0-9_:-]*)(\s*<\s*([A-Za-z0-9_:-]*))?\s*/" % type ) + + rg.each do |x| + if re.match( buf[x] ) + next if type == "def" && eval( VIM::evaluate("s:IsPosInClassDef(%s)" % x) ) != nil + ret.push $1 + end + end + + return ret + end + + def get_buffer_modules + return get_buffer_entity_list( "modules" ) + end + + def get_buffer_methods + return get_buffer_entity_list( "def" ) + end + + def get_buffer_classes + return get_buffer_entity_list( "class" ) + end + + + def load_rails + allow_rails = VIM::evaluate("exists('g:rubycomplete_rails') && g:rubycomplete_rails") + return if allow_rails.to_i.zero? + + buf_path = VIM::evaluate('expand("%:p")') + file_name = VIM::evaluate('expand("%:t")') + vim_dir = VIM::evaluate('getcwd()') + file_dir = buf_path.gsub( file_name, '' ) + file_dir.gsub!( /\\/, "/" ) + vim_dir.gsub!( /\\/, "/" ) + vim_dir << "/" + dirs = [ vim_dir, file_dir ] + sdirs = [ "", "./", "../", "../../", "../../../", "../../../../" ] + rails_base = nil + + dirs.each do |dir| + sdirs.each do |sub| + trail = "%s%s" % [ dir, sub ] + tcfg = "%sconfig" % trail + + if File.exists?( tcfg ) + rails_base = trail + break + end + end + break if rails_base + end + + return if rails_base == nil + $:.push rails_base unless $:.index( rails_base ) + + rails_config = rails_base + "config/" + rails_lib = rails_base + "lib/" + $:.push rails_config unless $:.index( rails_config ) + $:.push rails_lib unless $:.index( rails_lib ) + + bootfile = rails_config + "boot.rb" + envfile = rails_config + "environment.rb" + if File.exists?( bootfile ) && File.exists?( envfile ) + begin + require bootfile + require envfile + begin + require 'console_app' + require 'console_with_helpers' + rescue Exception + dprint "Rails 1.1+ Error %s" % $! + # assume 1.0 + end + #eval( "Rails::Initializer.run" ) #not necessary? + VIM::command('let s:rubycomplete_rails_loaded = 1') + dprint "rails loaded" + rescue Exception + dprint "Rails Error %s" % $! + VIM::evaluate( "s:ErrMsg('Error loading rails environment')" ) + end + end + end + + def get_rails_helpers + allow_rails = VIM::evaluate("exists('g:rubycomplete_rails') && g:rubycomplete_rails") + rails_loaded = VIM::evaluate('s:rubycomplete_rails_loaded') + return [] if allow_rails.to_i.zero? || rails_loaded.to_i.zero? + + buf_path = VIM::evaluate('expand("%:p")') + buf_path.gsub!( /\\/, "/" ) + path_elm = buf_path.split( "/" ) + dprint "buf_path: %s" % buf_path + types = [ "app", "db", "lib", "test", "components", "script" ] + + i = nil + ret = [] + type = nil + types.each do |t| + i = path_elm.index( t ) + break if i + end + type = path_elm[i] + type.downcase! + + dprint "type: %s" % type + case type + when "app" + i += 1 + subtype = path_elm[i] + subtype.downcase! + + dprint "subtype: %s" % subtype + case subtype + when "views" + ret += ActionView::Base.instance_methods + ret += ActionView::Base.methods + when "controllers" + ret += ActionController::Base.instance_methods + ret += ActionController::Base.methods + when "models" + ret += ActiveRecord::Base.instance_methods + ret += ActiveRecord::Base.methods + end + + when "db" + ret += ActiveRecord::ConnectionAdapters::SchemaStatements.instance_methods + ret += ActiveRecord::ConnectionAdapters::SchemaStatements.methods + end + + + return ret + end + + def add_rails_columns( cls ) + allow_rails = VIM::evaluate("exists('g:rubycomplete_rails') && g:rubycomplete_rails") + rails_loaded = VIM::evaluate('s:rubycomplete_rails_loaded') + return [] if allow_rails.to_i.zero? || rails_loaded.to_i.zero? + + begin + eval( "#{cls}.establish_connection" ) + return [] unless eval( "#{cls}.ancestors.include?(ActiveRecord::Base).to_s" ) + col = eval( "#{cls}.column_names" ) + return col if col + rescue + dprint "add_rails_columns err: (cls: %s) %s" % [ cls, $! ] + return [] + end + return [] + end + + def clean_sel(sel, msg) + ret = sel.reject{|x|x.nil?}.uniq + ret = ret.grep(/^#{Regexp.quote(msg)}/) if msg != nil + ret + end + + def get_rails_view_methods + allow_rails = VIM::evaluate("exists('g:rubycomplete_rails') && g:rubycomplete_rails") + rails_loaded = VIM::evaluate('s:rubycomplete_rails_loaded') + return [] if allow_rails.to_i.zero? || rails_loaded.to_i.zero? + + buf_path = VIM::evaluate('expand("%:p")') + buf_path.gsub!( /\\/, "/" ) + pelm = buf_path.split( "/" ) + idx = pelm.index( "views" ) + + return [] unless idx + idx += 1 + + clspl = pelm[idx].camelize.pluralize + cls = clspl.singularize + + ret = [] + begin + ret += eval( "#{cls}.instance_methods" ) + ret += eval( "#{clspl}Helper.instance_methods" ) + rescue Exception + dprint "Error: Unable to load rails view helpers for %s: %s" % [ cls, $! ] + end + + return ret + end +# }}} buffer analysis magic + +# {{{ main completion code + def self.preload_rails + a = VimRubyCompletion.new + require 'Thread' + Thread.new(a) do |b| + begin + b.load_rails + rescue + end + end + a.load_rails + rescue + end + + def self.get_completions(base) + b = VimRubyCompletion.new + b.get_completions base + end + + def get_completions(base) + loading_allowed = VIM::evaluate("exists('g:rubycomplete_buffer_loading') && g:rubycomplete_buffer_loading") + if loading_allowed.to_i == 1 + load_requires + load_rails + end + + input = VIM::Buffer.current.line + cpos = VIM::Window.current.cursor[1] - 1 + input = input[0..cpos] + input += base + input.sub!(/.*[ \t\n\"\\'`><=;|&{(]/, '') # Readline.basic_word_break_characters + input.sub!(/self\./, '') + input.sub!(/.*((\.\.[\[(]?)|([\[(]))/, '') + + dprint 'input %s' % input + message = nil + receiver = nil + methods = [] + variables = [] + classes = [] + constants = [] + + case input + when /^(\/[^\/]*\/)\.([^.]*)$/ # Regexp + receiver = $1 + message = Regexp.quote($2) + methods = Regexp.instance_methods(true) + + when /^([^\]]*\])\.([^.]*)$/ # Array + receiver = $1 + message = Regexp.quote($2) + methods = Array.instance_methods(true) + + when /^([^\}]*\})\.([^.]*)$/ # Proc or Hash + receiver = $1 + message = Regexp.quote($2) + methods = Proc.instance_methods(true) | Hash.instance_methods(true) + + when /^(:[^:.]*)$/ # Symbol + dprint "symbol" + if Symbol.respond_to?(:all_symbols) + receiver = $1 + message = $1.sub( /:/, '' ) + methods = Symbol.all_symbols.collect{|s| s.id2name} + methods.delete_if { |c| c.match( /'/ ) } + end + + when /^::([A-Z][^:\.\(]*)$/ # Absolute Constant or class methods + dprint "const or cls" + receiver = $1 + methods = Object.constants + methods.grep(/^#{receiver}/).collect{|e| "::" + e} + + when /^(((::)?[A-Z][^:.\(]*)+?)::?([^:.]*)$/ # Constant or class methods + receiver = $1 + message = Regexp.quote($4) + dprint "const or cls 2 [recv: \'%s\', msg: \'%s\']" % [ receiver, message ] + load_buffer_class( receiver ) + begin + classes = eval("#{receiver}.constants") + #methods = eval("#{receiver}.methods") + rescue Exception + dprint "exception: %s" % $! + methods = [] + end + methods.grep(/^#{message}/).collect{|e| receiver + "::" + e} + + when /^(:[^:.]+)\.([^.]*)$/ # Symbol + dprint "symbol" + receiver = $1 + message = Regexp.quote($2) + methods = Symbol.instance_methods(true) + + when /^([0-9_]+(\.[0-9_]+)?(e[0-9]+)?)\.([^.]*)$/ # Numeric + dprint "numeric" + receiver = $1 + message = Regexp.quote($4) + begin + methods = eval(receiver).methods + rescue Exception + methods = [] + end + + when /^(\$[^.]*)$/ #global + dprint "global" + methods = global_variables.grep(Regexp.new(Regexp.quote($1))) + + when /^((\.?[^.]+)+?)\.([^.]*)$/ # variable + dprint "variable" + receiver = $1 + message = Regexp.quote($3) + load_buffer_class( receiver ) + + cv = eval("self.class.constants") + vartype = get_var_type( receiver ) + dprint "vartype: %s" % vartype + if vartype != '' + load_buffer_class( vartype ) + + begin + methods = eval("#{vartype}.instance_methods") + variables = eval("#{vartype}.instance_variables") + rescue Exception + dprint "load_buffer_class err: %s" % $! + end + elsif (cv).include?(receiver) + # foo.func and foo is local var. + methods = eval("#{receiver}.methods") + vartype = receiver + elsif /^[A-Z]/ =~ receiver and /\./ !~ receiver + vartype = receiver + # Foo::Bar.func + begin + methods = eval("#{receiver}.methods") + rescue Exception + end + else + # func1.func2 + ObjectSpace.each_object(Module){|m| + next if m.name != "IRB::Context" and + /^(IRB|SLex|RubyLex|RubyToken)/ =~ m.name + methods.concat m.instance_methods(false) + } + end + variables += add_rails_columns( "#{vartype}" ) if vartype && vartype.length > 0 + + when /^\(?\s*[A-Za-z0-9:^@.%\/+*\(\)]+\.\.\.?[A-Za-z0-9:^@.%\/+*\(\)]+\s*\)?\.([^.]*)/ + message = $1 + methods = Range.instance_methods(true) + + when /^\.([^.]*)$/ # unknown(maybe String) + message = Regexp.quote($1) + methods = String.instance_methods(true) + + else + dprint "default/other" + inclass = eval( VIM::evaluate("s:IsInClassDef()") ) + + if inclass != nil + dprint "inclass" + classdef = "%s\n" % VIM::Buffer.current[ inclass.min ] + found = /^\s*class\s*([A-Za-z0-9_-]*)(\s*<\s*([A-Za-z0-9_:-]*))?\s*\n$/.match( classdef ) + + if found != nil + receiver = $1 + message = input + load_buffer_class( receiver ) + begin + methods = eval( "#{receiver}.instance_methods" ) + variables += add_rails_columns( "#{receiver}" ) + rescue Exception + found = nil + end + end + end + + if inclass == nil || found == nil + dprint "inclass == nil" + methods = get_buffer_methods + methods += get_rails_view_methods + + cls_const = Class.constants + constants = cls_const.select { |c| /^[A-Z_-]+$/.match( c ) } + classes = eval("self.class.constants") - constants + classes += get_buffer_classes + classes += get_buffer_modules + + include_objectspace = VIM::evaluate("exists('g:rubycomplete_include_objectspace') && g:rubycomplete_include_objectspace") + ObjectSpace.each_object(Class) { |cls| classes << cls.to_s } if include_objectspace == "1" + message = receiver = input + end + + methods += get_rails_helpers + methods += Kernel.public_methods + end + + + include_object = VIM::evaluate("exists('g:rubycomplete_include_object') && g:rubycomplete_include_object") + methods = clean_sel( methods, message ) + methods = (methods-Object.instance_methods) if include_object == "0" + rbcmeth = (VimRubyCompletion.instance_methods-Object.instance_methods) # lets remove those rubycomplete methods + methods = (methods-rbcmeth) + + variables = clean_sel( variables, message ) + classes = clean_sel( classes, message ) - ["VimRubyCompletion"] + constants = clean_sel( constants, message ) + + valid = [] + valid += methods.collect { |m| { :name => m.to_s, :type => 'm' } } + valid += variables.collect { |v| { :name => v.to_s, :type => 'v' } } + valid += classes.collect { |c| { :name => c.to_s, :type => 't' } } + valid += constants.collect { |d| { :name => d.to_s, :type => 'd' } } + valid.sort! { |x,y| x[:name] <=> y[:name] } + + outp = "" + + rg = 0..valid.length + rg.step(150) do |x| + stpos = 0+x + enpos = 150+x + valid[stpos..enpos].each { |c| outp += "{'word':'%s','item':'%s','kind':'%s'}," % [ c[:name], c[:name], c[:type] ].map{|x|escape_vim_singlequote_string(x)} } + outp.sub!(/,$/, '') + + VIM::command("call extend(g:rubycomplete_completions, [%s])" % outp) + outp = "" + end + end +# }}} main completion code + +end # VimRubyCompletion +# }}} ruby completion +RUBYEOF +endfunction + +let s:rubycomplete_rails_loaded = 0 + +call s:DefRuby() +"}}} ruby-side code + + +" vim:tw=78:sw=4:ts=8:et:fdm=marker:ft=vim:norl: diff --git a/sources_non_forked/vim-ruby/bin/vim-ruby-install.rb b/sources_non_forked/vim-ruby/bin/vim-ruby-install.rb new file mode 100755 index 00000000..10a15dd5 --- /dev/null +++ b/sources_non_forked/vim-ruby/bin/vim-ruby-install.rb @@ -0,0 +1,455 @@ +#!/usr/bin/env ruby + +# vim-ruby-install: install the Vim config files for Ruby editing +# +# * scope out the target directory and get user to confirm +# * if no directory found, ask user +# * allow user to force a search for a Windows gvim installation +# * find source files from gem or from top level directory +# * copy to target directory, taking account of +# * line endings (NL for Unix-ish; CRLF for Windows) +# * permissions (755 for directories; 644 for files) +# + +require 'rbconfig' +include RbConfig +require 'fileutils' +require 'optparse' +require 'pathname' + +SOURCE_FILES = %w{ + autoload/rubycomplete.vim + compiler/eruby.vim + compiler/rspec.vim + compiler/ruby.vim + compiler/rubyunit.vim + ftdetect/ruby.vim + ftplugin/eruby.vim + ftplugin/ruby.vim + indent/eruby.vim + indent/ruby.vim + syntax/eruby.vim + syntax/ruby.vim +} + +# +# Miscellaneous functions in the user's environment. +# +class Env + # + # Returns :UNIX or :WINDOWS, according to CONFIG['host_os'] and $options[:windows]. + # + def Env.determine_target_os + os = CONFIG['host_os'] + if os =~ /mswin/ or $options[:windows] + return :WINDOWS + else + return :UNIX + end + end + + # + # Returns the path to the directory where the vim configuration files will be copied from. + # The first preference is the directory above this script. If that fails, we look for the + # RubyGems package 'vim-ruby'. Failing that, we return +nil+. + # + def Env.determine_source_directory + # 1. Try the directory above this installation script. + vim_ruby_source_dir = File.expand_path(File.join(File.dirname($0), '..')) + return vim_ruby_source_dir if _valid_vim_ruby_dir(vim_ruby_source_dir) + # 2. Try the gem 'vim-ruby'. + begin + require 'rubygems' + raise "Need RubyGems 0.8+" if Gem::RubyGemsPackageVersion < '0.8' + rescue LoadError + return nil + end + #vim_ruby_gem_dir = Gem.latest_load_paths.grep(%r{gems/vim-ruby-\d{4}\.\d{2}\.\d{2}}).last + vim_ruby_gem_dir = Gem.all_load_paths.grep(%r{gems/vim-ruby-\d{4}\.\d{2}\.\d{2}}).sort.last + if vim_ruby_gem_dir and _valid_vim_ruby_dir(vim_ruby_gem_dir) + return vim_ruby_gem_dir + end + return nil + end + + # Returns the Vim installation directory ($VIM). + # TODO: print warning if vim command not in PATH or appropriate key not in registry? + def Env.determine_vim_dir + installation_dir = ENV['VIM'] || + case Env.determine_target_os + when :UNIX + IO.popen('vim --version 2>/dev/null') do |version| + dir = version.read[/fall-back for \$VIM: "(.*)"/, 1] + end + when :WINDOWS + begin + require 'win32/registry' + Win32::Registry::HKEY_LOCAL_MACHINE.open('SOFTWARE\Vim\Gvim') do |reg| + path = reg['path', Win32::Registry::REG_SZ] + dir = path.sub(/\\vim\d\d\\gvim.exe/i, '') + end + rescue Win32::Registry::Error + nil + end + end + return installation_dir + end + + def Env.determine_home_dir + home_dir = ENV['HOME'] || + case Env.determine_target_os + when :WINDOWS + ENV['HOMEDRIVE'] + ENV['HOMEPATH'] if ENV['HOMEDRIVE'] and ENV['HOMEPATH'] + end + return home_dir + end + + def Env.ask_user(message) + print message + gets.strip + end + + private_class_method + + def Env._valid_vim_ruby_dir(dir) + Dir.chdir(dir) do + return SOURCE_FILES.all? { |path| FileTest.file?(path) } + end + end + +end # class Env + + +# +# A FileWriter writes files with pre-selected line endings and permissions. +# +# writer = FileWriter.new(:UNIX, 0664) +# writer.copy(source, target) +# +class FileWriter + LINE_ENDINGS = { :UNIX => "\n", :WINDOWS => "\r\n" } + + def initialize(ending, file_permissions=0644, directory_permissions=0755) + @ending = LINE_ENDINGS[ending] or raise "No/invalid line ending given: #{ending}" + @permissions = { + :file => file_permissions, + :dir => directory_permissions + } + end + + # Source and target paths assumed to be Pathname objects. Copy the source to the target, + # ensuring the right line endings. + def copy(source_path, target_path) + _ensure_directory_exists(target_path) + target_path.open('wb', @permissions[:file]) do |io| + lines = source_path.read.split("\n") + lines.each do |line| + io.write(line.chomp + @ending) + end + end + puts "#{source_path.to_s.ljust(25)} -> #{target_path}" + end + + # Create the given directory with the correct directory permissions. + def mkpath(directory) + FileUtils.mkdir_p(directory.to_s, :mode => @permissions[:dir], :verbose => true) + end + + def _ensure_directory_exists(path) + dir = path.dirname + unless dir.directory? + # FileUtils.mkdir_p already checks if it exists and is a + # directory. What if it exists as a file? (HGS) + mkpath(dir) + end + end +end # class FileWriter + +# +# Represents the target base directory for installs. Handles writing the files through a +# given FileWriter. +# +class TargetDirectory + def self.finder + TargetDirectory::Finder.new + end + + def initialize(directory, writer) + @directory = Pathname.new(directory) + @writer = writer # FileWriter + end + + # Copies the given relative path from the current directory to the target. + def copy(path) + source_path = Pathname.new(path) + target_path = @directory + path + @writer.copy(source_path, target_path) + end + + def [](path) + @directory + path + end + + def path + @directory + end +end # class TargetDirectory + +# +# Represents the target directory. Can find candidates, based on the operating system and +# user options; but is ultimately created with one in mind. +# +class TargetDirectory::Finder + # Guides the user through a selection process, ending in a chosen directory. + def find_target_directory + # 1. Was a directory specified using the --directory option? + if option_dir = $options[:target_dir] + return option_dir + end + # 2. Try the potentials (if there are any). + if dirs = _potential_directories and not dirs.empty? + puts + puts "Possible Vim installation directories:" + dirs.each_with_index do |dir, idx| + puts " #{idx+1}) #{dir}" + end + puts + r = Env.ask_user "Please select one (or anything else to specify another directory): " + if (1..dirs.size).include? r.to_i + chosen_directory = dirs[r.to_i - 1] + return chosen_directory + end + end + # 3. We didn't find any, or the user wants to enter another. + if dirs.empty? + puts + puts "Couldn't find any Vim installation directories." + end + entered_directory = Env.ask_user "Please enter the full path to your Vim installation directory: " + entered_directory = File.expand_path(entered_directory) + return entered_directory + end + + private + + # Return an array of _potential_ directories (i.e. they exist). Take the options into + # account. + def _potential_directories + dirs = [] + dirs << _vim_user_dir + dirs << _vim_system_dir + return dirs.compact.map { |dir| File.expand_path(dir) } + end + + # Return the Vim system preferences directory + def _vim_system_dir + vim_dir = Env.determine_vim_dir + system_dir = vim_dir + "/vimfiles" if vim_dir + return system_dir + end + + # Return the Vim user preferences directory + def _vim_user_dir + platform_dir = { :UNIX => "/.vim", :WINDOWS => "/vimfiles" } + home_dir = Env.determine_home_dir + user_dir = home_dir + platform_dir[Env.determine_target_os] if home_dir + return user_dir + end +end # class TargetDirectory::Finder + +# +# VimRubyInstaller is the class that copies the files from the source directory to the target +# directory, both of which are provided. +# +class VimRubyInstaller + # +source+ and +target+ are the base directories from and to which the configuration files + # will be copied. Both are strings. + def initialize(source, target) + unless FileTest.directory?(source) + raise "Automatically determined source directory ('#{source}') doesn't exist" + end + unless FileTest.directory?(target) + raise "Chosen target directory ('#{target}') doesn't exist" + end + @source_dir = source + file_writer = FileWriter.new(Env.determine_target_os) + @target_dir = TargetDirectory.new(target, file_writer) + end + + # Since we know the source and target directories, all we have to do is copy the files + # across. If the --backup option was specified or the target file is + # _newer_ than the source file, we make a backup of it and report that to + # the user. + def install + backupdir = BackupDir.new("./vim-ruby-backup.#{Process.pid}") + Dir.chdir(@source_dir) do + SOURCE_FILES.each do |path| + source_path = Pathname.new(path) + target_path = @target_dir[path] + # FIXME: Backup everything for now + if $options[:backup] and target_path.file? + backupdir.backup(@target_dir, path) + elsif target_path.file? and target_path.mtime > source_path.mtime + # We're going to overwrite a newer file; back it up, unless they're the same. + unless _same_contents?(target_path, source_path) + backupdir.backup(@target_dir, path) + end + end + @target_dir.copy(path) + end + end + backups = backupdir.contents + unless backups.empty? + puts + puts "The following backups were made:" + backups.each do |path| + puts " * #{path}" + end + puts + puts "These backups are located in this directory: #{backupdir.path}" + end + end + + private + + # Test two files for equality of contents, ignoring line endings. + def _same_contents?(p1, p2) + contents1 = p1.read.split("\n").map { |line| line.chomp } + contents2 = p2.read.split("\n").map { |line| line.chomp } + contents1 == contents2 + end + + # A directory for holding backups of configuration files. + class BackupDir + def initialize(path) + @base = Pathname.new(path).expand_path + end + + # Copy basedir/path to @path/path. + def backup(basedir, path) + @base.mkpath unless @base.directory? + source = basedir.path + path + target = @base + path + target.dirname.mkpath + FileUtils.cp(source.to_s, target.dirname.to_s, :verbose => true) + end + + def [](path) + @base + path + end + + def contents + return [] unless @base.directory? + results = [] + Dir.chdir(@base) do + Pathname.new('.').find do |path| + results << path if path.file? + end + end + results + end + + def path + @base + end + end # class VimRubyInstaller::BackupDir +end # class VimRubyInstaller + +# +# * * * M A I N * * * +# + +begin + $options = { + :backup => false, + :target_dir => nil, + :windows => false + } + + op = OptionParser.new do |p| + p.banner = %{ + vim-ruby-install.rb: Install the vim-ruby configuration files + + About: + * Detects the Vim user and system-wide preferences directories + * User to confirm before proceeding + * User may specify other directory + * Takes config files from current directory or from vim-ruby gem + * Writes files with correct permissions and line endings + + Usage: + direct: ruby bin/vim-ruby-install.rb [options] + gem: vim-ruby-install.rb [options] + + Options: + }.gsub(/^ /, '') + p.on('-b', '--backup', 'Backup existing runtime files') do |value| + $options[:backup] = value + end + p.on('-d DIR', '--directory', 'Install into given directory') do |dir| + $options[:target_dir] = dir + end + p.on('-w', '--windows', 'Install into Windows directories') do |value| + $options[:windows] = value + end + p.on('-h', '--help', 'Show this message') do + puts p + exit + end + p.on_tail %{ + Notes: + + * "Direct" usage means unpacking a vim-ruby tarball and running this + program from the vim-ruby directory. + + * The convenient alternative is to use RubyGems: + gem install vim-ruby + vim-ruby-install.rb + + * The --windows option is designed for forcing an install into the + Windows (gvim) configuration directory; useful when running from + Cygwin or MinGW. + + * This installer is quite new (2004-09-20). Please report bugs to + gsinclair@soyabean.com.au. + }.gsub(/^ /, '') + end + op.parse!(ARGV) + + if not ARGV.empty? + raise "invalid argument: #{ARGV[0]}" + end + + source_dir = Env.determine_source_directory + if source_dir.nil? + raise "Can't find source directory." + end + + target_dir = TargetDirectory.finder.find_target_directory + if not File.directory?(target_dir) + puts + puts "Target directory '#{target_dir}' does not exist." + response = Env.ask_user "Do you want to create it? [Yn] " + response = "y" if response.empty? + if response.strip =~ /^y(es)?$/i + FileUtils.mkdir_p(target_dir, :verbose => true) + else + puts + puts "Installation aborted." + exit + end + end + + VimRubyInstaller.new(source_dir, target_dir).install + +rescue + + raise if $DEBUG + $stderr.puts + $stderr.puts $!.message + $stderr.puts "Try 'ruby #{$0} --help' for detailed usage." + exit 1 + +end + +# vim: nowrap sw=2 sts=2 ts=8 ff=unix ft=ruby: diff --git a/sources_non_forked/vim-ruby/compiler/eruby.vim b/sources_non_forked/vim-ruby/compiler/eruby.vim new file mode 100644 index 00000000..45ad5eea --- /dev/null +++ b/sources_non_forked/vim-ruby/compiler/eruby.vim @@ -0,0 +1,39 @@ +" Vim compiler file +" Language: eRuby +" Maintainer: Doug Kearns +" URL: https://github.com/vim-ruby/vim-ruby +" Release Coordinator: Doug Kearns + +if exists("current_compiler") + finish +endif +let current_compiler = "eruby" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal +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%\tfrom\ %f:%l:in\ %.%#, + \%-Z%\tfrom\ %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/sources_non_forked/vim-ruby/compiler/rake.vim b/sources_non_forked/vim-ruby/compiler/rake.vim new file mode 100644 index 00000000..3bd9da0d --- /dev/null +++ b/sources_non_forked/vim-ruby/compiler/rake.vim @@ -0,0 +1,35 @@ +" Vim compiler file +" Language: Rake +" Maintainer: Tim Pope +" URL: https://github.com/vim-ruby/vim-ruby +" Release Coordinator: Doug Kearns + +if exists("current_compiler") + finish +endif +let current_compiler = "rake" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal +endif + +let s:cpo_save = &cpo +set cpo-=C + +CompilerSet makeprg=rake + +CompilerSet errorformat= + \%D(in\ %f), + \%\\s%#from\ %f:%l:%m, + \%\\s%#from\ %f:%l:, + \%\\s%##\ %f:%l:%m, + \%\\s%##\ %f:%l, + \%\\s%#[%f:%l:\ %#%m, + \%\\s%#%f:%l:\ %#%m, + \%\\s%#%f:%l:, + \%m\ [%f:%l]: + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: nowrap sw=2 sts=2 ts=8: diff --git a/sources_non_forked/vim-ruby/compiler/rspec.vim b/sources_non_forked/vim-ruby/compiler/rspec.vim new file mode 100644 index 00000000..7c340bab --- /dev/null +++ b/sources_non_forked/vim-ruby/compiler/rspec.vim @@ -0,0 +1,33 @@ +" Vim compiler file +" Language: RSpec +" Maintainer: Tim Pope +" URL: https://github.com/vim-ruby/vim-ruby +" Release Coordinator: Doug Kearns + +if exists("current_compiler") + finish +endif +let current_compiler = "rspec" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal +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\ \ %\\d%\\+)%.%#, + \%C\ \ \ \ \ %m, + \%-G%.%# + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: nowrap sw=2 sts=2 ts=8: diff --git a/sources_non_forked/vim-ruby/compiler/ruby.vim b/sources_non_forked/vim-ruby/compiler/ruby.vim new file mode 100644 index 00000000..dcf7a401 --- /dev/null +++ b/sources_non_forked/vim-ruby/compiler/ruby.vim @@ -0,0 +1,45 @@ +" Vim compiler file +" Language: Ruby +" Function: Syntax check and/or error reporting +" Maintainer: Tim Pope +" URL: https://github.com/vim-ruby/vim-ruby +" Release Coordinator: Doug Kearns +" ---------------------------------------------------------------------------- + +if exists("current_compiler") + finish +endif +let current_compiler = "ruby" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal +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\ -wc\ $* +" +" or add '-c' at :make command line: +" +" :make -c % +" +CompilerSet makeprg=ruby\ -w\ $* + +CompilerSet errorformat= + \%+E%f:%l:\ parse\ error, + \%W%f:%l:\ warning:\ %m, + \%E%f:%l:in\ %*[^:]:\ %m, + \%E%f:%l:\ %m, + \%-C%\tfrom\ %f:%l:in\ %.%#, + \%-Z%\tfrom\ %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/sources_non_forked/vim-ruby/compiler/rubyunit.vim b/sources_non_forked/vim-ruby/compiler/rubyunit.vim new file mode 100644 index 00000000..93a0c8e6 --- /dev/null +++ b/sources_non_forked/vim-ruby/compiler/rubyunit.vim @@ -0,0 +1,33 @@ +" Vim compiler file +" Language: Test::Unit - Ruby Unit Testing Framework +" Maintainer: Doug Kearns +" URL: https://github.com/vim-ruby/vim-ruby +" Release Coordinator: Doug Kearns + +if exists("current_compiler") + finish +endif +let current_compiler = "rubyunit" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal +endif + +let s:cpo_save = &cpo +set cpo-=C + +CompilerSet makeprg=testrb + +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/sources_non_forked/vim-ruby/doc/ft-ruby-omni.txt b/sources_non_forked/vim-ruby/doc/ft-ruby-omni.txt new file mode 100644 index 00000000..79fa3da1 --- /dev/null +++ b/sources_non_forked/vim-ruby/doc/ft-ruby-omni.txt @@ -0,0 +1,40 @@ +RUBY *ft-ruby-omni* + +Completion of Ruby code requires that Vim be built with |+ruby|. + +Ruby completion will parse your buffer on demand in order to provide a list of +completions. These completions will be drawn from modules loaded by "require" +and modules defined in the current buffer. + +The completions provided by CTRL-X CTRL-O are sensitive to the context: + + CONTEXT COMPLETIONS PROVIDED ~ + + 1. Not inside a class definition Classes, constants and globals + + 2. Inside a class definition Methods or constants defined in the class + + 3. After '.', '::' or ':' Methods applicable to the object being + dereferenced + + 4. After ':' or ':foo' Symbol name (beginning with "foo") + +Notes: + - Vim will load/evaluate code in order to provide completions. This may + cause some code execution, which may be a concern. This is no longer + enabled by default, to enable this feature add > + let g:rubycomplete_buffer_loading = 1 +<- In context 1 above, Vim can parse the entire buffer to add a list of + classes to the completion results. This feature is turned off by default, + to enable it add > + let g:rubycomplete_classes_in_global = 1 +< to your vimrc + - In context 2 above, anonymous classes are not supported. + - In context 3 above, Vim will attempt to determine the methods supported by + the object. + - Vim can detect and load the Rails environment for files within a rails + project. The feature is disabled by default, to enable it add > + let g:rubycomplete_rails = 1 +< to your vimrc + + vim:tw=78:sw=4:ts=8:ft=help:norl: diff --git a/sources_non_forked/vim-ruby/doc/ft-ruby-syntax.txt b/sources_non_forked/vim-ruby/doc/ft-ruby-syntax.txt new file mode 100644 index 00000000..482ebefc --- /dev/null +++ b/sources_non_forked/vim-ruby/doc/ft-ruby-syntax.txt @@ -0,0 +1,64 @@ +RUBY *ruby.vim* *ft-ruby-syntax* + +There are a number of options to the Ruby syntax highlighting. + +1. Ruby operators |ruby_operators| +2. Whitespace errors |ruby_space_errors| +3. Folds |ruby_fold| +4. Reducing expensive operations |ruby_no_expensive| |ruby_minlines| + + +1. Ruby operators *ruby_operators* + +Ruby operators can be highlighted. + +This is enabled by defining "ruby_operators": > + + :let ruby_operators = 1 +< + +2. Whitespace errors *ruby_space_errors* + +Whitespace errors can be highlighted by defining "ruby_space_errors": > + + :let ruby_space_errors = 1 +< + +This will highlight trailing whitespace and tabs preceded by a space character +as errors. This can be refined by defining "ruby_no_trail_space_error" and +"ruby_no_tab_space_error" which will ignore trailing whitespace and tabs after +spaces respectively. + +3. Folds *ruby_fold* + +Folds can be enabled by defining "ruby_fold": > + + :let ruby_fold = 1 +< + +This will set the value |foldmethod| to "syntax" locally to the current buffer +or window, which will enable syntax-based folding when editing Ruby filetypes. + +4. Reducing expensive operations *ruby_no_expensive* + +By default, the "end" keyword is colorized according to the opening statement +of the block it closes. While useful, this feature can be expensive; if you +experience slow redrawing (or you are on a terminal with poor color support) +you may want to turn it off by defining the "ruby_no_expensive" variable: > + + :let ruby_no_expensive = 1 +< +In this case the same color will be used for all control keywords. + + *ruby_minlines* + +If you do want this feature enabled, but notice highlighting errors while +scrolling backwards, which are fixed when redrawing with CTRL-L, try setting +the "ruby_minlines" variable to a value larger than 50: > + + :let ruby_minlines = 100 +< +Ideally, this value should be a number of lines large enough to embrace your +largest class or module. + + vim:tw=78:sw=4:ts=8:ft=help:norl: diff --git a/sources_non_forked/vim-ruby/doc/vim-ruby.txt b/sources_non_forked/vim-ruby/doc/vim-ruby.txt new file mode 100644 index 00000000..dba015e1 --- /dev/null +++ b/sources_non_forked/vim-ruby/doc/vim-ruby.txt @@ -0,0 +1,61 @@ +*vim-ruby.txt* + +1. Ruby motions |ruby-motion| +2. Ruby text objects |ruby-text-objects| + +============================================================================== +1. Ruby motions *ruby-motion* + +Vim provides motions such as |[m| and |]m| for jumping to the start or end of +a method definition. Out of the box, these work for curly-bracket languages, +but not for ruby. The |vim-ruby| plugin enhances these motions, by making them +also work on ruby files. + + *ruby-]m* +]m Go to start of next method definition. + + *ruby-]M* +]M Go to end of next method definition. + + *ruby-[m* +[m Go to start of previous method definition. + + *ruby-[M* +[M Go to end of previous method definition. + + *ruby-]]* +]] Go to start of next module or class definition. + + *ruby-][* +][ Go to end of next module or class definition. + + *ruby-[[* +[[ Go to start of previous module or class definition. + + *ruby-[]* +[] Go to end of previous module or class definition. + +============================================================================== +2. Ruby text objects *ruby-text-objects* + +Vim's |text-objects| can be used to select or operate upon regions of text +that are defined by structure. The |vim-ruby| plugin adds text objects for +operating on methods and classes. + + *ruby-v_am* *ruby-am* +am "a method", select from "def" until matching "end" + keyword. + + *ruby-v_im* *ruby-im* +im "inner method", select contents of "def"/"end" block, + excluding the "def" and "end" themselves. + + *ruby-v_aM* *ruby-aM* +aM "a class", select from "class" until matching "end" + keyword. + + *ruby-v_iM* *ruby-iM* +iM "inner class", select contents of "class"/"end" + block, excluding the "class" and "end" themselves. + + vim:tw=78:sw=4:ts=8:ft=help:norl: diff --git a/sources_non_forked/vim-ruby/etc/examples/indent/closing_brackets.rb b/sources_non_forked/vim-ruby/etc/examples/indent/closing_brackets.rb new file mode 100644 index 00000000..46c4afd6 --- /dev/null +++ b/sources_non_forked/vim-ruby/etc/examples/indent/closing_brackets.rb @@ -0,0 +1,16 @@ +[1, [2, + [3], + 3], + 4] + +[1, [2, + 3], + 4] + +[1, {2 => + 3}, + 4] + +[1, f(2, + 3), + 4] diff --git a/sources_non_forked/vim-ruby/ftdetect/ruby.vim b/sources_non_forked/vim-ruby/ftdetect/ruby.vim new file mode 100644 index 00000000..a4e9a6d9 --- /dev/null +++ b/sources_non_forked/vim-ruby/ftdetect/ruby.vim @@ -0,0 +1,62 @@ +" Ruby +au BufNewFile,BufRead *.rb,*.rbw,*.gemspec set filetype=ruby + +" Ruby on Rails +au BufNewFile,BufRead *.builder,*.rxml,*.rjs set filetype=ruby + +" Rakefile +au BufNewFile,BufRead [rR]akefile,*.rake set filetype=ruby + +" Rantfile +au BufNewFile,BufRead [rR]antfile,*.rant set filetype=ruby + +" IRB config +au BufNewFile,BufRead .irbrc,irbrc set filetype=ruby + +" Pry config +au BufNewFile,BufRead .pryrc set filetype=ruby + +" Rackup +au BufNewFile,BufRead *.ru set filetype=ruby + +" Capistrano +au BufNewFile,BufRead Capfile set filetype=ruby + +" Bundler +au BufNewFile,BufRead Gemfile set filetype=ruby + +" Guard +au BufNewFile,BufRead Guardfile,.Guardfile set filetype=ruby + +" Chef +au BufNewFile,BufRead Cheffile set filetype=ruby +au BufNewFile,BufRead Berksfile set filetype=ruby + +" Vagrant +au BufNewFile,BufRead [vV]agrantfile set filetype=ruby + +" Autotest +au BufNewFile,BufRead .autotest set filetype=ruby + +" eRuby +au BufNewFile,BufRead *.erb,*.rhtml set filetype=eruby + +" Thor +au BufNewFile,BufRead [tT]horfile,*.thor set filetype=ruby + +" Rabl +au BufNewFile,BufRead *.rabl set filetype=ruby + +" Jbuilder +au BufNewFile,BufRead *.jbuilder set filetype=ruby + +" Puppet librarian +au BufNewFile,BufRead Puppetfile set filetype=ruby +" +" Buildr Buildfile +au BufNewFile,BufRead [Bb]uildfile set filetype=ruby + +" Appraisal +au BufNewFile,BufRead Appraisals set filetype=ruby + +" vim: nowrap sw=2 sts=2 ts=8 noet: diff --git a/sources_non_forked/vim-ruby/ftplugin/eruby.vim b/sources_non_forked/vim-ruby/ftplugin/eruby.vim new file mode 100644 index 00000000..9bb8e86f --- /dev/null +++ b/sources_non_forked/vim-ruby/ftplugin/eruby.vim @@ -0,0 +1,102 @@ +" Vim filetype plugin +" Language: eRuby +" Maintainer: Tim Pope +" URL: https://github.com/vim-ruby/vim-ruby +" Release Coordinator: Doug Kearns + +" Only do this when not done yet for this buffer +if exists("b:did_ftplugin") + finish +endif + +let s:save_cpo = &cpo +set cpo-=C + +" Define some defaults in case the included ftplugins don't set them. +let s:undo_ftplugin = "" +let s:browsefilter = "All Files (*.*)\t*.*\n" +let s:match_words = "" + +if !exists("g:eruby_default_subtype") + let g:eruby_default_subtype = "html" +endif + +if &filetype =~ '^eruby\.' + let b:eruby_subtype = matchstr(&filetype,'^eruby\.\zs\w\+') +elseif !exists("b:eruby_subtype") + let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$") + let b:eruby_subtype = matchstr(s:lines,'eruby_subtype=\zs\w\+') + if b:eruby_subtype == '' + let b:eruby_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.erb\|\.eruby\|\.erubis\)\+$','',''),'\.\zs\w\+$') + endif + if b:eruby_subtype == 'rhtml' + let b:eruby_subtype = 'html' + elseif b:eruby_subtype == 'rb' + let b:eruby_subtype = 'ruby' + elseif b:eruby_subtype == 'yml' + let b:eruby_subtype = 'yaml' + elseif b:eruby_subtype == 'js' + let b:eruby_subtype = 'javascript' + elseif b:eruby_subtype == 'txt' + " Conventional; not a real file type + let b:eruby_subtype = 'text' + elseif b:eruby_subtype == '' + let b:eruby_subtype = g:eruby_default_subtype + endif +endif + +if exists("b:eruby_subtype") && b:eruby_subtype != '' + exe "runtime! ftplugin/".b:eruby_subtype.".vim ftplugin/".b:eruby_subtype."_*.vim ftplugin/".b:eruby_subtype."/*.vim" +else + runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim +endif +unlet! b:did_ftplugin + +" Override our defaults if these were set by an included ftplugin. +if exists("b:undo_ftplugin") + let s:undo_ftplugin = b:undo_ftplugin + unlet b:undo_ftplugin +endif +if exists("b:browsefilter") + let s:browsefilter = b:browsefilter + unlet b:browsefilter +endif +if exists("b:match_words") + let s:match_words = b:match_words + unlet b:match_words +endif + +runtime! ftplugin/ruby.vim ftplugin/ruby_*.vim ftplugin/ruby/*.vim +let b:did_ftplugin = 1 + +" Combine the new set of values with those previously included. +if exists("b:undo_ftplugin") + let s:undo_ftplugin = b:undo_ftplugin . " | " . s:undo_ftplugin +endif +if exists ("b:browsefilter") + let s:browsefilter = substitute(b:browsefilter,'\cAll Files (\*\.\*)\t\*\.\*\n','','') . s:browsefilter +endif +if exists("b:match_words") + let s:match_words = b:match_words . ',' . s:match_words +endif + +" Change the browse dialog on Win32 to show mainly eRuby-related files +if has("gui_win32") + let b:browsefilter="eRuby Files (*.erb, *.rhtml)\t*.erb;*.rhtml\n" . s:browsefilter +endif + +" Load the combined list of match_words for matchit.vim +if exists("loaded_matchit") + let b:match_words = s:match_words +endif + +" TODO: comments= +setlocal commentstring=<%#%s%> + +let b:undo_ftplugin = "setl cms< " + \ " | unlet! b:browsefilter b:match_words | " . s:undo_ftplugin + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: nowrap sw=2 sts=2 ts=8: diff --git a/sources_non_forked/vim-ruby/ftplugin/ruby.vim b/sources_non_forked/vim-ruby/ftplugin/ruby.vim new file mode 100644 index 00000000..9630a940 --- /dev/null +++ b/sources_non_forked/vim-ruby/ftplugin/ruby.vim @@ -0,0 +1,395 @@ +" Vim filetype plugin +" Language: Ruby +" Maintainer: Tim Pope +" URL: https://github.com/vim-ruby/vim-ruby +" Release Coordinator: Doug Kearns +" ---------------------------------------------------------------------------- + +if (exists("b:did_ftplugin")) + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +if has("gui_running") && !has("gui_win32") + setlocal keywordprg=ri\ -T\ -f\ bs +else + setlocal keywordprg=ri +endif + +" Matchit support +if exists("loaded_matchit") && !exists("b:match_words") + let b:match_ignorecase = 0 + + let b:match_words = + \ '\<\%(if\|unless\|case\|while\|until\|for\|do\|class\|module\|def\|begin\)\>=\@!' . + \ ':' . + \ '\<\%(else\|elsif\|ensure\|when\|rescue\|break\|redo\|next\|retry\)\>' . + \ ':' . + \ '\' . + \ ',{:},\[:\],(:)' + + let b:match_skip = + \ "synIDattr(synID(line('.'),col('.'),0),'name') =~ '" . + \ "\\'" +endif + +setlocal formatoptions-=t formatoptions+=croql + +setlocal include=^\\s*\\<\\(load\\>\\\|require\\>\\\|autoload\\s*:\\=[\"']\\=\\h\\w*[\"']\\=,\\) +setlocal includeexpr=substitute(substitute(v:fname,'::','/','g'),'$','.rb','') +setlocal suffixesadd=.rb + +if exists("&ofu") && has("ruby") + setlocal omnifunc=rubycomplete#Complete +endif + +" To activate, :set ballooneval +if has('balloon_eval') && exists('+balloonexpr') + setlocal balloonexpr=RubyBalloonexpr() +endif + + +" TODO: +"setlocal define=^\\s*def + +setlocal comments=:# +setlocal commentstring=#\ %s + +if !exists('g:ruby_version_paths') + let g:ruby_version_paths = {} +endif + +function! s:query_path(root) + let code = "print $:.join %q{,}" + if &shell =~# 'sh' && $PATH !~# '\s' + let prefix = 'env PATH='.$PATH.' ' + else + let prefix = '' + endif + if &shellxquote == "'" + let path_check = prefix.'ruby -e "' . code . '"' + else + let path_check = prefix."ruby -e '" . code . "'" + endif + + let cd = haslocaldir() ? 'lcd' : 'cd' + let cwd = getcwd() + try + exe cd fnameescape(a:root) + let path = split(system(path_check),',') + exe cd fnameescape(cwd) + return path + finally + exe cd fnameescape(cwd) + endtry +endfunction + +function! s:build_path(path) + let path = join(map(copy(a:path), 'v:val ==# "." ? "" : v:val'), ',') + if &g:path !~# '\v^\.%(,/%(usr|emx)/include)=,,$' + let path = substitute(&g:path,',,$',',','') . ',' . path + endif + return path +endfunction + +if !exists('b:ruby_version') && !exists('g:ruby_path') && isdirectory(expand('%:p:h')) + let s:version_file = findfile('.ruby-version', '.;') + if !empty(s:version_file) + let b:ruby_version = get(readfile(s:version_file, '', 1), '') + if !has_key(g:ruby_version_paths, b:ruby_version) + let g:ruby_version_paths[b:ruby_version] = s:query_path(fnamemodify(s:version_file, ':p:h')) + endif + endif +endif + +if exists("g:ruby_path") + let s:ruby_path = type(g:ruby_path) == type([]) ? join(g:ruby_path, ',') : g:ruby_path +elseif has_key(g:ruby_version_paths, get(b:, 'ruby_version', '')) + let s:ruby_paths = g:ruby_version_paths[b:ruby_version] + let s:ruby_path = s:build_path(s:ruby_paths) +else + if !exists('g:ruby_default_path') + if has("ruby") && has("win32") + ruby ::VIM::command( 'let g:ruby_default_path = split("%s",",")' % $:.join(%q{,}) ) + elseif executable('ruby') + let g:ruby_default_path = s:query_path($HOME) + else + let g:ruby_default_path = map(split($RUBYLIB,':'), 'v:val ==# "." ? "" : v:val') + endif + endif + let s:ruby_paths = g:ruby_default_path + let s:ruby_path = s:build_path(s:ruby_paths) +endif + +if stridx(&l:path, s:ruby_path) == -1 + let &l:path = s:ruby_path +endif +if exists('s:ruby_paths') && stridx(&l:tags, join(map(copy(s:ruby_paths),'v:val."/tags"'),',')) == -1 + let &l:tags = &tags . ',' . join(map(copy(s:ruby_paths),'v:val."/tags"'),',') +endif + +if has("gui_win32") && !exists("b:browsefilter") + let b:browsefilter = "Ruby Source Files (*.rb)\t*.rb\n" . + \ "All Files (*.*)\t*.*\n" +endif + +let b:undo_ftplugin = "setl fo< inc< inex< sua< def< com< cms< path< tags< kp<" + \."| unlet! b:browsefilter b:match_ignorecase b:match_words b:match_skip" + \."| if exists('&ofu') && has('ruby') | setl ofu< | endif" + \."| if has('balloon_eval') && exists('+bexpr') | setl bexpr< | endif" + +if !exists("g:no_plugin_maps") && !exists("g:no_ruby_maps") + nnoremap [m :call searchsyn('\','rubyDefine','b','n') + nnoremap ]m :call searchsyn('\','rubyDefine','','n') + nnoremap [M :call searchsyn('\','rubyDefine','b','n') + nnoremap ]M :call searchsyn('\','rubyDefine','','n') + xnoremap [m :call searchsyn('\','rubyDefine','b','v') + xnoremap ]m :call searchsyn('\','rubyDefine','','v') + xnoremap [M :call searchsyn('\','rubyDefine','b','v') + xnoremap ]M :call searchsyn('\','rubyDefine','','v') + + nnoremap [[ :call searchsyn('\<\%(class\module\)\>','rubyModule\rubyClass','b','n') + nnoremap ]] :call searchsyn('\<\%(class\module\)\>','rubyModule\rubyClass','','n') + nnoremap [] :call searchsyn('\','rubyModule\rubyClass','b','n') + nnoremap ][ :call searchsyn('\','rubyModule\rubyClass','','n') + xnoremap [[ :call searchsyn('\<\%(class\module\)\>','rubyModule\rubyClass','b','v') + xnoremap ]] :call searchsyn('\<\%(class\module\)\>','rubyModule\rubyClass','','v') + xnoremap [] :call searchsyn('\','rubyModule\rubyClass','b','v') + xnoremap ][ :call searchsyn('\','rubyModule\rubyClass','','v') + + let b:undo_ftplugin = b:undo_ftplugin + \."| sil! exe 'unmap [[' | sil! exe 'unmap ]]' | sil! exe 'unmap []' | sil! exe 'unmap ]['" + \."| sil! exe 'unmap [m' | sil! exe 'unmap ]m' | sil! exe 'unmap [M' | sil! exe 'unmap ]M'" + + if maparg('im','n') == '' + onoremap im :call wrap_i('[m',']M') + onoremap am :call wrap_a('[m',']M') + xnoremap im :call wrap_i('[m',']M') + xnoremap am :call wrap_a('[m',']M') + let b:undo_ftplugin = b:undo_ftplugin + \."| sil! exe 'ounmap im' | sil! exe 'ounmap am'" + \."| sil! exe 'xunmap im' | sil! exe 'xunmap am'" + endif + + if maparg('iM','n') == '' + onoremap iM :call wrap_i('[[','][') + onoremap aM :call wrap_a('[[','][') + xnoremap iM :call wrap_i('[[','][') + xnoremap aM :call wrap_a('[[','][') + let b:undo_ftplugin = b:undo_ftplugin + \."| sil! exe 'ounmap iM' | sil! exe 'ounmap aM'" + \."| sil! exe 'xunmap iM' | sil! exe 'xunmap aM'" + endif + + if maparg("\",'n') == '' + nnoremap :exe v:count1."tag =RubyCursorIdentifier()" + nnoremap g :exe "tjump =RubyCursorIdentifier()" + nnoremap g] :exe "tselect =RubyCursorIdentifier()" + nnoremap ] :exe v:count1."stag =RubyCursorIdentifier()" + nnoremap :exe v:count1."stag =RubyCursorIdentifier()" + nnoremap g :exe "stjump =RubyCursorIdentifier()" + nnoremap g] :exe "stselect =RubyCursorIdentifier()" + nnoremap } :exe "ptag =RubyCursorIdentifier()" + nnoremap g} :exe "ptjump =RubyCursorIdentifier()" + let b:undo_ftplugin = b:undo_ftplugin + \."| sil! exe 'nunmap '| sil! exe 'nunmap g'| sil! exe 'nunmap g]'" + \."| sil! exe 'nunmap ]'| sil! exe 'nunmap '" + \."| sil! exe 'nunmap g'| sil! exe 'nunmap g]'" + \."| sil! exe 'nunmap }'| sil! exe 'nunmap g}'" + endif + + if maparg("gf",'n') == '' + " By using findfile() rather than gf's normal behavior, we prevent + " erroneously editing a directory. + nnoremap gf :exe gf(v:count1,"gf",'edit') + nnoremap f :exe gf(v:count1,"\C-W>f",'split') + nnoremap :exe gf(v:count1,"\C-W>\C-F>",'split') + nnoremap gf :exe gf(v:count1,"\C-W>gf",'tabedit') + let b:undo_ftplugin = b:undo_ftplugin + \."| sil! exe 'nunmap gf' | sil! exe 'nunmap f' | sil! exe 'nunmap ' | sil! exe 'nunmap gf'" + endif +endif + +let &cpo = s:cpo_save +unlet s:cpo_save + +if exists("g:did_ruby_ftplugin_functions") + finish +endif +let g:did_ruby_ftplugin_functions = 1 + +function! RubyBalloonexpr() + if !exists('s:ri_found') + let s:ri_found = executable('ri') + endif + if s:ri_found + let line = getline(v:beval_lnum) + let b = matchstr(strpart(line,0,v:beval_col),'\%(\w\|[:.]\)*$') + let a = substitute(matchstr(strpart(line,v:beval_col),'^\w*\%([?!]\|\s*=\)\?'),'\s\+','','g') + let str = b.a + let before = strpart(line,0,v:beval_col-strlen(b)) + let after = strpart(line,v:beval_col+strlen(a)) + if str =~ '^\.' + let str = substitute(str,'^\.','#','g') + if before =~ '\]\s*$' + let str = 'Array'.str + elseif before =~ '}\s*$' + " False positives from blocks here + let str = 'Hash'.str + elseif before =~ "[\"'`]\\s*$" || before =~ '\$\d\+\s*$' + let str = 'String'.str + elseif before =~ '\$\d\+\.\d\+\s*$' + let str = 'Float'.str + elseif before =~ '\$\d\+\s*$' + let str = 'Integer'.str + elseif before =~ '/\s*$' + let str = 'Regexp'.str + else + let str = substitute(str,'^#','.','') + endif + endif + let str = substitute(str,'.*\.\s*to_f\s*\.\s*','Float#','') + let str = substitute(str,'.*\.\s*to_i\%(nt\)\=\s*\.\s*','Integer#','') + let str = substitute(str,'.*\.\s*to_s\%(tr\)\=\s*\.\s*','String#','') + let str = substitute(str,'.*\.\s*to_sym\s*\.\s*','Symbol#','') + let str = substitute(str,'.*\.\s*to_a\%(ry\)\=\s*\.\s*','Array#','') + let str = substitute(str,'.*\.\s*to_proc\s*\.\s*','Proc#','') + if str !~ '^\w' + return '' + endif + silent! let res = substitute(system("ri -f rdoc -T \"".str.'"'),'\n$','','') + if res =~ '^Nothing known about' || res =~ '^Bad argument:' || res =~ '^More than one method' + return '' + endif + return res + else + return "" + endif +endfunction + +function! s:searchsyn(pattern,syn,flags,mode) + norm! m' + if a:mode ==# 'v' + norm! gv + endif + let i = 0 + let cnt = v:count ? v:count : 1 + while i < cnt + let i = i + 1 + let line = line('.') + let col = col('.') + let pos = search(a:pattern,'W'.a:flags) + while pos != 0 && s:synname() !~# a:syn + let pos = search(a:pattern,'W'.a:flags) + endwhile + if pos == 0 + call cursor(line,col) + return + endif + endwhile +endfunction + +function! s:synname() + return synIDattr(synID(line('.'),col('.'),0),'name') +endfunction + +function! s:wrap_i(back,forward) + execute 'norm k'.a:forward + let line = line('.') + execute 'norm '.a:back + if line('.') == line - 1 + return s:wrap_a(a:back,a:forward) + endif + execute 'norm jV'.a:forward.'k' +endfunction + +function! s:wrap_a(back,forward) + execute 'norm '.a:forward + if line('.') < line('$') && getline(line('.')+1) ==# '' + let after = 1 + endif + execute 'norm '.a:back + while getline(line('.')-1) =~# '^\s*#' && line('.') + - + endwhile + if exists('after') + execute 'norm V'.a:forward.'j' + elseif line('.') > 1 && getline(line('.')-1) =~# '^\s*$' + execute 'norm kV'.a:forward + else + execute 'norm V'.a:forward + endif +endfunction + +function! RubyCursorIdentifier() + let asciicode = '\%(\w\|[]})\"'."'".']\)\@\|\<0[xXbBoOdD][[:xdigit:]_]\+\>\)\|'.asciicode + let operator = '\%(\[\]\|<<\|<=>\|[!<>]=\=\|===\=\|[!=]\~\|>>\|\*\*\|\.\.\.\=\|=>\|[~^&|*/%+-]\)' + let method = '\%(\<[_a-zA-Z]\w*\>\%([?!]\|\s*=>\@!\)\=\)' + let global = '$\%([!$&"'."'".'*+,./:;<=>?@\`~]\|-\=\w\+\>\)' + let symbolizable = '\%(\%(@@\=\)\w\+\>\|'.global.'\|'.method.'\|'.operator.'\)' + let pattern = '\C\s*\%('.number.'\|\%(:\@") : stripped +endfunction + +function! s:gf(count,map,edit) abort + if getline('.') =~# '^\s*require_relative\s*\(["'']\).*\1\s*$' + let target = matchstr(getline('.'),'\(["'']\)\zs.\{-\}\ze\1') + return a:edit.' %:h/'.target.'.rb' + elseif getline('.') =~# '^\s*\%(require[( ]\|load[( ]\|autoload[( ]:\w\+,\)\s*\s*\%(::\)\=File\.expand_path(\(["'']\)\.\./.*\1,\s*__FILE__)\s*$' + let target = matchstr(getline('.'),'\(["'']\)\.\./\zs.\{-\}\ze\1') + return a:edit.' %:h/'.target.'.rb' + elseif getline('.') =~# '^\s*\%(require \|load \|autoload :\w\+,\)\s*\(["'']\).*\1\s*$' + let target = matchstr(getline('.'),'\(["'']\)\zs.\{-\}\ze\1') + else + let target = expand('') + endif + let found = findfile(target, &path, a:count) + if found ==# '' + return 'norm! '.a:count.a:map + else + return a:edit.' '.fnameescape(found) + endif +endfunction + +" +" Instructions for enabling "matchit" support: +" +" 1. Look for the latest "matchit" plugin at +" +" http://www.vim.org/scripts/script.php?script_id=39 +" +" It is also packaged with Vim, in the $VIMRUNTIME/macros directory. +" +" 2. Copy "matchit.txt" into a "doc" directory (e.g. $HOME/.vim/doc). +" +" 3. Copy "matchit.vim" into a "plugin" directory (e.g. $HOME/.vim/plugin). +" +" 4. Ensure this file (ftplugin/ruby.vim) is installed. +" +" 5. Ensure you have this line in your $HOME/.vimrc: +" filetype plugin on +" +" 6. Restart Vim and create the matchit documentation: +" +" :helptags ~/.vim/doc +" +" Now you can do ":help matchit", and you should be able to use "%" on Ruby +" keywords. Try ":echo b:match_words" to be sure. +" +" Thanks to Mark J. Reed for the instructions. See ":help vimrc" for the +" locations of plugin directories, etc., as there are several options, and it +" differs on Windows. Email gsinclair@soyabean.com.au if you need help. +" + +" vim: nowrap sw=2 sts=2 ts=8: diff --git a/sources_non_forked/vim-ruby/indent/eruby.vim b/sources_non_forked/vim-ruby/indent/eruby.vim new file mode 100644 index 00000000..80cab700 --- /dev/null +++ b/sources_non_forked/vim-ruby/indent/eruby.vim @@ -0,0 +1,82 @@ +" Vim indent file +" Language: eRuby +" Maintainer: Tim Pope +" URL: https://github.com/vim-ruby/vim-ruby +" Release Coordinator: Doug Kearns + +if exists("b:did_indent") + finish +endif + +runtime! indent/ruby.vim +unlet! b:did_indent +setlocal indentexpr= + +if exists("b:eruby_subtype") + exe "runtime! indent/".b:eruby_subtype.".vim" +else + runtime! indent/html.vim +endif +unlet! b:did_indent + +if &l:indentexpr == '' + if &l:cindent + let &l:indentexpr = 'cindent(v:lnum)' + else + let &l:indentexpr = 'indent(prevnonblank(v:lnum-1))' + endif +endif +let b:eruby_subtype_indentexpr = &l:indentexpr + +let b:did_indent = 1 + +setlocal indentexpr=GetErubyIndent() +setlocal indentkeys=o,O,*,<>>,{,},0),0],o,O,!^F,=end,=else,=elsif,=rescue,=ensure,=when + +" Only define the function once. +if exists("*GetErubyIndent") + finish +endif + +function! GetErubyIndent(...) + if a:0 && a:1 == '.' + let v:lnum = line('.') + elseif a:0 && a:1 =~ '^\d' + let v:lnum = a:1 + endif + let vcol = col('.') + call cursor(v:lnum,1) + let inruby = searchpair('<%','','%>','W') + call cursor(v:lnum,vcol) + if inruby && getline(v:lnum) !~ '^<%\|^\s*[-=]\=%>' + let ind = GetRubyIndent(v:lnum) + else + exe "let ind = ".b:eruby_subtype_indentexpr + endif + let lnum = prevnonblank(v:lnum-1) + let line = getline(lnum) + let cline = getline(v:lnum) + if cline =~# '^\s*<%[-=]\=\s*\%(}\|end\|else\|\%(ensure\|rescue\|elsif\|when\).\{-\}\)\s*\%([-=]\=%>\|$\)' + let ind = ind - &sw + endif + if line =~# '\S\s*<%[-=]\=\s*\%(}\|end\).\{-\}\s*\%([-=]\=%>\|$\)' + let ind = ind - &sw + endif + if line =~# '\%({\|\' + let ind = ind + &sw + elseif line =~# '<%[-=]\=\s*\%(module\|class\|def\|if\|for\|while\|until\|else\|elsif\|case\|when\|unless\|begin\|ensure\|rescue\)\>.*%>' + let ind = ind + &sw + endif + if line =~# '^\s*<%[=#-]\=\s*$' && cline !~# '^\s*end\>' + let ind = ind + &sw + endif + if line !~# '^\s*<%' && line =~# '%>\s*$' + let ind = ind - &sw + endif + if cline =~# '^\s*[-=]\=%>\s*$' + let ind = ind - &sw + endif + return ind +endfunction + +" vim:set sw=2 sts=2 ts=8 noet: diff --git a/sources_non_forked/vim-ruby/indent/ruby.vim b/sources_non_forked/vim-ruby/indent/ruby.vim new file mode 100644 index 00000000..095b3a43 --- /dev/null +++ b/sources_non_forked/vim-ruby/indent/ruby.vim @@ -0,0 +1,537 @@ +" Vim indent file +" Language: Ruby +" Maintainer: Nikolai Weibull +" URL: https://github.com/vim-ruby/vim-ruby +" Release Coordinator: Doug Kearns + +" 0. Initialization {{{1 +" ================= + +" Only load this indent file when no other was loaded. +if exists("b:did_indent") + finish +endif +let b:did_indent = 1 + +setlocal nosmartindent + +" Now, set up our indentation expression and keys that trigger it. +setlocal indentexpr=GetRubyIndent(v:lnum) +setlocal indentkeys=0{,0},0),0],!^F,o,O,e +setlocal indentkeys+==end,=else,=elsif,=when,=ensure,=rescue,==begin,==end + +" Only define the function once. +if exists("*GetRubyIndent") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +" 1. Variables {{{1 +" ============ + +" Regex of syntax group names that are or delimit strings/symbols or are comments. +let s:syng_strcom = '\' + +" Regex of syntax group names that are strings. +let s:syng_string = + \ '\' + +" Regex of syntax group names that are strings or documentation. +let s:syng_stringdoc = + \'\' + +" Expression used to check whether we should skip a match with searchpair(). +let s:skip_expr = + \ "synIDattr(synID(line('.'),col('.'),1),'name') =~ '".s:syng_strcom."'" + +" Regex used for words that, at the start of a line, add a level of indent. +let s:ruby_indent_keywords = '^\s*\zs\<\%(module\|class\|def\|if\|for' . + \ '\|while\|until\|else\|elsif\|case\|when\|unless\|begin\|ensure' . + \ '\|rescue\):\@!\>' . + \ '\|\%([=,*/%+-]\|<<\|>>\|:\s\)\s*\zs' . + \ '\<\%(if\|for\|while\|until\|case\|unless\|begin\):\@!\>' + +" Regex used for words that, at the start of a line, remove a level of indent. +let s:ruby_deindent_keywords = + \ '^\s*\zs\<\%(ensure\|else\|rescue\|elsif\|when\|end\):\@!\>' + +" Regex that defines the start-match for the 'end' keyword. +"let s:end_start_regex = '\%(^\|[^.]\)\<\%(module\|class\|def\|if\|for\|while\|until\|case\|unless\|begin\|do\)\>' +" TODO: the do here should be restricted somewhat (only at end of line)? +let s:end_start_regex = + \ '\C\%(^\s*\|[=,*/%+\-|;{]\|<<\|>>\|:\s\)\s*\zs' . + \ '\<\%(module\|class\|def\|if\|for\|while\|until\|case\|unless\|begin\):\@!\>' . + \ '\|\%(^\|[^.:@$]\)\@<=\' + +" Regex that defines the middle-match for the 'end' keyword. +let s:end_middle_regex = '\<\%(ensure\|else\|\%(\%(^\|;\)\s*\)\@<=\\|when\|elsif\):\@!\>' + +" Regex that defines the end-match for the 'end' keyword. +let s:end_end_regex = '\%(^\|[^.:@$]\)\@<=\' + +" Expression used for searchpair() call for finding match for 'end' keyword. +let s:end_skip_expr = s:skip_expr . + \ ' || (expand("") == "do"' . + \ ' && getline(".") =~ "^\\s*\\<\\(while\\|until\\|for\\):\\@!\\>")' + +" Regex that defines continuation lines, not including (, {, or [. +let s:non_bracket_continuation_regex = '\%([\\.,:*/%+]\|\\|%\@ 0 + " Go in and out of blocks comments as necessary. + " If the line isn't empty (with opt. comment) or in a string, end search. + let line = getline(lnum) + if line =~ '^=begin' + if in_block + let in_block = 0 + else + break + endif + elseif !in_block && line =~ '^=end' + let in_block = 1 + elseif !in_block && line !~ '^\s*#.*$' && !(s:IsInStringOrComment(lnum, 1) + \ && s:IsInStringOrComment(lnum, strlen(line))) + break + endif + let lnum = prevnonblank(lnum - 1) + endwhile + return lnum +endfunction + +" Find line above 'lnum' that started the continuation 'lnum' may be part of. +function s:GetMSL(lnum) + " Start on the line we're at and use its indent. + let msl = a:lnum + let msl_body = getline(msl) + let lnum = s:PrevNonBlankNonString(a:lnum - 1) + while lnum > 0 + " If we have a continuation line, or we're in a string, use line as MSL. + " Otherwise, terminate search as we have found our MSL already. + let line = getline(lnum) + + if s:Match(lnum, s:splat_regex) + " If the above line looks like the "*" of a splat, use the current one's + " indentation. + " + " Example: + " Hash[* + " method_call do + " something + " + return msl + elseif s:Match(line, s:non_bracket_continuation_regex) && + \ s:Match(msl, s:non_bracket_continuation_regex) + " If the current line is a non-bracket continuation and so is the + " previous one, keep its indent and continue looking for an MSL. + " + " Example: + " method_call one, + " two, + " three + " + let msl = lnum + elseif s:Match(lnum, s:non_bracket_continuation_regex) && + \ (s:Match(msl, s:bracket_continuation_regex) || s:Match(msl, s:block_continuation_regex)) + " If the current line is a bracket continuation or a block-starter, but + " the previous is a non-bracket one, respect the previous' indentation, + " and stop here. + " + " Example: + " method_call one, + " two { + " three + " + return lnum + elseif s:Match(lnum, s:bracket_continuation_regex) && + \ (s:Match(msl, s:bracket_continuation_regex) || s:Match(msl, s:block_continuation_regex)) + " If both lines are bracket continuations (the current may also be a + " block-starter), use the current one's and stop here + " + " Example: + " method_call( + " other_method_call( + " foo + return msl + elseif s:Match(lnum, s:block_regex) && + \ !s:Match(msl, s:continuation_regex) && + \ !s:Match(msl, s:block_continuation_regex) + " If the previous line is a block-starter and the current one is + " mostly ordinary, use the current one as the MSL. + " + " Example: + " method_call do + " something + " something_else + return msl + else + let col = match(line, s:continuation_regex) + 1 + if (col > 0 && !s:IsInStringOrComment(lnum, col)) + \ || s:IsInString(lnum, strlen(line)) + let msl = lnum + else + break + endif + endif + + let msl_body = getline(msl) + let lnum = s:PrevNonBlankNonString(lnum - 1) + endwhile + return msl +endfunction + +" Check if line 'lnum' has more opening brackets than closing ones. +function s:ExtraBrackets(lnum) + let opening = {'parentheses': [], 'braces': [], 'brackets': []} + let closing = {'parentheses': [], 'braces': [], 'brackets': []} + + let line = getline(a:lnum) + let pos = match(line, '[][(){}]', 0) + + " Save any encountered opening brackets, and remove them once a matching + " closing one has been found. If a closing bracket shows up that doesn't + " close anything, save it for later. + while pos != -1 + if !s:IsInStringOrComment(a:lnum, pos + 1) + if line[pos] == '(' + call add(opening.parentheses, {'type': '(', 'pos': pos}) + elseif line[pos] == ')' + if empty(opening.parentheses) + call add(closing.parentheses, {'type': ')', 'pos': pos}) + else + let opening.parentheses = opening.parentheses[0:-2] + endif + elseif line[pos] == '{' + call add(opening.braces, {'type': '{', 'pos': pos}) + elseif line[pos] == '}' + if empty(opening.braces) + call add(closing.braces, {'type': '}', 'pos': pos}) + else + let opening.braces = opening.braces[0:-2] + endif + elseif line[pos] == '[' + call add(opening.brackets, {'type': '[', 'pos': pos}) + elseif line[pos] == ']' + if empty(opening.brackets) + call add(closing.brackets, {'type': ']', 'pos': pos}) + else + let opening.brackets = opening.brackets[0:-2] + endif + endif + endif + + let pos = match(line, '[][(){}]', pos + 1) + endwhile + + " Find the rightmost brackets, since they're the ones that are important in + " both opening and closing cases + let rightmost_opening = {'type': '(', 'pos': -1} + let rightmost_closing = {'type': ')', 'pos': -1} + + for opening in opening.parentheses + opening.braces + opening.brackets + if opening.pos > rightmost_opening.pos + let rightmost_opening = opening + endif + endfor + + for closing in closing.parentheses + closing.braces + closing.brackets + if closing.pos > rightmost_closing.pos + let rightmost_closing = closing + endif + endfor + + return [rightmost_opening, rightmost_closing] +endfunction + +function s:Match(lnum, regex) + let col = match(getline(a:lnum), '\C'.a:regex) + 1 + return col > 0 && !s:IsInStringOrComment(a:lnum, col) ? col : 0 +endfunction + +function s:MatchLast(lnum, regex) + let line = getline(a:lnum) + let col = match(line, '.*\zs' . a:regex) + while col != -1 && s:IsInStringOrComment(a:lnum, col) + let line = strpart(line, 0, col) + let col = match(line, '.*' . a:regex) + endwhile + return col + 1 +endfunction + +" 3. GetRubyIndent Function {{{1 +" ========================= + +function GetRubyIndent(...) + " 3.1. Setup {{{2 + " ---------- + + " For the current line, use the first argument if given, else v:lnum + let clnum = a:0 ? a:1 : v:lnum + + " Set up variables for restoring position in file. Could use clnum here. + let vcol = col('.') + + " 3.2. Work on the current line {{{2 + " ----------------------------- + + " Get the current line. + let line = getline(clnum) + let ind = -1 + + " If we got a closing bracket on an empty line, find its match and indent + " according to it. For parentheses we indent to its column - 1, for the + " others we indent to the containing line's MSL's level. Return -1 if fail. + let col = matchend(line, '^\s*[]})]') + if col > 0 && !s:IsInStringOrComment(clnum, col) + call cursor(clnum, col) + let bs = strpart('(){}[]', stridx(')}]', line[col - 1]) * 2, 2) + if searchpair(escape(bs[0], '\['), '', bs[1], 'bW', s:skip_expr) > 0 + if line[col-1]==')' && col('.') != col('$') - 1 + let ind = virtcol('.') - 1 + else + let ind = indent(s:GetMSL(line('.'))) + endif + endif + return ind + endif + + " If we have a =begin or =end set indent to first column. + if match(line, '^\s*\%(=begin\|=end\)$') != -1 + return 0 + endif + + " If we have a deindenting keyword, find its match and indent to its level. + " TODO: this is messy + if s:Match(clnum, s:ruby_deindent_keywords) + call cursor(clnum, 1) + if searchpair(s:end_start_regex, s:end_middle_regex, s:end_end_regex, 'bW', + \ s:end_skip_expr) > 0 + let msl = s:GetMSL(line('.')) + let line = getline(line('.')) + + if strpart(line, 0, col('.') - 1) =~ '=\s*$' && + \ strpart(line, col('.') - 1, 2) !~ 'do' + let ind = virtcol('.') - 1 + elseif getline(msl) =~ '=\s*\(#.*\)\=$' + let ind = indent(line('.')) + else + let ind = indent(msl) + endif + endif + return ind + endif + + " If we are in a multi-line string or line-comment, don't do anything to it. + if s:IsInStringOrDocumentation(clnum, matchend(line, '^\s*') + 1) + return indent('.') + endif + + " If we are at the closing delimiter of a "<<" heredoc-style string, set the + " indent to 0. + if line =~ '^\k\+\s*$' + \ && s:IsInStringDelimiter(clnum, 1) + \ && search('\V<<'.line, 'nbW') > 0 + return 0 + endif + + " 3.3. Work on the previous line. {{{2 + " ------------------------------- + + " Find a non-blank, non-multi-line string line above the current line. + let lnum = s:PrevNonBlankNonString(clnum - 1) + + " If the line is empty and inside a string, use the previous line. + if line =~ '^\s*$' && lnum != prevnonblank(clnum - 1) + return indent(prevnonblank(clnum)) + endif + + " At the start of the file use zero indent. + if lnum == 0 + return 0 + endif + + " Set up variables for the previous line. + let line = getline(lnum) + let ind = indent(lnum) + + " If the previous line ended with a block opening, add a level of indent. + if s:Match(lnum, s:block_regex) + return indent(s:GetMSL(lnum)) + &sw + endif + + " If the previous line ended with the "*" of a splat, add a level of indent + if line =~ s:splat_regex + return indent(lnum) + &sw + endif + + " If the previous line contained unclosed opening brackets and we are still + " in them, find the rightmost one and add indent depending on the bracket + " type. + " + " If it contained hanging closing brackets, find the rightmost one, find its + " match and indent according to that. + if line =~ '[[({]' || line =~ '[])}]\s*\%(#.*\)\=$' + let [opening, closing] = s:ExtraBrackets(lnum) + + if opening.pos != -1 + if opening.type == '(' && searchpair('(', '', ')', 'bW', s:skip_expr) > 0 + if col('.') + 1 == col('$') + return ind + &sw + else + return virtcol('.') + endif + else + let nonspace = matchend(line, '\S', opening.pos + 1) - 1 + return nonspace > 0 ? nonspace : ind + &sw + endif + elseif closing.pos != -1 + call cursor(lnum, closing.pos + 1) + normal! % + + if s:Match(line('.'), s:ruby_indent_keywords) + return indent('.') + &sw + else + return indent('.') + endif + else + call cursor(clnum, vcol) + end + endif + + " If the previous line ended with an "end", match that "end"s beginning's + " indent. + let col = s:Match(lnum, '\%(^\|[^.:@$]\)\\s*\%(#.*\)\=$') + if col > 0 + call cursor(lnum, col) + if searchpair(s:end_start_regex, '', s:end_end_regex, 'bW', + \ s:end_skip_expr) > 0 + let n = line('.') + let ind = indent('.') + let msl = s:GetMSL(n) + if msl != n + let ind = indent(msl) + end + return ind + endif + end + + let col = s:Match(lnum, s:ruby_indent_keywords) + if col > 0 + call cursor(lnum, col) + let ind = virtcol('.') - 1 + &sw + " TODO: make this better (we need to count them) (or, if a searchpair + " fails, we know that something is lacking an end and thus we indent a + " level + if s:Match(lnum, s:end_end_regex) + let ind = indent('.') + endif + return ind + endif + + " 3.4. Work on the MSL line. {{{2 + " -------------------------- + + " Set up variables to use and search for MSL to the previous line. + let p_lnum = lnum + let lnum = s:GetMSL(lnum) + + " If the previous line wasn't a MSL and is continuation return its indent. + " TODO: the || s:IsInString() thing worries me a bit. + if p_lnum != lnum + if s:Match(p_lnum, s:non_bracket_continuation_regex) || s:IsInString(p_lnum,strlen(line)) + return ind + endif + endif + + " Set up more variables, now that we know we wasn't continuation bound. + let line = getline(lnum) + let msl_ind = indent(lnum) + + " If the MSL line had an indenting keyword in it, add a level of indent. + " TODO: this does not take into account contrived things such as + " module Foo; class Bar; end + if s:Match(lnum, s:ruby_indent_keywords) + let ind = msl_ind + &sw + if s:Match(lnum, s:end_end_regex) + let ind = ind - &sw + endif + return ind + endif + + " If the previous line ended with [*+/.,-=], but wasn't a block ending or a + " closing bracket, indent one extra level. + if s:Match(lnum, s:non_bracket_continuation_regex) && !s:Match(lnum, '^\s*\([\])}]\|end\)') + if lnum == p_lnum + let ind = msl_ind + &sw + else + let ind = msl_ind + endif + return ind + endif + + " }}}2 + + return ind +endfunction + +" }}}1 + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim:set sw=2 sts=2 ts=8 et: diff --git a/sources_non_forked/vim-ruby/spec/indent/arguments_spec.rb b/sources_non_forked/vim-ruby/spec/indent/arguments_spec.rb new file mode 100644 index 00000000..39837409 --- /dev/null +++ b/sources_non_forked/vim-ruby/spec/indent/arguments_spec.rb @@ -0,0 +1,24 @@ +require 'spec_helper' + +describe "Indenting" do + specify "multi-line arguments" do + assert_correct_indenting <<-EOF + User.new( + :first_name => 'Some', + :second_name => 'Guy' + ) + EOF + + assert_correct_indenting <<-EOF + User.new(:first_name => 'Some', + :second_name => 'Guy') + EOF + + assert_correct_indenting <<-EOF + User.new( + :first_name => 'Some', + :second_name => 'Guy' + ) + EOF + end +end diff --git a/sources_non_forked/vim-ruby/spec/indent/basic_spec.rb b/sources_non_forked/vim-ruby/spec/indent/basic_spec.rb new file mode 100644 index 00000000..8ef872ff --- /dev/null +++ b/sources_non_forked/vim-ruby/spec/indent/basic_spec.rb @@ -0,0 +1,42 @@ +require 'spec_helper' + +describe "Indenting" do + specify "if-clauses" do + assert_correct_indenting <<-EOF + if foo + bar + end + EOF + + assert_correct_indenting <<-EOF + if foo + bar + else + baz + end + EOF + + assert_correct_indenting <<-EOF + bar if foo + something_else + EOF + end + + specify "heredocs" do + assert_correct_indenting <<-EOF + def one + two = <<-THREE + four + THREE + end + EOF + + assert_correct_indenting <<-EOF + def one + two = < 'bar'} + end + EOF + + assert_correct_indenting <<-EOF + def foo(job) + job.do! + end + EOF + end + + specify "blocks with multiline parameters" do + assert_correct_indenting <<-EOF + def foo + opts.on('--coordinator host=HOST[,port=PORT]', + 'Specify the HOST and the PORT of the coordinator') do |str| + h = sub_opts_to_hash(str) + puts h + end + end + EOF + end + + specify "case-insensitive matching" do + @vim.set 'ignorecase' + assert_correct_indenting <<-EOF + module X + Class.new do + end + end + EOF + @vim.set 'ignorecase&' + end + + specify "blocks with tuple arguments" do + assert_correct_indenting <<-EOF + proc do |(a, b)| + puts a + puts b + end + EOF + + assert_correct_indenting <<-EOF + proc do |foo, (a, b), bar| + puts a + puts b + end + EOF + + assert_correct_indenting <<-EOF + proc do |(a, (b, c)), d| + puts a, b + puts c, d + end + EOF + end +end diff --git a/sources_non_forked/vim-ruby/spec/indent/continuations_spec.rb b/sources_non_forked/vim-ruby/spec/indent/continuations_spec.rb new file mode 100644 index 00000000..b24d0f89 --- /dev/null +++ b/sources_non_forked/vim-ruby/spec/indent/continuations_spec.rb @@ -0,0 +1,142 @@ +require 'spec_helper' + +describe "Indenting" do + specify "arrays" do + assert_correct_indenting <<-EOF + foo = [one, + two, + three] + EOF + end + + specify "tricky string interpolation" do + # See https://github.com/vim-ruby/vim-ruby/issues/75 for details + assert_correct_indenting <<-EOF + puts %{\#{}} + puts "OK" + EOF + + assert_correct_indenting <<-EOF + while true + begin + puts %{\#{x}} + rescue ArgumentError + end + end + EOF + end + + specify "continuations after round braces" do + assert_correct_indenting <<-EOF + opts.on('--coordinator host=HOST[,port=PORT]', + 'Specify the HOST and the PORT of the coordinator') do |str| + h = sub_opts_to_hash(str) + puts h + end + EOF + end + + specify "continuations after assignment" do + assert_correct_indenting <<-EOF + variable = + if condition? + 1 + else + 2 + end + EOF + + assert_correct_indenting <<-EOF + variable = # evil comment + case something + when 'something' + something_else + else + other + end + EOF + end + + specify "continuations after hanging comma" do + assert_correct_indenting <<-EOF + array = [ + :one, + ].each do |x| + puts x.to_s + end + EOF + end + + specify "string interpolation" do + # See https://github.com/vim-ruby/vim-ruby/issues/93 for details + assert_correct_indenting <<-EOF + command = %|\#{file}| + settings.log.info("Returning: \#{command}") + EOF + end + + specify "closing bracket not on its own line" do + # See https://github.com/vim-ruby/vim-ruby/issues/81 for details + assert_correct_indenting <<-EOF + one { two >> + three } + four + EOF + end + + specify "lonesome single parenthesis in a method definition" do + # See https://github.com/vim-ruby/vim-ruby/issues/130 for details + assert_correct_indenting <<-EOF + def bar( + baz + ) + return baz+1 + end + EOF + end + + specify "brackets on their own line, followed by a comma" do + # See https://github.com/vim-ruby/vim-ruby/issues/124 for details + assert_correct_indenting <<-EOF + bla = { + :one => [ + {:bla => :blub} + ], + :two => ( + {:blub => :abc} + ), + :three => { + :blub => :abc + }, + :four => 'five' + } + EOF + end + + specify "string with an and#" do + # See https://github.com/vim-ruby/vim-ruby/issues/108 for details + assert_correct_indenting <<-EOF + outside_block "and#" do + inside_block do + end + end + EOF + end + + specify "continuation with a symbol at the end" do + # See https://github.com/vim-ruby/vim-ruby/issues/132 for details + assert_correct_indenting <<-EOF + foo = :+ + # Next indents correctly + EOF + end + + specify "continuation with a hanging comma" do + # See https://github.com/vim-ruby/vim-ruby/issues/139 for details + assert_correct_indenting <<-EOF + thing :foo + thing 'a', + 'b' + EOF + end +end diff --git a/sources_non_forked/vim-ruby/spec/indent/end_constructs_spec.rb b/sources_non_forked/vim-ruby/spec/indent/end_constructs_spec.rb new file mode 100644 index 00000000..e9ae7dad --- /dev/null +++ b/sources_non_forked/vim-ruby/spec/indent/end_constructs_spec.rb @@ -0,0 +1,31 @@ +require 'spec_helper' + +describe "Indenting" do + specify "end constructs" do + assert_correct_indenting <<-EOF + f do + g { def h; end } + end + EOF + + assert_correct_indenting <<-EOF + if foo + bar ; end + something_else + EOF + + assert_correct_indenting <<-EOF + if bar ; end + something_else + EOF + + assert_correct_indenting <<-EOF + foo do + foo = 3 . class + foo = lambda { class One; end } + foo = lambda { |args| class One; end } + foo = bar; class One; end + end + EOF + end +end diff --git a/sources_non_forked/vim-ruby/spec/indent/nesting_spec.rb b/sources_non_forked/vim-ruby/spec/indent/nesting_spec.rb new file mode 100644 index 00000000..7a09d855 --- /dev/null +++ b/sources_non_forked/vim-ruby/spec/indent/nesting_spec.rb @@ -0,0 +1,66 @@ +require 'spec_helper' + +describe "Indenting" do + specify "nested blocks" do + assert_correct_indenting <<-EOF + var.func1(:param => 'value') do + var.func2(:param => 'value') do + puts "test" + end + end + EOF + + assert_correct_indenting <<-EOF + var.func1(:param => 'value') { + var.func2(:param => 'value') { + foo({ bar => baz }) + puts "test one" + puts "test two" + } + } + EOF + + assert_correct_indenting <<-EOF + var. + func1(:param => 'value') { + var.func2(:param => 'value') { + puts "test" + } + } + EOF + end + + specify "nested hashes" do + assert_correct_indenting <<-EOF + foo, bar = { + :bar => { + :one => 'two', + :five => 'six' + } + } + EOF + + assert_correct_indenting <<-EOF + foo, + bar = { + :bar => { + :foo => { 'bar' => 'baz' }, + :one => 'two', + :three => 'four' + } + } + EOF + end + + specify "nested blocks with a continuation and function call inbetween" do + assert_correct_indenting <<-EOF + var. + func1(:param => 'value') { + func1_5(:param => 'value') + var.func2(:param => 'value') { + puts "test" + } + } + EOF + end +end diff --git a/sources_non_forked/vim-ruby/spec/indent/splat_spec.rb b/sources_non_forked/vim-ruby/spec/indent/splat_spec.rb new file mode 100644 index 00000000..235f2528 --- /dev/null +++ b/sources_non_forked/vim-ruby/spec/indent/splat_spec.rb @@ -0,0 +1,46 @@ +require 'spec_helper' + +describe "Indenting" do + specify "splats with blocks in square brackets" do + assert_correct_indenting <<-EOF + x = Foo[* + y do + z + end + ] + EOF + + assert_correct_indenting <<-EOF + x = Foo[* # with a comment + y do + z + end + ] + EOF + end + + specify "splats with blocks in assignment" do + assert_correct_indenting <<-EOF + x = * + array.map do + 3 + end + EOF + end + + specify "splats with blocks in round brackets" do + assert_correct_indenting <<-EOF + x = Foo(*y do + z + end) + EOF + + assert_correct_indenting <<-EOF + x = Foo( + *y do + z + end + ) + EOF + end +end diff --git a/sources_non_forked/vim-ruby/spec/spec_helper.rb b/sources_non_forked/vim-ruby/spec/spec_helper.rb new file mode 100644 index 00000000..a11bb6f1 --- /dev/null +++ b/sources_non_forked/vim-ruby/spec/spec_helper.rb @@ -0,0 +1,44 @@ +require 'tmpdir' +require 'vimrunner' + +module Support + def assert_correct_indenting(string) + whitespace = string.scan(/^\s*/).first + string = string.split("\n").map { |line| line.gsub /^#{whitespace}/, '' }.join("\n").strip + + File.open 'test.rb', 'w' do |f| + f.write string + end + + @vim.edit 'test.rb' + @vim.normal 'gg=G' + @vim.write + + IO.read('test.rb').strip.should eq string + end +end + +RSpec.configure do |config| + include Support + + config.before(:suite) do + VIM = Vimrunner.start_gvim + VIM.prepend_runtimepath(File.expand_path('../..', __FILE__)) + end + + config.after(:suite) do + VIM.kill + end + + config.around(:each) do |example| + @vim = VIM + + # cd into a temporary directory for every example. + Dir.mktmpdir do |dir| + Dir.chdir(dir) do + @vim.command("cd #{dir}") + example.call + end + end + end +end diff --git a/sources_non_forked/vim-ruby/syntax/eruby.vim b/sources_non_forked/vim-ruby/syntax/eruby.vim new file mode 100644 index 00000000..c20b086b --- /dev/null +++ b/sources_non_forked/vim-ruby/syntax/eruby.vim @@ -0,0 +1,74 @@ +" Vim syntax file +" Language: eRuby +" Maintainer: Tim Pope +" URL: https://github.com/vim-ruby/vim-ruby +" Release Coordinator: Doug Kearns + +if exists("b:current_syntax") + finish +endif + +if !exists("main_syntax") + let main_syntax = 'eruby' +endif + +if !exists("g:eruby_default_subtype") + let g:eruby_default_subtype = "html" +endif + +if &filetype =~ '^eruby\.' + let b:eruby_subtype = matchstr(&filetype,'^eruby\.\zs\w\+') +elseif !exists("b:eruby_subtype") && main_syntax == 'eruby' + let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$") + let b:eruby_subtype = matchstr(s:lines,'eruby_subtype=\zs\w\+') + if b:eruby_subtype == '' + let b:eruby_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.erb\|\.eruby\|\.erubis\)\+$','',''),'\.\zs\w\+$') + endif + if b:eruby_subtype == 'rhtml' + let b:eruby_subtype = 'html' + elseif b:eruby_subtype == 'rb' + let b:eruby_subtype = 'ruby' + elseif b:eruby_subtype == 'yml' + let b:eruby_subtype = 'yaml' + elseif b:eruby_subtype == 'js' + let b:eruby_subtype = 'javascript' + elseif b:eruby_subtype == 'txt' + " Conventional; not a real file type + let b:eruby_subtype = 'text' + elseif b:eruby_subtype == '' + let b:eruby_subtype = g:eruby_default_subtype + endif +endif + +if !exists("b:eruby_nest_level") + let b:eruby_nest_level = strlen(substitute(substitute(substitute(expand("%:t"),'@','','g'),'\c\.\%(erb\|rhtml\)\>','@','g'),'[^@]','','g')) +endif +if !b:eruby_nest_level + let b:eruby_nest_level = 1 +endif + +if exists("b:eruby_subtype") && b:eruby_subtype != '' + exe "runtime! syntax/".b:eruby_subtype.".vim" + unlet! b:current_syntax +endif +syn include @rubyTop syntax/ruby.vim + +syn cluster erubyRegions contains=erubyOneLiner,erubyBlock,erubyExpression,erubyComment + +exe 'syn region erubyOneLiner matchgroup=erubyDelimiter start="^%\{1,'.b:eruby_nest_level.'\}%\@!" end="$" contains=@rubyTop containedin=ALLBUT,@erubyRegions keepend oneline' +exe 'syn region erubyBlock matchgroup=erubyDelimiter start="<%\{1,'.b:eruby_nest_level.'\}%\@!-\=" end="[=-]\=%\@" contains=@rubyTop containedin=ALLBUT,@erubyRegions keepend' +exe 'syn region erubyExpression matchgroup=erubyDelimiter start="<%\{1,'.b:eruby_nest_level.'\}=\{1,4}" end="[=-]\=%\@" contains=@rubyTop containedin=ALLBUT,@erubyRegions keepend' +exe 'syn region erubyComment matchgroup=erubyDelimiter start="<%\{1,'.b:eruby_nest_level.'\}-\=#" end="[=-]\=%\@" contains=rubyTodo,@Spell containedin=ALLBUT,@erubyRegions keepend' + +" Define the default highlighting. + +hi def link erubyDelimiter PreProc +hi def link erubyComment Comment + +let b:current_syntax = 'eruby' + +if main_syntax == 'eruby' + unlet main_syntax +endif + +" vim: nowrap sw=2 sts=2 ts=8: diff --git a/sources_non_forked/vim-ruby/syntax/ruby.vim b/sources_non_forked/vim-ruby/syntax/ruby.vim new file mode 100644 index 00000000..3b262677 --- /dev/null +++ b/sources_non_forked/vim-ruby/syntax/ruby.vim @@ -0,0 +1,369 @@ +" Vim syntax file +" Language: Ruby +" Maintainer: Doug Kearns +" URL: https://github.com/vim-ruby/vim-ruby +" Release Coordinator: Doug Kearns +" ---------------------------------------------------------------------------- +" +" Previous Maintainer: Mirko Nasato +" Thanks to perl.vim authors, and to Reimer Behrends. :-) (MN) +" ---------------------------------------------------------------------------- + +if exists("b:current_syntax") + finish +endif + +if has("folding") && exists("ruby_fold") + setlocal foldmethod=syntax +endif + +syn cluster rubyNotTop contains=@rubyExtendedStringSpecial,@rubyRegexpSpecial,@rubyDeclaration,rubyConditional,rubyExceptional,rubyMethodExceptional,rubyTodo + +if exists("ruby_space_errors") + if !exists("ruby_no_trail_space_error") + syn match rubySpaceError display excludenl "\s\+$" + endif + if !exists("ruby_no_tab_space_error") + syn match rubySpaceError display " \+\t"me=e-1 + endif +endif + +" Operators +if exists("ruby_operators") + syn match rubyOperator "[~!^&|*/%+-]\|\%(class\s*\)\@\|<=\|\%(<\|\>\|>=\|=\@\|\*\*\|\.\.\.\|\.\.\|::" + syn match rubyOperator "->\|-=\|/=\|\*\*=\|\*=\|&&=\|&=\|&&\|||=\||=\|||\|%=\|+=\|!\~\|!=" + syn region rubyBracketOperator matchgroup=rubyOperator start="\%(\w[?!]\=\|[]})]\)\@<=\[\s*" end="\s*]" contains=ALLBUT,@rubyNotTop +endif + +" Expression Substitution and Backslash Notation +syn match rubyStringEscape "\\\\\|\\[abefnrstv]\|\\\o\{1,3}\|\\x\x\{1,2}" contained display +syn match rubyStringEscape "\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)" contained display +syn match rubyQuoteEscape "\\[\\']" contained display + +syn region rubyInterpolation matchgroup=rubyInterpolationDelimiter start="#{" end="}" contained contains=ALLBUT,@rubyNotTop +syn match rubyInterpolation "#\%(\$\|@@\=\)\w\+" display contained contains=rubyInterpolationDelimiter,rubyInstanceVariable,rubyClassVariable,rubyGlobalVariable,rubyPredefinedVariable +syn match rubyInterpolationDelimiter "#\ze\%(\$\|@@\=\)\w\+" display contained +syn match rubyInterpolation "#\$\%(-\w\|\W\)" display contained contains=rubyInterpolationDelimiter,rubyPredefinedVariable,rubyInvalidVariable +syn match rubyInterpolationDelimiter "#\ze\$\%(-\w\|\W\)" display contained +syn region rubyNoInterpolation start="\\#{" end="}" contained +syn match rubyNoInterpolation "\\#{" display contained +syn match rubyNoInterpolation "\\#\%(\$\|@@\=\)\w\+" display contained +syn match rubyNoInterpolation "\\#\$\W" display contained + +syn match rubyDelimEscape "\\[(<{\[)>}\]]" transparent display contained contains=NONE + +syn region rubyNestedParentheses start="(" skip="\\\\\|\\)" matchgroup=rubyString end=")" transparent contained +syn region rubyNestedCurlyBraces start="{" skip="\\\\\|\\}" matchgroup=rubyString end="}" transparent contained +syn region rubyNestedAngleBrackets start="<" skip="\\\\\|\\>" matchgroup=rubyString end=">" transparent contained +syn region rubyNestedSquareBrackets start="\[" skip="\\\\\|\\\]" matchgroup=rubyString end="\]" transparent contained + +" These are mostly Oniguruma ready +syn region rubyRegexpComment matchgroup=rubyRegexpSpecial start="(?#" skip="\\)" end=")" contained +syn region rubyRegexpParens matchgroup=rubyRegexpSpecial start="(\(?:\|?<\=[=!]\|?>\|?<[a-z_]\w*>\|?[imx]*-[imx]*:\=\|\%(?#\)\@!\)" skip="\\)" end=")" contained transparent contains=@rubyRegexpSpecial +syn region rubyRegexpBrackets matchgroup=rubyRegexpCharClass start="\[\^\=" skip="\\\]" end="\]" contained transparent contains=rubyStringEscape,rubyRegexpEscape,rubyRegexpCharClass oneline +syn match rubyRegexpCharClass "\\[DdHhSsWw]" contained display +syn match rubyRegexpCharClass "\[:\^\=\%(alnum\|alpha\|ascii\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|xdigit\):\]" contained +syn match rubyRegexpEscape "\\[].*?+^$|\\/(){}[]" contained +syn match rubyRegexpQuantifier "[*?+][?+]\=" contained display +syn match rubyRegexpQuantifier "{\d\+\%(,\d*\)\=}?\=" contained display +syn match rubyRegexpAnchor "[$^]\|\\[ABbGZz]" contained display +syn match rubyRegexpDot "\." contained display +syn match rubyRegexpSpecial "|" contained display +syn match rubyRegexpSpecial "\\[1-9]\d\=\d\@!" contained display +syn match rubyRegexpSpecial "\\k<\%([a-z_]\w*\|-\=\d\+\)\%([+-]\d\+\)\=>" contained display +syn match rubyRegexpSpecial "\\k'\%([a-z_]\w*\|-\=\d\+\)\%([+-]\d\+\)\='" contained display +syn match rubyRegexpSpecial "\\g<\%([a-z_]\w*\|-\=\d\+\)>" contained display +syn match rubyRegexpSpecial "\\g'\%([a-z_]\w*\|-\=\d\+\)'" contained display + +syn cluster rubyStringSpecial contains=rubyInterpolation,rubyNoInterpolation,rubyStringEscape +syn cluster rubyExtendedStringSpecial contains=@rubyStringSpecial,rubyNestedParentheses,rubyNestedCurlyBraces,rubyNestedAngleBrackets,rubyNestedSquareBrackets +syn cluster rubyRegexpSpecial contains=rubyInterpolation,rubyNoInterpolation,rubyStringEscape,rubyRegexpSpecial,rubyRegexpEscape,rubyRegexpBrackets,rubyRegexpCharClass,rubyRegexpDot,rubyRegexpQuantifier,rubyRegexpAnchor,rubyRegexpParens,rubyRegexpComment + +" Numbers and ASCII Codes +syn match rubyASCIICode "\%(\w\|[]})\"'/]\)\@" display +syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@" display +syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@" display +syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@" display +syn match rubyFloat "\%(\%(\w\|[]})\"']\s*\)\@" display +syn match rubyFloat "\%(\%(\w\|[]})\"']\s*\)\@" display + +" Identifiers +syn match rubyLocalVariableOrMethod "\<[_[:lower:]][_[:alnum:]]*[?!=]\=" contains=NONE display transparent +syn match rubyBlockArgument "&[_[:lower:]][_[:alnum:]]" contains=NONE display transparent + +syn match rubyConstant "\%(\%(^\|[^.]\)\.\_s*\)\@\%(\s*(\)\@!" +syn match rubyClassVariable "@@\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*" display +syn match rubyInstanceVariable "@\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*" display +syn match rubyGlobalVariable "$\%(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\|-.\)" +syn match rubySymbol "[]})\"':]\@\|<=\|<\|===\|[=!]=\|[=!]\~\|!\|>>\|>=\|>\||\|-@\|-\|/\|\[]=\|\[]\|\*\*\|\*\|&\|%\|+@\|+\|`\)" +syn match rubySymbol "[]})\"':]\@_,;:!?/.'"@$*\&+0]\)" +syn match rubySymbol "[]})\"':]\@\@!\)\=" +syn match rubySymbol "\%([{(,]\_s*\)\@<=\l\w*[!?]\=::\@!"he=e-1 +syn match rubySymbol "[]})\"':]\@\|{\)\s*\)\@<=|" end="|" oneline display contains=rubyBlockParameter + +syn match rubyInvalidVariable "$[^ A-Za-z_-]" +syn match rubyPredefinedVariable #$[!$&"'*+,./0:;<=>?@\`~]# +syn match rubyPredefinedVariable "$\d\+" display +syn match rubyPredefinedVariable "$_\>" display +syn match rubyPredefinedVariable "$-[0FIKadilpvw]\>" display +syn match rubyPredefinedVariable "$\%(deferr\|defout\|stderr\|stdin\|stdout\)\>" display +syn match rubyPredefinedVariable "$\%(DEBUG\|FILENAME\|KCODE\|LOADED_FEATURES\|LOAD_PATH\|PROGRAM_NAME\|SAFE\|VERBOSE\)\>" display +syn match rubyPredefinedConstant "\%(\%(^\|[^.]\)\.\_s*\)\@\%(\s*(\)\@!" +syn match rubyPredefinedConstant "\%(\%(^\|[^.]\)\.\_s*\)\@\%(\s*(\)\@!" + +" Normal Regular Expression +syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\%(^\|\<\%(and\|or\|while\|until\|unless\|if\|elsif\|when\|not\|then\|else\)\|[;\~=!|&(,[<>?:*+-]\)\s*\)\@<=/" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial fold +syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\h\k*\s\+\)\@<=/[ \t=]\@!" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial fold + +" Generalized Regular Expression +syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\z([~`!@#$%^&*_\-+=|\:;"',.? /]\)" end="\z1[iomxneus]*" skip="\\\\\|\\\z1" contains=@rubyRegexpSpecial fold +syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r{" end="}[iomxneus]*" skip="\\\\\|\\}" contains=@rubyRegexpSpecial fold +syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r<" end=">[iomxneus]*" skip="\\\\\|\\>" contains=@rubyRegexpSpecial,rubyNestedAngleBrackets,rubyDelimEscape fold +syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\[" end="\][iomxneus]*" skip="\\\\\|\\\]" contains=@rubyRegexpSpecial fold +syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r(" end=")[iomxneus]*" skip="\\\\\|\\)" contains=@rubyRegexpSpecial fold + +" Normal String and Shell Command Output +syn region rubyString matchgroup=rubyStringDelimiter start="\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial,@Spell fold +syn region rubyString matchgroup=rubyStringDelimiter start="'" end="'" skip="\\\\\|\\'" contains=rubyQuoteEscape,@Spell fold +syn region rubyString matchgroup=rubyStringDelimiter start="`" end="`" skip="\\\\\|\\`" contains=@rubyStringSpecial fold + +" Generalized Single Quoted String, Symbol and Array of Strings +syn region rubyString matchgroup=rubyStringDelimiter start="%[qwi]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" fold +syn region rubyString matchgroup=rubyStringDelimiter start="%[qwi]{" end="}" skip="\\\\\|\\}" fold contains=rubyNestedCurlyBraces,rubyDelimEscape +syn region rubyString matchgroup=rubyStringDelimiter start="%[qwi]<" end=">" skip="\\\\\|\\>" fold contains=rubyNestedAngleBrackets,rubyDelimEscape +syn region rubyString matchgroup=rubyStringDelimiter start="%[qwi]\[" end="\]" skip="\\\\\|\\\]" fold contains=rubyNestedSquareBrackets,rubyDelimEscape +syn region rubyString matchgroup=rubyStringDelimiter start="%[qwi](" end=")" skip="\\\\\|\\)" fold contains=rubyNestedParentheses,rubyDelimEscape +syn region rubyString matchgroup=rubyStringDelimiter start="%q " end=" " skip="\\\\\|\\)" fold +syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s\z([~`!@#$%^&*_\-+=|\:;"',.? /]\)" end="\z1" skip="\\\\\|\\\z1" fold +syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s{" end="}" skip="\\\\\|\\}" fold contains=rubyNestedCurlyBraces,rubyDelimEscape +syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s<" end=">" skip="\\\\\|\\>" fold contains=rubyNestedAngleBrackets,rubyDelimEscape +syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s\[" end="\]" skip="\\\\\|\\\]" fold contains=rubyNestedSquareBrackets,rubyDelimEscape +syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s(" end=")" skip="\\\\\|\\)" fold contains=rubyNestedParentheses,rubyDelimEscape + +" Generalized Double Quoted String and Array of Strings and Shell Command Output +" Note: %= is not matched here as the beginning of a double quoted string +syn region rubyString matchgroup=rubyStringDelimiter start="%\z([~`!@#$%^&*_\-+|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial fold +syn region rubyString matchgroup=rubyStringDelimiter start="%[QWIx]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial fold +syn region rubyString matchgroup=rubyStringDelimiter start="%[QWIx]\={" end="}" skip="\\\\\|\\}" contains=@rubyStringSpecial,rubyNestedCurlyBraces,rubyDelimEscape fold +syn region rubyString matchgroup=rubyStringDelimiter start="%[QWIx]\=<" end=">" skip="\\\\\|\\>" contains=@rubyStringSpecial,rubyNestedAngleBrackets,rubyDelimEscape fold +syn region rubyString matchgroup=rubyStringDelimiter start="%[QWIx]\=\[" end="\]" skip="\\\\\|\\\]" contains=@rubyStringSpecial,rubyNestedSquareBrackets,rubyDelimEscape fold +syn region rubyString matchgroup=rubyStringDelimiter start="%[QWIx]\=(" end=")" skip="\\\\\|\\)" contains=@rubyStringSpecial,rubyNestedParentheses,rubyDelimEscape fold +syn region rubyString matchgroup=rubyStringDelimiter start="%[Qx] " end=" " skip="\\\\\|\\)" contains=@rubyStringSpecial fold + +" Here Document +syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@>\|[<>]=\=\|<=>\|===\|[=!]=\|[=!]\~\|!\|`\)\%([[:space:];#(]\|$\)\@=" contained containedin=rubyAliasDeclaration,rubyAliasDeclaration2,rubyMethodDeclaration + +syn cluster rubyDeclaration contains=rubyAliasDeclaration,rubyAliasDeclaration2,rubyMethodDeclaration,rubyModuleDeclaration,rubyClassDeclaration,rubyFunction,rubyBlockParameter + +" Keywords +" Note: the following keywords have already been defined: +" begin case class def do end for if module unless until while +syn match rubyControl "\<\%(and\|break\|in\|next\|not\|or\|redo\|rescue\|retry\|return\)\>[?!]\@!" +syn match rubyOperator "\[?!]\@!" +syn match rubyBoolean "\<\%(true\|false\)\>[?!]\@!" +syn match rubyPseudoVariable "\<\%(nil\|self\|__ENCODING__\|__FILE__\|__LINE__\|__callee__\|__method__\)\>[?!]\@!" " TODO: reorganise +syn match rubyBeginEnd "\<\%(BEGIN\|END\)\>[?!]\@!" + +" Expensive Mode - match 'end' with the appropriate opening keyword for syntax +" based folding and special highlighting of module/class/method definitions +if !exists("b:ruby_no_expensive") && !exists("ruby_no_expensive") + syn match rubyDefine "\" nextgroup=rubyAliasDeclaration skipwhite skipnl + syn match rubyDefine "\" nextgroup=rubyMethodDeclaration skipwhite skipnl + syn match rubyDefine "\" nextgroup=rubyFunction skipwhite skipnl + syn match rubyClass "\" nextgroup=rubyClassDeclaration skipwhite skipnl + syn match rubyModule "\" nextgroup=rubyModuleDeclaration skipwhite skipnl + + syn region rubyMethodBlock start="\" matchgroup=rubyDefine end="\%(\" contains=ALLBUT,@rubyNotTop fold + syn region rubyBlock start="\" matchgroup=rubyClass end="\" contains=ALLBUT,@rubyNotTop fold + syn region rubyBlock start="\" matchgroup=rubyModule end="\" contains=ALLBUT,@rubyNotTop fold + + " modifiers + syn match rubyConditionalModifier "\<\%(if\|unless\)\>" display + syn match rubyRepeatModifier "\<\%(while\|until\)\>" display + + syn region rubyDoBlock matchgroup=rubyControl start="\" end="\" contains=ALLBUT,@rubyNotTop fold + " curly bracket block or hash literal + syn region rubyCurlyBlock matchgroup=rubyCurlyBlockDelimiter start="{" end="}" contains=ALLBUT,@rubyNotTop fold + syn region rubyArrayLiteral matchgroup=rubyArrayDelimiter start="\%(\w\|[\]})]\)\@" end="\" contains=ALLBUT,@rubyNotTop fold + syn region rubyCaseExpression matchgroup=rubyConditional start="\" end="\" contains=ALLBUT,@rubyNotTop fold + syn region rubyConditionalExpression matchgroup=rubyConditional start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+=-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@" end="\%(\%(\%(\.\@" contains=ALLBUT,@rubyNotTop fold + + syn match rubyConditional "\<\%(then\|else\|when\)\>[?!]\@!" contained containedin=rubyCaseExpression + syn match rubyConditional "\<\%(then\|else\|elsif\)\>[?!]\@!" contained containedin=rubyConditionalExpression + + syn match rubyExceptional "\<\%(\%(\%(;\|^\)\s*\)\@<=rescue\|else\|ensure\)\>[?!]\@!" contained containedin=rubyBlockExpression + syn match rubyMethodExceptional "\<\%(\%(\%(;\|^\)\s*\)\@<=rescue\|else\|ensure\)\>[?!]\@!" contained containedin=rubyMethodBlock + + " statements with optional 'do' + syn region rubyOptionalDoLine matchgroup=rubyRepeat start="\[?!]\@!" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@" matchgroup=rubyOptionalDo end="\%(\\)" end="\ze\%(;\|$\)" oneline contains=ALLBUT,@rubyNotTop + syn region rubyRepeatExpression start="\[?!]\@!" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@" matchgroup=rubyRepeat end="\" contains=ALLBUT,@rubyNotTop nextgroup=rubyOptionalDoLine fold + + if !exists("ruby_minlines") + let ruby_minlines = 500 + endif + exec "syn sync minlines=" . ruby_minlines + +else + syn match rubyControl "\[?!]\@!" nextgroup=rubyMethodDeclaration skipwhite skipnl + syn match rubyControl "\[?!]\@!" nextgroup=rubyClassDeclaration skipwhite skipnl + syn match rubyControl "\[?!]\@!" nextgroup=rubyModuleDeclaration skipwhite skipnl + syn match rubyControl "\<\%(case\|begin\|do\|for\|if\|unless\|while\|until\|else\|elsif\|ensure\|then\|when\|end\)\>[?!]\@!" + syn match rubyKeyword "\<\%(alias\|undef\)\>[?!]\@!" +endif + +" Special Methods +if !exists("ruby_no_special_methods") + syn keyword rubyAccess public protected private public_class_method private_class_method public_constant private_constant module_function + " attr is a common variable name + syn match rubyAttribute "\%(\%(^\|;\)\s*\)\@<=attr\>\(\s*[.=]\)\@!" + syn keyword rubyAttribute attr_accessor attr_reader attr_writer + syn match rubyControl "\<\%(exit!\|\%(abort\|at_exit\|exit\|fork\|loop\|trap\)\>[?!]\@!\)" + syn keyword rubyEval eval class_eval instance_eval module_eval + syn keyword rubyException raise fail catch throw + " false positive with 'include?' + syn match rubyInclude "\[?!]\@!" + syn keyword rubyInclude autoload extend load prepend require require_relative + syn keyword rubyKeyword callcc caller lambda proc +endif + +" Comments and Documentation +syn match rubySharpBang "\%^#!.*" display +syn keyword rubyTodo FIXME NOTE TODO OPTIMIZE XXX todo contained +syn match rubyComment "#.*" contains=rubySharpBang,rubySpaceError,rubyTodo,@Spell +if !exists("ruby_no_comment_fold") + syn region rubyMultilineComment start="\%(\%(^\s*#.*\n\)\@" transparent contains=NONE +syn match rubyKeywordAsMethod "\%(\%(\.\@" transparent contains=NONE +syn match rubyKeywordAsMethod "\%(\%(\.\@" transparent contains=NONE +syn match rubyKeywordAsMethod "\%(\%(\.\@" transparent contains=NONE + +syn match rubyKeywordAsMethod "\<\%(alias\|begin\|case\|class\|def\|do\|end\)[?!]" transparent contains=NONE +syn match rubyKeywordAsMethod "\<\%(if\|module\|undef\|unless\|until\|while\)[?!]" transparent contains=NONE + +syn match rubyKeywordAsMethod "\%(\%(\.\@" transparent contains=NONE +syn match rubyKeywordAsMethod "\%(\%(\.\@" transparent contains=NONE +syn match rubyKeywordAsMethod "\%(\%(\.\@" transparent contains=NONE +syn match rubyKeywordAsMethod "\%(\%(\.\@" transparent contains=NONE +syn match rubyKeywordAsMethod "\%(\%(\.\@" transparent contains=NONE +syn match rubyKeywordAsMethod "\%(\%(\.\@" transparent contains=NONE + +" __END__ Directive +syn region rubyData matchgroup=rubyDataDirective start="^__END__$" end="\%$" fold + +hi def link rubyClass rubyDefine +hi def link rubyModule rubyDefine +hi def link rubyMethodExceptional rubyDefine +hi def link rubyDefine Define +hi def link rubyFunction Function +hi def link rubyConditional Conditional +hi def link rubyConditionalModifier rubyConditional +hi def link rubyExceptional rubyConditional +hi def link rubyRepeat Repeat +hi def link rubyRepeatModifier rubyRepeat +hi def link rubyOptionalDo rubyRepeat +hi def link rubyControl Statement +hi def link rubyInclude Include +hi def link rubyInteger Number +hi def link rubyASCIICode Character +hi def link rubyFloat Float +hi def link rubyBoolean Boolean +hi def link rubyException Exception +if !exists("ruby_no_identifiers") + hi def link rubyIdentifier Identifier +else + hi def link rubyIdentifier NONE +endif +hi def link rubyClassVariable rubyIdentifier +hi def link rubyConstant Type +hi def link rubyGlobalVariable rubyIdentifier +hi def link rubyBlockParameter rubyIdentifier +hi def link rubyInstanceVariable rubyIdentifier +hi def link rubyPredefinedIdentifier rubyIdentifier +hi def link rubyPredefinedConstant rubyPredefinedIdentifier +hi def link rubyPredefinedVariable rubyPredefinedIdentifier +hi def link rubySymbol Constant +hi def link rubyKeyword Keyword +hi def link rubyOperator Operator +hi def link rubyBeginEnd Statement +hi def link rubyAccess Statement +hi def link rubyAttribute Statement +hi def link rubyEval Statement +hi def link rubyPseudoVariable Constant + +hi def link rubyComment Comment +hi def link rubyData Comment +hi def link rubyDataDirective Delimiter +hi def link rubyDocumentation Comment +hi def link rubyTodo Todo + +hi def link rubyQuoteEscape rubyStringEscape +hi def link rubyStringEscape Special +hi def link rubyInterpolationDelimiter Delimiter +hi def link rubyNoInterpolation rubyString +hi def link rubySharpBang PreProc +hi def link rubyRegexpDelimiter rubyStringDelimiter +hi def link rubySymbolDelimiter rubyStringDelimiter +hi def link rubyStringDelimiter Delimiter +hi def link rubyHeredoc rubyString +hi def link rubyString String +hi def link rubyRegexpEscape rubyRegexpSpecial +hi def link rubyRegexpQuantifier rubyRegexpSpecial +hi def link rubyRegexpAnchor rubyRegexpSpecial +hi def link rubyRegexpDot rubyRegexpCharClass +hi def link rubyRegexpCharClass rubyRegexpSpecial +hi def link rubyRegexpSpecial Special +hi def link rubyRegexpComment Comment +hi def link rubyRegexp rubyString + +hi def link rubyInvalidVariable Error +hi def link rubyError Error +hi def link rubySpaceError rubyError + +let b:current_syntax = "ruby" + +" vim: nowrap sw=2 sts=2 ts=8 noet: From bcbbdb653ef58a0edd92ceecafff135d08c7505e Mon Sep 17 00:00:00 2001 From: Maksim Pecherskiy Date: Mon, 27 Oct 2014 10:50:52 -0700 Subject: [PATCH 17/23] Add override command for sudo save. --- vimrcs/basic.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vimrcs/basic.vim b/vimrcs/basic.vim index 2a1a7ca0..8c17c8c6 100644 --- a/vimrcs/basic.vim +++ b/vimrcs/basic.vim @@ -63,7 +63,7 @@ nmap w :w! " :W sudo saves the file " (useful for handling the permission-denied error) -command W w !sudo tee % > /dev/null +command! W w !sudo tee % > /dev/null """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" @@ -73,7 +73,7 @@ command W w !sudo tee % > /dev/null set so=7 " Avoid garbled characters in Chinese language windows OS -let $LANG='en' +let $LANG='en' set langmenu=en source $VIMRUNTIME/delmenu.vim source $VIMRUNTIME/menu.vim @@ -317,7 +317,7 @@ autocmd BufWrite *.coffee :call DeleteTrailingWS() vnoremap gv :call VisualSelection('gv', '') " Open Ack and put the cursor in the right position -map g :Ack +map g :Ack " When you press r you can search and replace the selected text vnoremap r :call VisualSelection('replace', '') From 6929e35b00bd4bf055ff497becd7f0413727b4c7 Mon Sep 17 00:00:00 2001 From: Maksim Pecherskiy Date: Mon, 27 Oct 2014 11:16:17 -0700 Subject: [PATCH 18/23] Cleaning up my_confs. --- maximum_awesome_vimrc | 114 ------------------------------------------ my_configs.vim | 87 ++++++++++++++++---------------- vimrcs/basic.vim | 19 ++++--- 3 files changed, 54 insertions(+), 166 deletions(-) delete mode 100644 maximum_awesome_vimrc diff --git a/maximum_awesome_vimrc b/maximum_awesome_vimrc deleted file mode 100644 index f040e9bd..00000000 --- a/maximum_awesome_vimrc +++ /dev/null @@ -1,114 +0,0 @@ -" set up pathogen, https://github.com/tpope/vim-pathogen -filetype on " without this vim emits a zero exit status, later, because of :ft off -filetype off -call pathogen#infect() -filetype plugin indent on - -" don't bother with vi compatibility -set nocompatible - -" enable syntax highlighting -syntax enable - -set autoindent -set autoread " reload files when changed on disk, i.e. via `git checkout` -set backspace=2 " Fix broken backspace in some setups -set backupcopy=yes " see :help crontab -set clipboard=unnamed " yank and paste with the system clipboard -set directory-=. " don't store swapfiles in the current directory -set encoding=utf-8 -set expandtab " expand tabs to spaces -set ignorecase " case-insensitive search -set incsearch " search as you type -set laststatus=2 " always show statusline -set list " show trailing whitespace -set listchars=tab:▸\ ,trail:▫ -set number " show line numbers -set ruler " show where you are -set scrolloff=3 " show context above/below cursorline -set shiftwidth=2 " normal mode indentation commands use 2 spaces -set showcmd -set smartcase " case-sensitive search if any caps -set softtabstop=2 " insert mode tab and backspace use 2 spaces -set tabstop=8 " actual tabs occupy 8 characters -set wildignore=log/**,node_modules/**,target/**,tmp/**,*.rbc -set wildmenu " show a navigable menu for tab completion -set wildmode=longest,list,full - -" Enable basic mouse behavior such as resizing buffers. -set mouse=a -if exists('$TMUX') " Support resizing in tmux - set ttymouse=xterm2 -endif - -" keyboard shortcuts -let mapleader = ',' -map h -map j -map k -map l -map l :Align -nmap a :Ack -nmap b :CtrlPBuffer -nmap d :NERDTreeToggle -nmap f :NERDTreeFind -nmap t :CtrlP -nmap T :CtrlPClearCache:CtrlP -nmap ] :TagbarToggle -nmap :call whitespace#strip_trailing() -nmap g :GitGutterToggle -nmap c Kwbd -map V :source ~/.vimrc:filetype detect:exe ":echo 'vimrc reloaded'" - -" plugin settings -let g:ctrlp_match_window = 'order:ttb,max:20' -let g:NERDSpaceDelims=1 -let g:gitgutter_enabled = 0 - -" Use The Silver Searcher https://github.com/ggreer/the_silver_searcher -if executable('ag') - let g:ackprg = 'ag --nogroup --column' - - " Use Ag over Grep - set grepprg=ag\ --nogroup\ --nocolor - - " Use ag in CtrlP for listing files. Lightning fast and respects .gitignore - let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""' -endif - -" fdoc is yaml -autocmd BufRead,BufNewFile *.fdoc set filetype=yaml -" md is markdown -autocmd BufRead,BufNewFile *.md set filetype=markdown -" extra rails.vim help -autocmd User Rails silent! Rnavcommand decorator app/decorators -glob=**/* -suffix=_decorator.rb -autocmd User Rails silent! Rnavcommand observer app/observers -glob=**/* -suffix=_observer.rb -autocmd User Rails silent! Rnavcommand feature features -glob=**/* -suffix=.feature -autocmd User Rails silent! Rnavcommand job app/jobs -glob=**/* -suffix=_job.rb -autocmd User Rails silent! Rnavcommand mediator app/mediators -glob=**/* -suffix=_mediator.rb -autocmd User Rails silent! Rnavcommand stepdefinition features/step_definitions -glob=**/* -suffix=_steps.rb -" automatically rebalance windows on vim resize -autocmd VimResized * :wincmd = - -" Fix Cursor in TMUX -if exists('$TMUX') - let &t_SI = "\Ptmux;\\]50;CursorShape=1\x7\\\" - let &t_EI = "\Ptmux;\\]50;CursorShape=0\x7\\\" -else - let &t_SI = "\]50;CursorShape=1\x7" - let &t_EI = "\]50;CursorShape=0\x7" -endif - -" Go crazy! -if filereadable(expand("~/.vimrc.local")) - " In your .vimrc.local, you might like: - " - " set autowrite - " set nocursorline - " set nowritebackup - " set whichwrap+=<,>,h,l,[,] " Wrap arrow keys between lines - " - " autocmd! bufwritepost .vimrc source ~/.vimrc - " noremap! jj - source ~/.vimrc.local -endif diff --git a/my_configs.vim b/my_configs.vim index 1823396a..34c0685d 100644 --- a/my_configs.vim +++ b/my_configs.vim @@ -1,4 +1,4 @@ -set mouse=a +"set mouse=a colorscheme molokai set background=dark let g:molokai_original = 1 @@ -6,89 +6,88 @@ let g:molokai_original = 1 "syntax enable "set background=dark let g:airline_theme = 'molokai' -set smartindent -autocmd BufWritePre * :FixWhitespace +"set smartindent +"autocmd BufWritePre * :FixWhitespace set timeoutlen=2000 set pastetoggle= -inoremap jk -nnoremap ; : +"inoremap jk +"nnoremap ; : #set colorcolumn=80 " Open Vim, be able to undo -set undodir=$HOME/.vim/undo -set undolevels=1000 -set undoreload=10000 +"set undodir=$HOME/.vim/undo +"set undolevels=1000 +"set undoreload=10000 " System wide copy paste -set clipboard=unnamedplus +"set clipboard=unnamedplus " Make Y behave like other capitals -map Y y$ +"map Y y$ " " " Start scrolling 3 lines before the border set scrolloff=3 " " " Automatically reread files that have been changed externally -set autoread +"set autoread " " " Make ^e and ^y scroll 3 lines instead of 1 -nnoremap 3 -nnoremap 3 +"nnoremap 3 +"nnoremap 3 " " " don't move the cursor after pasting " " (by jumping to back start of previously changed text) -noremap p p`[ -noremap P P`[ +"noremap p p`[ +"noremap P P`[ " " " Reselect visual block after indent/outdent -vnoremap < >gv +"vnoremap < >gv " Turn off the christmas lights -nnoremap :nohlsearch +"nnoremap :nohlsearch " Allow saving as root by w!! -cmap w!! %!sudo tee > /dev/null % +"cmap w!! %!sudo tee > /dev/null % " Finde merge conflict markers -nmap cf /\v^[<=>]{7}( .*\|$) +"nmap cf /\v^[<=>]{7}( .*\|$) " Use Marked.app to preview Markdown files... -function! s:setupMarkup() - nnoremap p :silent !open -a Marked.app '%:p' -endfunction +"function! s:setupMarkup() +" nnoremap p :silent !open -a Marked.app '%:p' +"endfunction " Navigate splits more easily -map h -map j -map k -map l +"map h +"map j +"map k +"map l " " These makes j/k move up/down a screen line instead of a physical file line (for wrapped lines) -nmap k gk -nmap j gj +"nmap k gk +"nmap j gj " autocmd BufEnter * if &modifiable | NERDTreeFind | wincmd p | endif " Easymotion {{{ -let g:EasyMotion_do_mapping = 0 +"let g:EasyMotion_do_mapping = 0 -nnoremap f :call EasyMotion#F(0, 0) -onoremap f :call EasyMotion#F(0, 0) -vnoremap f :call EasyMotion#F(1, 0) +"nnoremap f :call EasyMotion#F(0, 0) +"onoremap f :call EasyMotion#F(0, 0) +"vnoremap f :call EasyMotion#F(1, 0) -nnoremap F :call EasyMotion#F(0, 1) -onoremap F :call EasyMotion#F(0, 1) -vnoremap F :call EasyMotion#F(1, 1) +"nnoremap F :call EasyMotion#F(0, 1) +"onoremap F :call EasyMotion#F(0, 1) +"vnoremap F :call EasyMotion#F(1, 1) -onoremap t :call EasyMotion#T(0, 0) -onoremap T :call EasyMotion#T(0, 1) +"onoremap t :call EasyMotion#T(0, 0) +"onoremap T :call EasyMotion#T(0, 1) " }}} -source ~/.vim_runtime/maximum_awesome_vimrc +"source ~/.vim_runtime/maximum_awesome_vimrc -set tabstop=2 -set shiftwidth=2 -set expandtab -set smartindent -set autoindent +"set tabstop=2 +"set shiftwidth=2 +"set expandtab +"set smartindentl:s diff --git a/vimrcs/basic.vim b/vimrcs/basic.vim index 8c17c8c6..f3fb5740 100644 --- a/vimrcs/basic.vim +++ b/vimrcs/basic.vim @@ -176,7 +176,6 @@ set nobackup set nowb set noswapfile - """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => Text, tab and indent related """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" @@ -283,6 +282,9 @@ set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => Editing mappings """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Remap ; to : +nnoremap ; : + " Remap VIM 0 to first non-blank character map 0 ^ @@ -300,13 +302,14 @@ if has("mac") || has("macunix") endif " Delete trailing white space on save, useful for Python and CoffeeScript ;) -func! DeleteTrailingWS() - exe "normal mz" - %s/\s\+$//ge - exe "normal `z" -endfunc -autocmd BufWrite *.py :call DeleteTrailingWS() -autocmd BufWrite *.coffee :call DeleteTrailingWS() +"func! DeleteTrailingWS() + "exe "normal mz" + "%s/\s\+$//ge + "exe "normal `z" +"endfunc +"autocmd BufWrite *.py :call DeleteTrailingWS() +"autocmd BufWrite *.coffee :call DeleteTrailingWS() +autocmd BufWritePre * :FixWhitespace """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" From 505987db7aa9913f74f3e9b11bec2fae569295e1 Mon Sep 17 00:00:00 2001 From: Maksim Pecherskiy Date: Mon, 27 Oct 2014 11:19:46 -0700 Subject: [PATCH 19/23] More cleanups. --- deprecated_maximum_awesome_vimrc | 114 +++++++++++++++++++++++++++++++ my_configs.vim | 2 +- vimrcs/plugins_config.vim | 7 +- 3 files changed, 119 insertions(+), 4 deletions(-) create mode 100644 deprecated_maximum_awesome_vimrc diff --git a/deprecated_maximum_awesome_vimrc b/deprecated_maximum_awesome_vimrc new file mode 100644 index 00000000..f040e9bd --- /dev/null +++ b/deprecated_maximum_awesome_vimrc @@ -0,0 +1,114 @@ +" set up pathogen, https://github.com/tpope/vim-pathogen +filetype on " without this vim emits a zero exit status, later, because of :ft off +filetype off +call pathogen#infect() +filetype plugin indent on + +" don't bother with vi compatibility +set nocompatible + +" enable syntax highlighting +syntax enable + +set autoindent +set autoread " reload files when changed on disk, i.e. via `git checkout` +set backspace=2 " Fix broken backspace in some setups +set backupcopy=yes " see :help crontab +set clipboard=unnamed " yank and paste with the system clipboard +set directory-=. " don't store swapfiles in the current directory +set encoding=utf-8 +set expandtab " expand tabs to spaces +set ignorecase " case-insensitive search +set incsearch " search as you type +set laststatus=2 " always show statusline +set list " show trailing whitespace +set listchars=tab:▸\ ,trail:▫ +set number " show line numbers +set ruler " show where you are +set scrolloff=3 " show context above/below cursorline +set shiftwidth=2 " normal mode indentation commands use 2 spaces +set showcmd +set smartcase " case-sensitive search if any caps +set softtabstop=2 " insert mode tab and backspace use 2 spaces +set tabstop=8 " actual tabs occupy 8 characters +set wildignore=log/**,node_modules/**,target/**,tmp/**,*.rbc +set wildmenu " show a navigable menu for tab completion +set wildmode=longest,list,full + +" Enable basic mouse behavior such as resizing buffers. +set mouse=a +if exists('$TMUX') " Support resizing in tmux + set ttymouse=xterm2 +endif + +" keyboard shortcuts +let mapleader = ',' +map h +map j +map k +map l +map l :Align +nmap a :Ack +nmap b :CtrlPBuffer +nmap d :NERDTreeToggle +nmap f :NERDTreeFind +nmap t :CtrlP +nmap T :CtrlPClearCache:CtrlP +nmap ] :TagbarToggle +nmap :call whitespace#strip_trailing() +nmap g :GitGutterToggle +nmap c Kwbd +map V :source ~/.vimrc:filetype detect:exe ":echo 'vimrc reloaded'" + +" plugin settings +let g:ctrlp_match_window = 'order:ttb,max:20' +let g:NERDSpaceDelims=1 +let g:gitgutter_enabled = 0 + +" Use The Silver Searcher https://github.com/ggreer/the_silver_searcher +if executable('ag') + let g:ackprg = 'ag --nogroup --column' + + " Use Ag over Grep + set grepprg=ag\ --nogroup\ --nocolor + + " Use ag in CtrlP for listing files. Lightning fast and respects .gitignore + let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""' +endif + +" fdoc is yaml +autocmd BufRead,BufNewFile *.fdoc set filetype=yaml +" md is markdown +autocmd BufRead,BufNewFile *.md set filetype=markdown +" extra rails.vim help +autocmd User Rails silent! Rnavcommand decorator app/decorators -glob=**/* -suffix=_decorator.rb +autocmd User Rails silent! Rnavcommand observer app/observers -glob=**/* -suffix=_observer.rb +autocmd User Rails silent! Rnavcommand feature features -glob=**/* -suffix=.feature +autocmd User Rails silent! Rnavcommand job app/jobs -glob=**/* -suffix=_job.rb +autocmd User Rails silent! Rnavcommand mediator app/mediators -glob=**/* -suffix=_mediator.rb +autocmd User Rails silent! Rnavcommand stepdefinition features/step_definitions -glob=**/* -suffix=_steps.rb +" automatically rebalance windows on vim resize +autocmd VimResized * :wincmd = + +" Fix Cursor in TMUX +if exists('$TMUX') + let &t_SI = "\Ptmux;\\]50;CursorShape=1\x7\\\" + let &t_EI = "\Ptmux;\\]50;CursorShape=0\x7\\\" +else + let &t_SI = "\]50;CursorShape=1\x7" + let &t_EI = "\]50;CursorShape=0\x7" +endif + +" Go crazy! +if filereadable(expand("~/.vimrc.local")) + " In your .vimrc.local, you might like: + " + " set autowrite + " set nocursorline + " set nowritebackup + " set whichwrap+=<,>,h,l,[,] " Wrap arrow keys between lines + " + " autocmd! bufwritepost .vimrc source ~/.vimrc + " noremap! jj + source ~/.vimrc.local +endif diff --git a/my_configs.vim b/my_configs.vim index 34c0685d..1f9a3d17 100644 --- a/my_configs.vim +++ b/my_configs.vim @@ -5,7 +5,7 @@ let g:molokai_original = 1 "colorscheme solarized "syntax enable "set background=dark -let g:airline_theme = 'molokai' +"let g:airline_theme = 'molokai' "set smartindent "autocmd BufWritePre * :FixWhitespace set timeoutlen=2000 diff --git a/vimrcs/plugins_config.vim b/vimrcs/plugins_config.vim index fc0072bd..1345d2f6 100644 --- a/vimrcs/plugins_config.vim +++ b/vimrcs/plugins_config.vim @@ -1,5 +1,5 @@ """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" Important: +" Important: " This requries that you install https://github.com/amix/vimrc ! " """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" @@ -77,7 +77,7 @@ set grepprg=/bin/grep\ -nH " => Nerd Tree """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" map nn :NERDTreeToggle -map nb :NERDTreeFromBookmark +map nb :NERDTreeFromBookmark map nf :NERDTreeFind @@ -98,7 +98,8 @@ au FileType mako vmap Si S"i${ _(2f"a) } """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => vim-airline config (force color) """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -let g:airline_theme="luna" +"let g:airline_theme="luna" +let g:airline_theme="molokai" """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => Vimroom From 686d2e7d437cadf2a6f32e21a5e8688e205d5459 Mon Sep 17 00:00:00 2001 From: Maksim Pecherskiy Date: Mon, 27 Oct 2014 13:32:12 -0700 Subject: [PATCH 20/23] Cleanup. --- my_configs.vim | 38 +- sources_non_forked/bufexplorer/README.md | 39 - .../bufexplorer/doc/bufexplorer.txt | 513 -------- .../bufexplorer/plugin/bufexplorer.vim | 1162 ----------------- vimrcs/filetypes.vim | 44 +- vimrcs/plugins_config.vim | 5 + 6 files changed, 74 insertions(+), 1727 deletions(-) delete mode 100644 sources_non_forked/bufexplorer/README.md delete mode 100644 sources_non_forked/bufexplorer/doc/bufexplorer.txt delete mode 100644 sources_non_forked/bufexplorer/plugin/bufexplorer.vim diff --git a/my_configs.vim b/my_configs.vim index 1f9a3d17..53e91257 100644 --- a/my_configs.vim +++ b/my_configs.vim @@ -1,11 +1,38 @@ +"Switch color schemes" +function! ColorSet(colorName) + if a:colorName == "default" + colorscheme molokai + set background=light + let g:molokai_original=1 + let g:airline_theme = 'molokai' + elseif a:colorName == "outside" + colorscheme solarized + set background=light + let g:airline_theme = 'molokai' + elseif a:colorName == "bluey" + colorscheme solarized + set background=dark + let g:airline_theme = 'molokai' + else + echo "you fucked up" + endif +endfunction + +:command -nargs=1 ColorSet :call ColorSet() + +if !empty($VIM_COLOR) + :call ColorSet($VIM_COLOR) +else + :call ColorSet("default") +endif + + "set mouse=a -colorscheme molokai -set background=dark -let g:molokai_original = 1 +"set background=dark +"let g:molokai_original = 1 "colorscheme solarized "syntax enable "set background=dark -"let g:airline_theme = 'molokai' "set smartindent "autocmd BufWritePre * :FixWhitespace set timeoutlen=2000 @@ -91,3 +118,6 @@ set scrolloff=3 "set shiftwidth=2 "set expandtab "set smartindentl:s +" +" + diff --git a/sources_non_forked/bufexplorer/README.md b/sources_non_forked/bufexplorer/README.md deleted file mode 100644 index f34dab5e..00000000 --- a/sources_non_forked/bufexplorer/README.md +++ /dev/null @@ -1,39 +0,0 @@ -created by ---------- -[jeff lanzarotta](http://www.vim.org/account/profile.php?user_id=97) - -script type ----------- -utility - -description ------------ -With bufexplorer, you can quickly and easily switch between buffers by using the one of the default public interfaces: - - '\be' (normal open) or - '\bs' (force horizontal split open) or - '\bv' (force vertical split open) - -Once the bufexplorer window is open you can use the normal movement keys (hjkl) to move around and then use or to select the buffer you would like to open. If you would like to have the selected buffer opened in a new tab, simply press either or 't'. Please note that when opening a buffer in a tab, that if the buffer is already in another tab, bufexplorer can switch to that tab automatically for you if you would like. More about that in the supplied VIM help. - -Bufexplorer also offers various options including: - -* Display the list of buffers in various sort orders including: - * Most Recently Used (MRU) which is the default - * Buffer number - * File name - * File extension - * Full file path name -* Delete buffer from list - -For more about options, sort orders, configuration options, etc. please see the supplied VIM help. - -install details ---------------- -Simply unzip bufexplorer.zip into a directory in your 'runtimepath', usually ~/.vim or c:\vimfiles, and restart Vim. This zip file contains plugin\bufexplorer.vim, and doc\bufexplorer.txt. See ':help add-local-help' on how to add bufexplorer.txt to vim's help system. - -NOTE ----- -Version 7.0.12 and above will ONLY work with 7.0 and above of Vim. - -**IMPORTANT**: If you have a version prior to 7.1.2 that contains an autoload\bufexplorer.vim file, please REMOVE the autoload\bufexlorer.vim AND the plugin\bufexplorer.vim files before installing a new version. diff --git a/sources_non_forked/bufexplorer/doc/bufexplorer.txt b/sources_non_forked/bufexplorer/doc/bufexplorer.txt deleted file mode 100644 index 06e92237..00000000 --- a/sources_non_forked/bufexplorer/doc/bufexplorer.txt +++ /dev/null @@ -1,513 +0,0 @@ -*bufexplorer.txt* Buffer Explorer Last Change: 22 Oct 2010 - -Buffer Explorer *buffer-explorer* *bufexplorer* - Version 7.2.8 - -Plugin for easily exploring (or browsing) Vim |:buffers|. - -|bufexplorer-installation| Installation -|bufexplorer-usage| Usage -|bufexplorer-windowlayout| Window Layout -|bufexplorer-customization| Customization -|bufexplorer-changelog| Change Log -|bufexplorer-todo| Todo -|bufexplorer-credits| Credits - -For Vim version 7.0 and above. -This plugin is only available if 'compatible' is not set. - -{Vi does not have any of this} - -============================================================================== -INSTALLATION *bufexplorer-installation* - -To install: - - Download the bufexplorer.zip. - - Extract the zip archive into your runtime directory. - The archive contains plugin/bufexplorer.vim, and doc/bufexplorer.txt. - - Start Vim or goto an existing instance of Vim. - - Execute the following command: -> - :helptag /doc -< - This will generate all the help tags for any file located in the doc - directory. - -============================================================================== -USAGE *bufexplorer-usage* - -To start exploring in the current window, use: > - \be or :BufExplorer -To start exploring in a newly split horizontal window, use: > - \bs or :BufExplorerHorizontalSplit -To start exploring in a newly split vertical window, use: > - \bv or :BufExplorerVerticalSplit - -If you would like to use something other than '\', you may simply change the -leader (see |mapleader|). - -Note: If the current buffer is modified when bufexplorer started, the current - window is always split and the new bufexplorer is displayed in that new - window. - -Commands to use once exploring: - - Toggle help information. - Opens the buffer that is under the cursor into the current - window. - Opens the buffer that is under the cursor into the current - window. - Opens the buffer that is under the cursor in another tab. - d |:delete|the buffer under the cursor from the list. The - buffer's 'buflisted' is cleared. This allows for the buffer to - be displayed again using the 'show unlisted' command. - R Toggles relative path/absolute path. - T Toggles to show only buffers for this tab or not. - D |:wipeout|the buffer under the cursor from the list. When a - buffers is wiped, it will not be shown when unlisted buffer are - displayed. - f Toggles whether you are taken to the active window when - selecting a buffer or not. - o Opens the buffer that is under the cursor into the current - window. - p Toggles the showing of a split filename/pathname. - q Quit exploring. - r Reverses the order the buffers are listed in. - s Selects the order the buffers are listed in. Either by buffer - number, file name, file extension, most recently used (MRU), or - full path. - t Opens the buffer that is under the cursor in another tab. - u Toggles the showing of "unlisted" buffers. - -Once invoked, Buffer Explorer displays a sorted list (MRU is the default -sort method) of all the buffers that are currently opened. You are then -able to move the cursor to the line containing the buffer's name you are -wanting to act upon. Once you have selected the buffer you would like, -you can then either open it, close it(delete), resort the list, reverse -the sort, quit exploring and so on... - -=============================================================================== -WINDOW LAYOUT *bufexplorer-windowlayout* - -------------------------------------------------------------------------------- -" Press for Help -" Sorted by mru | Locate buffer | Absolute Split path -"= - 01 %a bufexplorer.txt C:\Vim\vimfiles\doc line 87 - 02 # bufexplorer.vim c:\Vim\vimfiles\plugin line 1 -------------------------------------------------------------------------------- - | | | | | - | | | | +-- Current Line #. - | | | +-- Relative/Full Path - | | +-- Buffer Name. - | +-- Buffer Attributes. See|:buffers|for more information. - +-- Buffer Number. See|:buffers|for more information. - -=============================================================================== -CUSTOMIZATION *bufexplorer-customization* - - *g:bufExplorerChgWin* -If set, bufexplorer will bring up the selected buffer in the window specified -by g:bufExplorerChgWin. - - *g:bufExplorerDefaultHelp* -To control whether the default help is displayed or not, use: > - let g:bufExplorerDefaultHelp=0 " Do not show default help. - let g:bufExplorerDefaultHelp=1 " Show default help. -The default is to show the default help. - - *g:bufExplorerDetailedHelp* -To control whether detailed help is display by, use: > - let g:bufExplorerDetailedHelp=0 " Do not show detailed help. - let g:bufExplorerDetailedHelp=1 " Show detailed help. -The default is NOT to show detailed help. - - *g:bufExplorerFindActive* -To control whether you are taken to the active window when selecting a buffer, -use: > - let g:bufExplorerFindActive=0 " Do not go to active window. - let g:bufExplorerFindActive=1 " Go to active window. -The default is to be taken to the active window. - - *g:bufExplorerFuncRef* -When a buffer is selected, the functions specified either singly or as a list -will be called. - - *g:bufExplorerReverseSort* -To control whether to sort the buffer in reverse order or not, use: > - let g:bufExplorerReverseSort=0 " Do not sort in reverse order. - let g:bufExplorerReverseSort=1 " Sort in reverse order. -The default is NOT to sort in reverse order. - - *g:bufExplorerShowDirectories* -Directories usually show up in the list from using a command like ":e .". -To control whether to show directories in the buffer list or not, use: > - let g:bufExplorerShowDirectories=1 " Show directories. - let g:bufExplorerShowDirectories=0 " Don't show directories. -The default is to show directories. - - *g:bufExplorerShowRelativePath* -To control whether to show absolute paths or relative to the current -directory, use: > - let g:bufExplorerShowRelativePath=0 " Show absolute paths. - let g:bufExplorerShowRelativePath=1 " Show relative paths. -The default is to show absolute paths. - - *g:bufExplorerShowTabBuffer* -To control weither or not to show buffers on for the specific tab or not, use: > - let g:bufExplorerShowTabBuffer=0 " No. - let g:bufExplorerShowTabBuffer=1 " Yes. -The default is not to show. - - *g:bufExplorerShowUnlisted* -To control whether to show unlisted buffer or not, use: > - let g:bufExplorerShowUnlisted=0 " Do not show unlisted buffers. - let g:bufExplorerShowUnlisted=1 " Show unlisted buffers. -The default is to NOT show unlisted buffers. - - *g:bufExplorerSortBy* -To control what field the buffers are sorted by, use: > - let g:bufExplorerSortBy='extension' " Sort by file extension. - let g:bufExplorerSortBy='fullpath' " Sort by full file path name. - let g:bufExplorerSortBy='mru' " Sort by most recently used. - let g:bufExplorerSortBy='name' " Sort by the buffer's name. - let g:bufExplorerSortBy='number' " Sort by the buffer's number. -The default is to sort by mru. - - *g:bufExplorerSplitBelow* -To control where the new split window will be placed above or below the -current window, use: > - let g:bufExplorerSplitBelow=1 " Split new window below current. - let g:bufExplorerSplitBelow=0 " Split new window above current. -The default is to use what ever is set by the global &splitbelow -variable. - - *g:bufExplorerSplitOutPathName* -To control whether to split out the path and file name or not, use: > - let g:bufExplorerSplitOutPathName=1 " Split the path and file name. - let g:bufExplorerSplitOutPathName=0 " Don't split the path and file - " name. -The default is to split the path and file name. - - *g:bufExplorerSplitRight* -To control where the new vsplit window will be placed to the left or right of -current window, use: > - let g:bufExplorerSplitRight=0 " Split left. - let g:bufExplorerSplitRight=1 " Split right. -The default is to use the global &splitright. - -=============================================================================== -CHANGE LOG *bufexplorer-changelog* - -7.2.8 - Enhancements: - * Thanks to Charles Campbell for integrating bufexplorer with GDBMGR. - http://mysite.verizon.net/astronaut/vim/index.html#GDBMGR -7.2.7 - Fix: - * My 1st attempt to fix the "cache" issue where buffers information - has changed but the cache/display does not reflect those changes. - More work still needs to be done. -7.2.6 - Fix: - * Thanks to Michael Henry for pointing out that I totally forgot to - update the inline help to reflect the previous change to the 'd' - and 'D' keys. Opps! -7.2.5 - Fix: - * Philip Morant suggested switching the command (bwipe) associated - with the 'd' key with the command (bdelete) associated with the 'D' - key. This made sense since the 'd' key is more likely to be used - compared to the 'D' key. -7.2.4 - Fix: - * I did not implement the patch provided by Godefroid Chapelle - correctly. I missed one line which happened to be the most - important one :) -7.2.3 - Enhancements: - * Thanks to David Fishburn for helping me out with a much needed - code overhaul as well as some awesome performance enhancements. - He also reworked the handling of tabs. - * Thanks to Vladimir Dobriakov for making the suggestions on - enhancing the documentation to include a better explaination of - what is contained in the main bufexplorer window. - * Thanks to Yuriy Ershov for added code that when the bufexplorer - window is opened, the cursor is now positioned at the line with the - active buffer (useful in non-MRU sort modes). - * Yuriy also added the abiltiy to cycle through the sort fields in - reverse order. - Fixes: - * Thanks to Michael Henry for supplying a patch that allows - bufexplorer to be opened even when there is one buffer or less. - * Thanks to Godefroid Chapelle for supplying a patch that fixed - MRU sort order after loading a session. -7.2.2 - Fixes: - * Thanks to David L. Dight for spotting and fixing an issue when - using ctrl^. bufexplorer would incorrectly handle the previous - buffer so that when ctrl^ was pressed the incorrect file was opened. -7.2.1 - Fixes: - * Thanks to Dimitar for spotting and fixing a feature that was - inadvertently left out of the previous version. The feature was - when bufexplorer was used together with WinManager, you could use - the tab key to open a buffer in a split window. -7.2.0 - Enhancements: - * For all those missing the \bs and \bv commands, these have now - returned. Thanks to Phil O'Connell for asking for the return of - these missing features and helping test out this version. - Fixes: - * Fixed problem with the bufExplorerFindActive code not working - correctly. - * Fixed an incompatibility between bufexplorer and netrw that caused - buffers to be incorrectly removed from the MRU list. -7.1.7 - Fixes: - * TaCahiroy fixed several issues related to opening a buffer in a - tab. -7.1.6 - Fixes: - * Removed ff=unix from modeline in bufexplorer.txt. Found by Bill - McCarthy. -7.1.5 - Fixes: - * Could not open unnamed buffers. Fixed by TaCahiroy. -7.1.4 - Fixes: - * Sometimes when a file's path has 'white space' in it, extra buffers - would be created containing each piece of the path. i.e: - opening c:\document and settings\test.txt would create a buffer - named "and" and a buffer named "Documents". This was reported and - fixed by TaCa Yoss. -7.1.3 - Fixes: - * Added code to allow only one instance of the plugin to run at a - time. Thanks Dennis Hostetler. -7.1.2 - Fixes: - * Fixed a jumplist issue spotted by JiangJun. I overlooked the - 'jumplist' and with a couple calls to 'keepjumps', everything is - fine again. - * Went back to just having a plugin file, no autoload file. By having - the autoload, WinManager was no longer working and without really - digging into the cause, it was easier to go back to using just a - plugin file. -7.1.1 - Fixes: - * A problem spotted by Thomas Arendsen Hein. - When running Vim (7.1.94), error E493 was being thrown. - Enhancements: - * Added 'D' for 'delete' buffer as the 'd' command was a 'wipe' - buffer. -7.1.0 - Another 'major' update, some by Dave Larson, some by me. - * Making use of 'autoload' now to make the plugin load quicker. - * Removed '\bs' and '\bv'. These are now controlled by the user. The - user can issue a ':sp' or ':vs' to create a horizontal or vertical - split window and then issue a '\be' - * Added handling of tabs. -7.0.17 - Fixed issue with 'drop' command. - Various enhancements and improvements. -7.0.16 - Fixed issue reported by Liu Jiaping on non Windows systems, which was - ... - Open file1, open file2, modify file1, open bufexplorer, you get the - following error: - - --------8<-------- - Error detected while processing function - 14_StartBufExplorer..14_SplitOpen: - line 4: - E37: No write since last change (add ! to override) - - But the worse thing is, when I want to save the current buffer and - type ':w', I get another error message: - E382: Cannot write, 'buftype' option is set - --------8<-------- - -7.0.15 - Thanks to Mark Smithfield for suggesting bufexplorer needed to handle - the ':args' command. -7.0.14 - Thanks to Randall Hansen for removing the requirement of terminal - versions to be recompiled with 'gui' support so the 'drop' command - would work. The 'drop' command is really not needed in terminal - versions. -7.0.13 - Fixed integration with WinManager. - Thanks to Dave Eggum for another update. - - Fix: The detailed help didn't display the mapping for toggling - the split type, even though the split type is displayed. - - Fixed incorrect description in the detailed help for toggling - relative or full paths. - - Deprecated s:ExtractBufferNbr(). Vim's str2nr() does the same - thing. - - Created a s:Set() function that sets a variable only if it hasn't - already been defined. It's useful for initializing all those - default settings. - - Removed checks for repetitive command definitions. They were - unnecessary. - - Made the help highlighting a little more fancy. - - Minor reverse compatibility issue: Changed ambiguous setting - names to be more descriptive of what they do (also makes the code - easier to follow): - Changed bufExplorerSortDirection to bufExplorerReverseSort - Changed bufExplorerSplitType to bufExplorerSplitVertical - Changed bufExplorerOpenMode to bufExplorerUseCurrentWindow - - When the BufExplorer window closes, all the file-local marks are - now deleted. This may have the benefit of cleaning up some of the - jumplist. - - Changed the name of the parameter for StartBufExplorer from - "split" to "open". The parameter is a string which specifies how - the buffer will be open, not if it is split or not. - - Deprecated DoAnyMoreBuffersExist() - it is a one line function - only used in one spot. - - Created four functions (SplitOpen(), RebuildBufferList(), - UpdateHelpStatus() and ReSortListing()) all with one purpose - to - reduce repeated code. - - Changed the name of AddHeader() to CreateHelp() to be more - descriptive of what it does. It now returns an array instead of - updating the window directly. This has the benefit of making the - code more efficient since the text the function returns is used a - little differently in the two places the function is called. - - Other minor simplifications. -7.0.12 - MAJOR Update. - This version will ONLY run with Vim version 7.0 or greater. - Dave Eggum has made some 'significant' updates to this latest - version: - - Added BufExplorerGetAltBuf() global function to be used in the - users rulerformat. - - Added g:bufExplorerSplitRight option. - - Added g:bufExplorerShowRelativePath option with mapping. - - Added current line highlighting. - - The split type can now be changed whether bufexplorer is opened - in split mode or not. - - Various major and minor bug fixes and speed improvements. - - Sort by extension. - Other improvements/changes: - - Changed the help key from '?' to to be more 'standard'. - - Fixed splitting of vertical bufexplorer window. - Hopefully I have not forgot something :) -7.0.11 - Fixed a couple of highlighting bugs, reported by David Eggum. He also - changed passive voice to active on a couple of warning messages. -7.0.10 - Fixed bug report by Xiangjiang Ma. If the 'ssl' option is set, - the slash character used when displaying the path was incorrect. -7.0.9 - Martin Grenfell found and eliminated an annoying bug in the - bufexplorer/winmanager integration. The bug was were an - annoying message would be displayed when a window was split or - a new file was opened in a new window. Thanks Martin! -7.0.8 - Thanks to Mike Li for catching a bug in the WinManager integration. - The bug was related to the incorrect displaying of the buffer - explorer's window title. -7.0.7 - Thanks to Jeremy Cowgar for adding a new enhancement. This - enhancement allows the user to press 'S', that is capital S, which - will open the buffer under the cursor in a newly created split - window. -7.0.6 - Thanks to Larry Zhang for finding a bug in the "split" buffer code. - If you force set g:bufExplorerSplitType='v' in your vimrc, and if you - tried to do a \bs to split the bufexplorer window, it would always - split horizontal, not vertical. He also found that I had a typeo in - that the variable g:bufExplorerSplitVertSize was all lower case in - the documentation which was incorrect. -7.0.5 - Thanks to Mun Johl for pointing out a bug that if a buffer was - modified, the '+' was not showing up correctly. -7.0.4 - Fixed a problem discovered first by Xiangjiang Ma. Well since I've - been using vim 7.0 and not 6.3, I started using a function (getftype) - that is not in 6.3. So for backward compatibility, I conditionaly use - this function now. Thus, the g:bufExplorerShowDirectories feature is - only available when using vim 7.0 and above. -7.0.3 - Thanks to Erwin Waterlander for finding a problem when the last - buffer was deleted. This issue got me to rewrite the buffer display - logic (which I've wanted to do for sometime now). - Also great thanks to Dave Eggum for coming up with idea for - g:bufExplorerShowDirectories. Read the above information about this - feature. -7.0.2 - Thanks to Thomas Arendsen Hein for finding a problem when a user - has the default help turned off and then brought up the explorer. An - E493 would be displayed. -7.0.1 - Thanks to Erwin Waterlander for finding a couple problems. - The first problem allowed a modified buffer to be deleted. Opps! The - second problem occurred when several files were opened, BufExplorer - was started, the current buffer was deleted using the 'd' option, and - then BufExplorer was exited. The deleted buffer was still visible - while it is not in the buffers list. Opps again! -7.0.0 - Thanks to Shankar R. for suggesting to add the ability to set - the fixed width (g:bufExplorerSplitVertSize) of a new window - when opening bufexplorer vertically and fixed height - (g:bufExplorerSplitHorzSize) of a new window when opening - bufexplorer horizontally. By default, the windows are normally - split to use half the existing width or height. -6.3.0 - Added keepjumps so that the jumps list would not get cluttered with - bufexplorer related stuff. -6.2.3 - Thanks to Jay Logan for finding a bug in the vertical split position - of the code. When selecting that the window was to be split - vertically by doing a '\bv', from then on, all splits, i.e. '\bs', - were split vertically, even though g:bufExplorerSplitType was not set - to 'v'. -6.2.2 - Thanks to Patrik Modesto for adding a small improvement. For some - reason his bufexplorer window was always showing up folded. He added - 'setlocal nofoldenable' and it was fixed. -6.2.1 - Thanks goes out to Takashi Matsuo for added the 'fullPath' sorting - logic and option. -6.2.0 - Thanks goes out to Simon Johann-Ganter for spotting and fixing a - problem in that the last search pattern is overridden by the search - pattern for blank lines. -6.1.6 - Thanks to Artem Chuprina for finding a pesky bug that has been around - for sometime now. The key mapping was causing the buffer - explored to close prematurely when vim was run in an xterm. The - key mapping is now removed. -6.1.5 - Thanks to Khorev Sergey. Added option to show default help or not. -6.1.4 - Thanks goes out to Valery Kondakoff for suggesting the addition of - setlocal nonumber and foldcolumn=0. This allows for line numbering - and folding to be turned off temporarily while in the explorer. -6.1.3 - Added folding. Did some code cleanup. Added the ability to force the - newly split window to be temporarily vertical, which was suggested by - Thomas Glanzmann. -6.1.2 - Now pressing the key will quit, just like 'q'. - Added folds to hide winmanager configuration. - If anyone had the 'C' option in their cpoptions they would receive - a E10 error on startup of BufExplorer. cpo is now saved, updated and - restored. Thanks to Charles E Campbell, Jr. - Attempted to make sure there can only be one BufExplorer window open - at a time. -6.1.1 - Thanks to Brian D. Goodwin for adding toupper to FileNameCmp. This - way buffers sorted by name will be in the correct order regardless of - case. -6.0.16 - Thanks to Andre Pang for the original patch/idea to get bufexplorer - to work in insertmode/modeless mode (evim). Added Initialize - and Cleanup autocommands to handle commands that need to be - performed when starting or leaving bufexplorer. -6.0.15 - Srinath Avadhanulax added a patch for winmanager.vim. -6.0.14 - Fix a few more bug that I thought I already had fixed. Thanks - to Eric Bloodworth for adding 'Open Mode/Edit in Place'. Added - vertical splitting. -6.0.13 - Thanks to Charles E Campbell, Jr. for pointing out some embarrassing - typos that I had in the documentation. I guess I need to run - the spell checker more :o) -6.0.12 - Thanks to Madoka Machitani, for the tip on adding the augroup command - around the MRUList autocommands. -6.0.11 - Fixed bug report by Xiangjiang Ma. '"=' was being added to the - search history which messed up hlsearch. -6.0.10 - Added the necessary hooks so that the Srinath Avadhanula's - winmanager.vim script could more easily integrate with this script. - Tried to improve performance. -6.0.9 - Added MRU (Most Recently Used) sort ordering. -6.0.8 - Was not resetting the showcmd command correctly. - Added nifty help file. -6.0.7 - Thanks to Brett Carlane for some great enhancements. Some are added, - some are not, yet. Added highlighting of current and alternate - filenames. Added splitting of path/filename toggle. Reworked - ShowBuffers(). - Changed my email address. -6.0.6 - Copyright notice added. Needed this so that it could be distributed - with Debian Linux. Fixed problem with the SortListing() function - failing when there was only one buffer to display. -6.0.5 - Fixed problems reported by David Pascoe, in that you where unable to - hit 'd' on a buffer that belonged to a files that no longer existed - and that the 'yank' buffer was being overridden by the help text when - the bufexplorer was opened. -6.0.4 - Thanks to Charles Campbell, Jr. for making this plugin more plugin - *compliant*, adding default keymappings of be and bs - as well as fixing the 'w:sortDirLabel not being defined' bug. -6.0.3 - Added sorting capabilities. Sort taken from explorer.vim. -6.0.2 - Can't remember. (2001-07-25) -6.0.1 - Initial release. - -=============================================================================== -TODO *bufexplorer-todo* - -- Nothing as of now, buf if you have any suggestions, drop me an email. - -=============================================================================== -CREDITS *bufexplorer-credits* - -Author: Jeff Lanzarotta - -Credit must go out to Bram Moolenaar and all the Vim developers for -making the world's best editor (IMHO). I also want to thank everyone who -helped and gave me suggestions. I wouldn't want to leave anyone out so I -won't list names. - -=============================================================================== -vim:tw=78:noet:wrap:ts=8:ft=help:norl: diff --git a/sources_non_forked/bufexplorer/plugin/bufexplorer.vim b/sources_non_forked/bufexplorer/plugin/bufexplorer.vim deleted file mode 100644 index 87913639..00000000 --- a/sources_non_forked/bufexplorer/plugin/bufexplorer.vim +++ /dev/null @@ -1,1162 +0,0 @@ -"============================================================================== -" Copyright: Copyright (C) 2001-2010 Jeff Lanzarotta -" Permission is hereby granted to use and distribute this code, -" with or without modifications, provided that this copyright -" notice is copied with it. Like anything else that's free, -" bufexplorer.vim is provided *as is* and comes with no -" warranty of any kind, either expressed or implied. In no -" event will the copyright holder be liable for any damages -" resulting from the use of this software. -" Name Of File: bufexplorer.vim -" Description: Buffer Explorer Vim Plugin -" Maintainer: Jeff Lanzarotta (delux256-vim at yahoo dot com) -" Last Changed: Friday, 22 October 2010 -" Version: See g:bufexplorer_version for version number. -" Usage: This file should reside in the plugin directory and be -" automatically sourced. -" -" You may use the default keymappings of -" -" be - Opens BE. -" bs - Opens horizontally window BE. -" bv - Opens vertically window BE. -" -" Or you can use -" -" ":BufExplorer" - Opens BE. -" ":BufExplorerHorizontalSplit" - Opens horizontally window BE. -" ":BufExplorerVerticalSplit" - Opens vertically window BE. -" -" For more help see supplied documentation. -" History: See supplied documentation. -"============================================================================== - -" Exit quickly if already running or when 'compatible' is set. {{{1 -if exists("g:bufexplorer_version") || &cp - finish -endif -"1}}} - -" Version number -let g:bufexplorer_version = "7.2.8" - -" Check for Vim version 700 or greater {{{1 -if v:version < 700 - echo "Sorry, bufexplorer ".g:bufexplorer_version."\nONLY runs with Vim 7.0 and greater." - finish -endif - -" Public Interface {{{1 -if maparg("be") =~ 'BufExplorer' - nunmap be -endif - -if maparg("bs") =~ 'BufExplorerHorizontalSplit' - nunmap bs -endif - -if maparg("bv") =~ 'BufExplorerVerticalSplit' - nunmap bv -endif - -nmap