Permalink
Browse files

Updated plugins

  • Loading branch information...
1 parent ac3ef26 commit 6a16a9393c145893e2cafd43a76423235cf69b0f @amix committed Apr 18, 2014
Showing with 2,552 additions and 706 deletions.
  1. +51 −72 sources_non_forked/ack.vim/README.md
  2. +0 −23 sources_non_forked/ack.vim/Rakefile
  3. +143 −0 sources_non_forked/ack.vim/autoload/ack.vim
  4. +147 −2 sources_non_forked/ack.vim/doc/ack.txt
  5. +14 −0 sources_non_forked/ack.vim/doc/ack_quick_help.txt
  6. +9 −0 sources_non_forked/ack.vim/ftplugin/qf.vim
  7. +49 −100 sources_non_forked/ack.vim/plugin/ack.vim
  8. +4 −1 sources_non_forked/goyo.vim/plugin/goyo.vim
  9. +1 −1 sources_non_forked/syntastic/CONTRIBUTING.md
  10. +46 −5 sources_non_forked/syntastic/README.markdown
  11. +0 −19 sources_non_forked/syntastic/autoload/syntastic/postprocess.vim
  12. +39 −0 sources_non_forked/syntastic/autoload/syntastic/preprocess.vim
  13. +51 −1 sources_non_forked/syntastic/autoload/syntastic/util.vim
  14. +38 −6 sources_non_forked/syntastic/doc/syntastic.txt
  15. +7 −1 sources_non_forked/syntastic/plugin/syntastic.vim
  16. +18 −0 sources_non_forked/syntastic/plugin/syntastic/checker.vim
  17. +4 −0 sources_non_forked/syntastic/plugin/syntastic/loclist.vim
  18. +1 −0 sources_non_forked/syntastic/plugin/syntastic/registry.vim
  19. +1 −1 sources_non_forked/syntastic/syntax_checkers/actionscript/mxmlc.vim
  20. +6 −3 sources_non_forked/syntastic/syntax_checkers/c/oclint.vim
  21. +3 −0 sources_non_forked/syntastic/syntax_checkers/c/splint.vim
  22. +3 −2 sources_non_forked/syntastic/syntax_checkers/css/prettycss.vim
  23. +17 −11 sources_non_forked/syntastic/syntax_checkers/haskell/hdevtools.vim
  24. +5 −3 sources_non_forked/syntastic/syntax_checkers/haskell/hlint.vim
  25. +43 −0 sources_non_forked/syntastic/syntax_checkers/haskell/scan.vim
  26. +2 −1 sources_non_forked/syntastic/syntax_checkers/html/jshint.vim
  27. +101 −93 sources_non_forked/syntastic/syntax_checkers/html/tidy.vim
  28. +3 −2 sources_non_forked/syntastic/syntax_checkers/java/checkstyle.vim
  29. +11 −11 sources_non_forked/syntastic/syntax_checkers/java/javac.vim
  30. +12 −3 sources_non_forked/syntastic/syntax_checkers/javascript/eslint.vim
  31. +7 −2 sources_non_forked/syntastic/syntax_checkers/javascript/jscs.vim
  32. +9 −6 sources_non_forked/syntastic/syntax_checkers/javascript/jshint.vim
  33. +2 −1 sources_non_forked/syntastic/syntax_checkers/javascript/jsl.vim
  34. +0 −4 sources_non_forked/syntastic/syntax_checkers/javascript/jsxhint.vim
  35. +3 −2 sources_non_forked/syntastic/syntax_checkers/python/pylama.vim
  36. +6 −4 sources_non_forked/syntastic/syntax_checkers/python/pylint.vim
  37. +78 −0 sources_non_forked/syntastic/syntax_checkers/r/lint.vim
  38. +77 −0 sources_non_forked/syntastic/syntax_checkers/r/svtools.vim
  39. +3 −2 sources_non_forked/syntastic/syntax_checkers/racket/code-ayatollah.vim
  40. +6 −3 sources_non_forked/syntastic/syntax_checkers/tex/chktex.vim
  41. +6 −3 sources_non_forked/syntastic/syntax_checkers/typescript/tsc.vim
  42. +3 −8 sources_non_forked/syntastic/syntax_checkers/vim/vimlint.vim
  43. +13 −13 sources_non_forked/syntastic/syntax_checkers/xhtml/tidy.vim
  44. +42 −0 sources_non_forked/syntastic/syntax_checkers/xml/plutil.vim
  45. +2 −2 sources_non_forked/tlib/autoload/tlib/World.vim
  46. +34 −11 sources_non_forked/tlib/autoload/tlib/cache.vim
  47. +6 −1 sources_non_forked/tlib/autoload/tlib/input.vim
  48. +22 −18 sources_non_forked/tlib/autoload/tlib/list.vim
  49. +6 −5 sources_non_forked/tlib/autoload/tlib/persistent.vim
  50. +8 −0 sources_non_forked/tlib/doc/tlib.txt
  51. +5 −5 sources_non_forked/tlib/plugin/02tlib.vim
  52. +2 −1 sources_non_forked/vim-airline/autoload/airline/extensions.vim
  53. +40 −14 sources_non_forked/vim-airline/autoload/airline/extensions/branch.vim
  54. +1 −1 sources_non_forked/vim-airline/autoload/airline/extensions/eclim.vim
  55. +6 −2 sources_non_forked/vim-airline/autoload/airline/extensions/tabline.vim
  56. +8 −2 sources_non_forked/vim-airline/autoload/airline/extensions/whitespace.vim
  57. +1 −1 sources_non_forked/vim-airline/autoload/airline/themes/luna.vim
  58. +5 −5 sources_non_forked/vim-airline/autoload/airline/themes/sol.vim
  59. +8 −1 sources_non_forked/vim-airline/doc/airline.txt
  60. +4 −6 sources_non_forked/vim-commentary/README.markdown
  61. +10 −9 sources_non_forked/vim-commentary/doc/commentary.txt
  62. +28 −11 sources_non_forked/vim-commentary/plugin/commentary.vim
  63. +2 −0 sources_non_forked/vim-fugitive/doc/fugitive.txt
  64. +72 −54 sources_non_forked/vim-fugitive/plugin/fugitive.vim
  65. +28 −0 sources_non_forked/vim-markdown/ftplugin/markdown.vim
  66. +1 −0 sources_non_forked/vim-snipmate/Contributors.md
  67. +28 −0 sources_non_forked/vim-snipmate/README.md
  68. +62 −61 sources_non_forked/vim-snipmate/autoload/snipMate.vim
  69. +12 −1 sources_non_forked/vim-snipmate/doc/snipMate.txt
  70. +48 −27 sources_non_forked/vim-snipmate/plugin/snipMate.vim
  71. +0 −2 sources_non_forked/vim-snipmate/plugin/snipMateInterface.vim
  72. +1 −1 sources_non_forked/vim-snippets/UltiSnips/html.snippets
  73. +13 −8 sources_non_forked/vim-snippets/UltiSnips/java.snippets
  74. +6 −6 sources_non_forked/vim-snippets/UltiSnips/php.snippets
  75. +52 −0 sources_non_forked/vim-snippets/UltiSnips/proto.snippets
  76. +63 −17 sources_non_forked/vim-snippets/UltiSnips/python.snippets
  77. +144 −0 sources_non_forked/vim-snippets/UltiSnips/r.snippets
  78. +3 −0 sources_non_forked/vim-snippets/UltiSnips/rnoweb.snippets
  79. +2 −21 sources_non_forked/vim-snippets/UltiSnips/rst.snippets
  80. +215 −0 sources_non_forked/vim-snippets/UltiSnips/rust.snippets
  81. +63 −0 sources_non_forked/vim-snippets/UltiSnips/soy.snippets
  82. +37 −0 sources_non_forked/vim-snippets/plugin/vimsnippets.vim
  83. +20 −0 sources_non_forked/vim-snippets/pythonx/vimsnippets.py
  84. +5 −1 sources_non_forked/vim-snippets/snippets/django.snippets
  85. +320 −2 sources_non_forked/vim-snippets/snippets/erlang.snippets
  86. +2 −0 sources_non_forked/vim-snippets/snippets/eruby.snippets
  87. +2 −0 sources_non_forked/vim-snippets/snippets/haskell.snippets
  88. +18 −0 sources_non_forked/vim-snippets/snippets/jade.snippets
  89. +8 −0 sources_non_forked/vim-snippets/snippets/python.snippets
  90. +43 −0 sources_non_forked/vim-snippets/snippets/ruby.snippets
  91. +2 −1 sources_non_forked/vim-snippets/snippets/scala.snippets
View
123 sources_non_forked/ack.vim/README.md
@@ -1,101 +1,60 @@
-# ack.vim #
+# ack.vim
This plugin is a front for the Perl module
[App::Ack](http://search.cpan.org/~petdance/ack/ack). Ack can be used as a
replacement for 99% of the uses of _grep_. This plugin will allow you to run
ack from vim, and shows the results in a split window.
-The *Official Version* of this plugin is available at [vim.org](http://www.vim.org/scripts/script.php?script_id=2572).
-
-## Installation ##
-
+## Installation
### Ack
-You have to install [ack](http://betterthangrep.com/), of course.
-
-Install on Debian / Ubuntu with:
-
- sudo apt-get install ack-grep
-
-Install on Fedora with:
-
- su -l -c 'yum install ack'
-
-Install on openSUSE with:
-
- sudo zypper install ack
-
-Install on Gentoo with:
-
- sudo emerge ack
-
-Install with Homebrew:
-
- brew install ack
-
-Install with MacPorts:
-
- sudo port install p5-app-ack
-
-Install with Gentoo Prefix:
-
- emerge ack
-
-Install on FreeBSD with:
+You will need the ack, of course, to install it follow the
+[manual](http://beyondgrep.com/install/)
- cd /usr/ports/textproc/p5-ack/ && make install clean
-
-You can specify a custom ack name and path in your .vimrc like so:
-
- let g:ackprg="<custom-ack-path-goes-here> -H --nocolor --nogroup --column"
+### The Plugin
-Otherwise, you are on your own.
+To install it is recommended to use one of the popular package managers for Vim,
+rather than installing by drag and drop all required files into your `.vim` folder.
-### The Plugin
+#### Manual (not recommended)
-If you have [Rake](http://rake.rubyforge.org/) installed, you can just run: `rake install`.
+Just
+[download](https://github.com/mileszs/ack.vim/archive/kb-improve-readme.zip) the
+plugin and put it in your `~/.vim/`(or `%PROGRAMFILES%/Vim/vimfiles` on windows)
-Otherwise, the file ack.vim goes in ~/.vim/plugin, and the ack.txt file belongs in ~/.vim/doc. Be sure to run
+#### Vundle
- :helptags ~/.vim/doc
+ Bundle 'mileszs/ack.vim'
-afterwards.
+#### NeoBundle
+ NeoBundle 'mileszs/ack.vim'
-## Usage ##
+## Usage
- :Ack [options] {pattern} [{directory}]
+ :Ack [options] {pattern} [{directories}]
-Search recursively in {directory} (which defaults to the current directory) for the {pattern}.
+Search recursively in {directory} (which defaults to the current directory) for
+the {pattern}.
Files containing the search term will be listed in the split window, along with
the line number of the occurrence, once for each occurrence. [Enter] on a line
in this window will open the file, and place the cursor on the matching line.
-Just like where you use :grep, :grepadd, :lgrep, and :lgrepadd, you can use `:Ack`, `:AckAdd`, `:LAck`, and `:LAckAdd` respectively. (See `doc/ack.txt`, or install and `:h Ack` for more information.)
-
-**From the [ack docs](http://betterthangrep.com/)** (my favorite feature):
-
- --type=TYPE, --type=noTYPE
-
- Specify the types of files to include or exclude from a search. TYPE is a filetype, like perl or xml. --type=perl can also be specified as --perl, and --type=noperl can be done as --noperl.
-
- If a file is of both type "foo" and "bar", specifying --foo and --nobar will exclude the file, because an exclusion takes precedence over an inclusion.
+Just like where you use :grep, :grepadd, :lgrep, and :lgrepadd, you can use
+`:Ack`, `:AckAdd`, `:LAck`, and `:LAckAdd` respectively.
+(See `doc/ack.txt`, or install and `:h Ack` for more information.)
- Type specifications can be repeated and are ORed together.
+For more ack options see
+[ack documentation](http://beyondgrep.com/documentation/)
- See ack --help=types for a list of valid types.
-
-### Gotchas ###
-
-Some characters have special meaning, and need to be escaped your search pattern. For instance, '#'. You have to escape it like this `:Ack '\\\#define foo'` to search for `#define foo`. (From [blueyed in issue #5](https://github.com/mileszs/ack.vim/issues/5).)
-
-### Keyboard Shortcuts ###
+### Keyboard Shortcuts
In the quickfix window, you can use:
o to open (same as enter)
+ O to open and close quickfix window
go to preview file (open but maintain focus on ack.vim results)
t to open in new tab
T to open in new tab silently
@@ -106,9 +65,29 @@ In the quickfix window, you can use:
q to close the quickfix window
This Vim plugin is derived (and by derived, I mean copied, essentially) from
-Antoine Imbert's blog post [Ack and Vim
-Integration](http://blog.ant0ine.com/typepad/2007/03/ack-and-vim-integration.html) (in
-particular, the function at the bottom of the post). I added a help file that
+Antoine Imbert's blog post
+[Ack and Vim Integration](http://blog.ant0ine.com/typepad/2007/03/ack-and-vim-integration.html)
+(in particular, the function at the bottom of the post). I added a help file that
provides just enough reference to get you going. I also highly recommend you
-check out the docs for the Perl script 'ack', for obvious reasons: [ack -
-grep-like text finder](http://betterthangrep.com/).
+check out the docs for the Perl script 'ack', for obvious reasons:
+[ack - grep-like text finder](http://beyondgrep.com/).
+
+### Gotchas
+
+Some characters have special meaning, and need to be escaped your search
+pattern. For instance, '#'. You have to escape it like this :Ack '\\\#define
+foo' to search for #define foo. (From blueyed in issue #5.)
+
+## Changelog
+
+### 1.0
+
+* Remove support to ack 1.x
+* Start to use a Changelog
+* Use `autoload` directory to define functions, instead of `plugin`.
+* Add option to auto fold the results(`g:ack_autofold_results`)
+* Improve documentation, list all options and shortcuts
+* Improve highlight option to work when passes directories or use quotes.
+* Add g:ack_mapping
+* Add g:ack_default_options
+* Add a help toggle `?`(like NERDTree)
View
23 sources_non_forked/ack.vim/Rakefile
@@ -1,23 +0,0 @@
-# Added by Josh Nichols, a.k.a. technicalpickles
-require 'rake'
-
-files = ['doc/ack.txt', 'plugin/ack.vim']
-
-desc 'Install plugin and documentation'
-task :install do
- vimfiles = if ENV['VIMFILES']
- ENV['VIMFILES']
- elsif RUBY_PLATFORM =~ /(win|w)32$/
- File.expand_path("~/vimfiles")
- else
- File.expand_path("~/.vim")
- end
- files.each do |file|
- target_file = File.join(vimfiles, file)
- FileUtils.mkdir_p File.dirname(target_file)
- FileUtils.cp file, target_file
-
- puts " Copied #{file} to #{target_file}"
- end
-
-end
View
143 sources_non_forked/ack.vim/autoload/ack.vim
@@ -0,0 +1,143 @@
+function! ack#Ack(cmd, args)
+ redraw
+ echo "Searching ..."
+
+ " If no pattern is provided, search for the word under the cursor
+ if empty(a:args)
+ let l:grepargs = expand("<cword>")
+ else
+ let l:grepargs = a:args . join(a:000, ' ')
+ end
+ let l:ackprg_run = g:ackprg
+
+ " Format, used to manage column jump
+ if a:cmd =~# '-g$'
+ let g:ackformat="%f"
+ let l:ackprg_run = substitute(l:ackprg_run, '-H\|--column', '', 'g')
+ else
+ let g:ackformat="%f:%l:%c:%m,%f:%l:%m"
+ endif
+
+ let grepprg_bak = &grepprg
+ let grepformat_bak = &grepformat
+ let &grepprg=l:ackprg_run
+ let &grepformat=g:ackformat
+
+ try
+ " NOTE: we escape special chars, but not everything using shellescape to
+ " allow for passing arguments etc
+ silent execute a:cmd . " " . escape(l:grepargs, '|#%')
+ finally
+ let &grepprg=grepprg_bak
+ let &grepformat=grepformat_bak
+ endtry
+
+ if a:cmd =~# '^l'
+ let s:handler = g:ack_lhandler
+ let s:apply_mappings = g:ack_apply_lmappings
+ let s:close_cmd = ':lclose<CR>'
+ else
+ let s:handler = g:ack_qhandler
+ let s:apply_mappings = g:ack_apply_qmappings
+ let s:close_cmd = ':cclose<CR>'
+ endif
+
+ call ack#show_results()
+ call <SID>highlight(l:grepargs)
+
+ redraw!
+endfunction
+
+function! ack#show_results()
+ execute s:handler
+ call <SID>apply_maps()
+endfunction
+
+function! s:apply_maps()
+ let g:ack_mappings.q = s:close_cmd
+
+ execute "nnoremap <buffer> <silent> ? :call ack#quick_help()<CR>"
+
+ if s:apply_mappings && &ft == "qf"
+ if g:ack_autoclose
+ for key_map in items(g:ack_mappings)
+ execute printf("nnoremap <buffer> <silent> %s %s", get(key_map, 0), get(key_map, 1) . s:close_cmd)
+ endfor
+ execute "nnoremap <buffer> <silent> <CR> <CR>" . s:close_cmd
+ else
+ for key_map in items(g:ack_mappings)
+ execute printf("nnoremap <buffer> <silent> %s %s", get(key_map, 0), get(key_map, 1))
+ endfor
+ endif
+
+ if exists("g:ackpreview") " if auto preview in on, remap j and k keys
+ execute "nnoremap <buffer> <silent> j j<CR><C-W><C-W>"
+ execute "nnoremap <buffer> <silent> k k<CR><C-W><C-W>"
+ endif
+ endif
+endfunction
+
+function! ack#quick_help()
+ execute "edit " . globpath(&rtp, "doc/ack_quick_help.txt")
+
+ silent normal gg
+ setlocal buftype=nofile
+ setlocal bufhidden=hide
+ setlocal noswapfile
+ setlocal nobuflisted
+ setlocal nomodifiable
+ setlocal filetype=help
+ setlocal nonumber
+ setlocal norelativenumber
+ setlocal nowrap
+ setlocal foldlevel=20
+ setlocal foldmethod=diff
+ nnoremap <buffer> <silent> ? :q!<CR>:call ack#show_results()<CR>
+endfunction
+
+function! s:highlight(args)
+ if !g:ackhighlight
+ return
+ endif
+
+ let @/ = matchstr(a:args, "\\v\\w+\>|['\"]\\zs[^\"]+\\ze['\"]")
+ setlocal hlsearch
+ call feedkeys(":let v:hlsearch=1 \| echo \<CR>", "n")
+endfunction
+
+function! ack#AckFromSearch(cmd, args)
+ let search = getreg('/')
+ " translate vim regular expression to perl regular expression.
+ let search = substitute(search, '\(\\<\|\\>\)', '\\b', 'g')
+ call ack#Ack(a:cmd, '"' . search . '" ' . a:args)
+endfunction
+
+function! s:GetDocLocations()
+ let dp = ''
+ for p in split(&rtp, ',')
+ let p = p . '/doc/'
+ if isdirectory(p)
+ let dp = p . '*.txt ' . dp
+ endif
+ endfor
+
+ return dp
+endfunction
+
+function! ack#AckHelp(cmd, args)
+ let args = a:args . ' ' . s:GetDocLocations()
+ call ack#Ack(a:cmd, args)
+endfunction
+
+function! ack#AckWindow(cmd, args)
+ let files = tabpagebuflist()
+ " remove duplicated filenames (files appearing in more than one window)
+ let files = filter(copy(sort(files)), 'index(files,v:val,v:key+1)==-1')
+ call map(files, "bufname(v:val)")
+ " remove unnamed buffers as quickfix (empty strings before shellescape)
+ call filter(files, 'v:val != ""')
+ " expand to full path (avoid problems with cd/lcd in au QuickFixCmdPre)
+ let files = map(files, "shellescape(fnamemodify(v:val, ':p'))")
+ let args = a:args . ' ' . join(files)
+ call ack#Ack(a:cmd, args)
+endfunction
View
149 sources_non_forked/ack.vim/doc/ack.txt
@@ -16,7 +16,7 @@ shows the results in a split window.
Search recursively in {directory} (which defaults to the current
directory) for the {pattern}. Behaves just like the |:grep| command, but
will open the |Quickfix| window for you. If [!] is not given the first
- error is jumped to.
+ occurence is jumped to.
:AckAdd [options] {pattern} [{directory}] *:AckAdd*
@@ -45,28 +45,173 @@ shows the results in a split window.
:AckHelp[!] [options] {pattern} *:AckHelp*
- Search vim documentation files for the {pattern}. Behaves just like the
+ Search vim documentation files for the {pattern}. Behaves just like the
|:Ack| command, but searches only vim documentation .txt files
:LAckHelp [options] {pattern} *:LAckHelp*
Just like |:AckHelp| but instead of the |quickfix| list, matches are placed
in the current |location-list|.
+:AckWindow[!] [options] {pattern} *:AckWindow*
+
+ Search all buffers visible in the screen (current tab page only) files for
+ the {pattern}.
+
+:LAckWindow [options] {pattern} *:LAckWindow*
+
+ Just like |:AckWindow| but instead of the |quickfix| list, matches are
+ placed in the current |location-list|.
+
Files containing the search term will be listed in the split window, along
with the line number of the occurrence, once for each occurrence. <Enter> on
a line in this window will open the file, and place the cursor on the matching
line.
See http://betterthangrep.com/ for more information.
+
+==============================================================================
+CONFIGURATION *ack-configuration*
+
+ *g:ackprg*
+g:ackprg
+Default for ubuntu: "ack-grep"
+Default for other systems: "ack"
+
+Use this option to specify the ack command and its options
+
+Example:
+>
+ let g:ackprg = "other-bin-ack"
+<
+
+ g:ack_default_options*
+g:ack_default_options
+Default: " -s -H --nocolor --nogroup --column"
+
+Use this option to specify the options used by ack
+
+Example:
+>
+ let g:ackprg =
+ \ " -s -H --nocolor --nogroup --column --smart-case --follow"
+<
+
+ *g:ack_apply_qmappings*
+g:ack_apply_qmappings
+Default: 1
+
+This option enable mappings on quickview window.
+
+ *g:ack_apply_lmappings*
+g:ack_apply_lmappings
+Default: 1
+
+This option enable mappings on Location list window.
+
+ *g:ack_mappings*
+g:ack_mappings
+Default: {
+ \ "t": "<C-W><CR><C-W>T",
+ \ "T": "<C-W><CR><C-W>TgT<C-W>j",
+ \ "o": "<CR>",
+ \ "O": "<CR><C-W><C-W>:ccl<CR>",
+ \ "go": "<CR><C-W>j",
+ \ "h": "<C-W><CR><C-W>K",
+ \ "H": "<C-W><CR><C-W>K<C-W>b",
+ \ "v": "<C-W><CR><C-W>H<C-W>b<C-W>J<C-W>t",
+ \ "gv": "<C-W><CR><C-W>H<C-W>b<C-W>J" }
+
+This option list all maps create on quickfix/Location list window.
+
+Example, if you want to open the result in the middle of the screen:
+>
+ let g:ack_mappings = { "o": "<CR>zz" }
+<
+
+ *g:ack_qhandler*
+g:ack_qhandler
+Default: "botright copen"
+
+Command to open the quickview window.
+
+If you want to open a quickview window with 30 lines you can do:
+>
+ let g:ack_qhandler = "botright copen 30"
+<
+
+ *g:ack_lhandler*
+g:ack_lhandler
+Default: "botright lopen"
+
+Command to open the Location list window.
+
+If you want to open a Location list window with 30 lines you can do:
+>
+ let g:ack_lhandler = "botright lopen 30"
+<
+
+ *g:ackhighlight*
+
+g:ackhighlight
+Default: 0
+
+Use this option to highlight the searched term.
+
+Example:
+>
+ let g:ackhighlight = 1
+<
+
+ *g:ack_autoclose*
+g:ack_autoclose
+Default: 0
+
+Use this option to specify whether to close the quickfix window after
+using any of the shortcuts.
+
+Example:
+>
+ let g:ack_autoclose = 1
+<
+
+ *g:ack_autofold_results*
+
+g:ack_autofold_results
+Default: 0
+
+Use this option to fold the results in quickfix by file name. Only the current
+fold will be open by default and while you press 'j' and 'k' to move between the
+results if you hit other fold the last one will be closed and the current will
+be open.
+
+Example:
+>
+ let g:ack_autofold_results = 1
+<
+
+ *g:ackpreview*
+
+g:ackpreview
+Default: 0
+
+Use this option to automagically open the file with 'j' or 'k'.
+
+Example:
+>
+ let g:ackpreview = 1
+<
+
==============================================================================
MAPPINGS *ack-mappings*
The following keyboard shortcuts are available in the quickfix window:
o open file (same as enter).
+O open file and close quickfix window.
+
go preview file (open but maintain focus on ack.vim results).
t open in a new tab.
View
14 sources_non_forked/ack.vim/doc/ack_quick_help.txt
@@ -0,0 +1,14 @@
+==== ack.vim quick help ===============
+
+ *?:* Show this help
+ *t:* Open in a new tab
+ *T:* Open in a new tab silently
+ *o:* Open
+ *O:* Open and close result window
+ *go:* Preview
+ *h:* Horizontal open
+ *H:* Horizontal open silently
+ *v:* Vertical open
+ *gv:* Vertical open silently
+
+========================================
View
9 sources_non_forked/ack.vim/ftplugin/qf.vim
@@ -0,0 +1,9 @@
+if g:ack_autofold_results
+ setlocal foldlevel=0
+ setlocal foldmethod=expr
+ setlocal foldexpr=matchstr(getline(v:lnum),'^[^\|]\\+')==#matchstr(getline(v:lnum+1),'^[^\|]\\+')?1:'<1'
+ setlocal foldenable
+ setlocal foldclose=all
+ setlocal foldopen=all
+ nnoremap <buffer> j jzz
+endif
View
149 sources_non_forked/ack.vim/plugin/ack.vim
@@ -1,16 +1,17 @@
-" NOTE: You must, of course, install the ack script
-" in your path.
-" On Debian / Ubuntu:
-" sudo apt-get install ack-grep
-" With MacPorts:
-" sudo port install p5-app-ack
-" With Homebrew:
-" brew install ack
+if !exists("g:ack_default_options")
+ let g:ack_default_options = " -s -H --nocolor --nogroup --column"
+endif
" Location of the ack utility
if !exists("g:ackprg")
- let s:ackcommand = executable('ack-grep') ? 'ack-grep' : 'ack'
- let g:ackprg=s:ackcommand." -H --nocolor --nogroup --column"
+ if executable('ack')
+ let g:ackprg = "ack"
+ elseif executable('ack-grep')
+ let g:ackprg = "ack-grep"
+ else
+ finish
+ endif
+ let g:ackprg .= g:ack_default_options
endif
if !exists("g:ack_apply_qmappings")
@@ -21,102 +22,50 @@ if !exists("g:ack_apply_lmappings")
let g:ack_apply_lmappings = !exists("g:ack_lhandler")
endif
+let s:ack_mappings = {
+ \ "t": "<C-W><CR><C-W>T",
+ \ "T": "<C-W><CR><C-W>TgT<C-W>j",
+ \ "o": "<CR>",
+ \ "O": "<CR><C-W><C-W>:ccl<CR>",
+ \ "go": "<CR><C-W>j",
+ \ "h": "<C-W><CR><C-W>K",
+ \ "H": "<C-W><CR><C-W>K<C-W>b",
+ \ "v": "<C-W><CR><C-W>H<C-W>b<C-W>J<C-W>t",
+ \ "gv": "<C-W><CR><C-W>H<C-W>b<C-W>J" }
+
+if exists("g:ack_mappings")
+ let g:ack_mappings = extend(s:ack_mappings, g:ack_mappings)
+else
+ let g:ack_mappings = s:ack_mappings
+endif
+
if !exists("g:ack_qhandler")
- let g:ack_qhandler="botright copen"
+ let g:ack_qhandler = "botright copen"
endif
if !exists("g:ack_lhandler")
- let g:ack_lhandler="botright lopen"
+ let g:ack_lhandler = "botright lopen"
endif
-function! s:Ack(cmd, args)
- redraw
- echo "Searching ..."
-
- " If no pattern is provided, search for the word under the cursor
- if empty(a:args)
- let l:grepargs = expand("<cword>")
- else
- let l:grepargs = a:args . join(a:000, ' ')
- end
-
- " Format, used to manage column jump
- if a:cmd =~# '-g$'
- let g:ackformat="%f"
- else
- let g:ackformat="%f:%l:%c:%m,%f:%l:%m"
- end
-
- let grepprg_bak=&grepprg
- let grepformat_bak=&grepformat
- try
- let &grepprg=g:ackprg
- let &grepformat=g:ackformat
- silent execute a:cmd . " " . escape(l:grepargs, '|')
- finally
- let &grepprg=grepprg_bak
- let &grepformat=grepformat_bak
- endtry
-
- if a:cmd =~# '^l'
- exe g:ack_lhandler
- let l:apply_mappings = g:ack_apply_lmappings
- let l:close_cmd = ':lclose<CR>'
- else
- exe g:ack_qhandler
- let l:apply_mappings = g:ack_apply_qmappings
- let l:close_cmd = ':cclose<CR>'
- endif
-
- if l:apply_mappings
- exec "nnoremap <silent> <buffer> q " . l:close_cmd
- exec "nnoremap <silent> <buffer> t <C-W><CR><C-W>T"
- exec "nnoremap <silent> <buffer> T <C-W><CR><C-W>TgT<C-W><C-W>"
- exec "nnoremap <silent> <buffer> o <CR>"
- exec "nnoremap <silent> <buffer> go <CR><C-W><C-W>"
- exec "nnoremap <silent> <buffer> h <C-W><CR><C-W>K"
- exec "nnoremap <silent> <buffer> H <C-W><CR><C-W>K<C-W>b"
- exec "nnoremap <silent> <buffer> v <C-W><CR><C-W>H<C-W>b<C-W>J<C-W>t"
- exec "nnoremap <silent> <buffer> gv <C-W><CR><C-W>H<C-W>b<C-W>J"
- endif
-
- " If highlighting is on, highlight the search keyword.
- if exists("g:ackhighlight")
- let @/ = substitute(l:grepargs,'["'']','','g')
- set hlsearch
- end
-
- redraw!
-endfunction
-
-function! s:AckFromSearch(cmd, args)
- let search = getreg('/')
- " translate vim regular expression to perl regular expression.
- let search = substitute(search,'\(\\<\|\\>\)','\\b','g')
- call s:Ack(a:cmd, '"' . search .'" '. a:args)
-endfunction
+if !exists("g:ackhighlight")
+ let g:ackhighlight = 0
+endif
-function! s:GetDocLocations()
- let dp = ''
- for p in split(&rtp,',')
- let p = p.'/doc/'
- if isdirectory(p)
- let dp = p.'*.txt '.dp
- endif
- endfor
- return dp
-endfunction
+if !exists("g:ack_autoclose")
+ let g:ack_autoclose = 0
+endif
-function! s:AckHelp(cmd,args)
- let args = a:args.' '.s:GetDocLocations()
- call s:Ack(a:cmd,args)
-endfunction
+if !exists("g:ack_autofold_results")
+ let g:ack_autofold_results = 0
+endif
-command! -bang -nargs=* -complete=file Ack call s:Ack('grep<bang>',<q-args>)
-command! -bang -nargs=* -complete=file AckAdd call s:Ack('grepadd<bang>', <q-args>)
-command! -bang -nargs=* -complete=file AckFromSearch call s:AckFromSearch('grep<bang>', <q-args>)
-command! -bang -nargs=* -complete=file LAck call s:Ack('lgrep<bang>', <q-args>)
-command! -bang -nargs=* -complete=file LAckAdd call s:Ack('lgrepadd<bang>', <q-args>)
-command! -bang -nargs=* -complete=file AckFile call s:Ack('grep<bang> -g', <q-args>)
-command! -bang -nargs=* -complete=help AckHelp call s:AckHelp('grep<bang>',<q-args>)
-command! -bang -nargs=* -complete=help LAckHelp call s:AckHelp('lgrep<bang>',<q-args>)
+command! -bang -nargs=* -complete=file Ack call ack#Ack('grep<bang>', <q-args>)
+command! -bang -nargs=* -complete=file AckAdd call ack#Ack('grepadd<bang>', <q-args>)
+command! -bang -nargs=* -complete=file AckFromSearch call ack#AckFromSearch('grep<bang>', <q-args>)
+command! -bang -nargs=* -complete=file LAck call ack#Ack('lgrep<bang>', <q-args>)
+command! -bang -nargs=* -complete=file LAckAdd call ack#Ack('lgrepadd<bang>', <q-args>)
+command! -bang -nargs=* -complete=file AckFile call ack#Ack('grep<bang> -g', <q-args>)
+command! -bang -nargs=* -complete=help AckHelp call ack#AckHelp('grep<bang>', <q-args>)
+command! -bang -nargs=* -complete=help LAckHelp call ack#AckHelp('lgrep<bang>', <q-args>)
+command! -bang -nargs=* -complete=help AckWindow call ack#AckWindow('grep<bang>', <q-args>)
+command! -bang -nargs=* -complete=help LAckWindow call ack#AckWindow('lgrep<bang>', <q-args>)
View
5 sources_non_forked/goyo.vim/plugin/goyo.vim
@@ -46,7 +46,7 @@ function! s:init_pad(command)
execute a:command
setlocal buftype=nofile bufhidden=wipe nomodifiable nobuflisted noswapfile
- \ nonu nocursorline winfixwidth winfixheight statusline=\
+ \ nonu nocursorline nocursorcolumn winfixwidth winfixheight statusline=\
if exists('&rnu')
setlocal nornu
endif
@@ -115,6 +115,8 @@ function! s:tranquilize()
endfunction
function! s:goyo_on(width)
+ let s:orig_tab = tabpagenr()
+
" New tab
tab split
@@ -249,6 +251,7 @@ function! s:goyo_off()
bd
endif
tabclose
+ execute 'normal! '.s:orig_tab.'gt'
let wmh = remove(goyo_revert, 'winminheight')
let wh = remove(goyo_revert, 'winheight')
View
2 sources_non_forked/syntastic/CONTRIBUTING.md
@@ -29,7 +29,7 @@ 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.
+* 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/extractVariable.html) to aid readability.
# Syntax checker style notes
View
51 sources_non_forked/syntastic/README.markdown
@@ -40,10 +40,11 @@ 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, Puppet, Python, Racket,
-reStructuredText, Ruby, Rust, SASS/SCSS, Scala, Slim, Tcl, TeX, Texinfo, Twig,
-TypeScript, Vala, Verilog, VHDL, VimL, xHtml, XML, XSLT, YACC, YAML, z80, Zope
-page templates, and zsh.
+OCaml, Perl, Perl POD, PHP, gettext Portable Object, OS X and iOS property
+lists, Puppet, Python, Racket, R, reStructuredText, Ruby, Rust, 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
@@ -111,6 +112,8 @@ If you get an error when you do this, then you probably didn't install
## 3\. FAQ
+<a name="faqinfo"></a>
+
__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
@@ -125,6 +128,8 @@ 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.
+<a name="faqperl"></a>
+
__Q. The `perl` checker has stopped working...__
A. The `perl` checker runs `perl -c` against your file, which in turn
@@ -138,6 +143,8 @@ still producing useful results, the checker is now disabled by default. To
let g:syntastic_enable_perl_checker = 1
```
+<a name="faqloclist"></a>
+
__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`
@@ -148,6 +155,8 @@ your vimrc:
let g:syntastic_always_populate_loc_list = 1
```
+<a name="faqargs"></a>
+
__Q. How can I pass additional arguments to a checker?__
A. Almost all syntax checkers use the `makeprgBuild()` function. Those checkers
@@ -162,6 +171,8 @@ let g:syntastic_ruby_mri_args = "--my --args --here"
See `:help syntastic-checker-options` for more information.
+<a name="faqcheckers"></a>
+
__Q. Syntastic supports several checkers for my filetype - how do I tell it
which one(s) to use?__
@@ -190,6 +201,32 @@ 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 <checker>`.
+
+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_<filetype>_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`).
+
+<a name="faqaggregate"></a>
+
+__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.
+
+<a name="faqlnext"></a>
+
__Q. How can I jump between the different errors without using the location
list at the bottom of the window?__
@@ -200,6 +237,8 @@ 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).
+<a name="faqstyle"></a>
+
__Q. A syntax checker is giving me unwanted/strange style tips?__
A. Some filetypes (e.g. php) have style checkers as well as syntax
@@ -214,6 +253,8 @@ let g:syntastic_quiet_messages = { "type": "style" }
```
See `:help syntastic_quiet_messages` for details.
+<a name="faqbdelete"></a>
+
__Q. The error window is closed automatically when I :quit the current buffer
but not when I :bdelete it?__
@@ -248,5 +289,5 @@ a look at [jedi-vim][7], [python-mode][8], or [YouCompleteMe][9].
[6]: http://stackoverflow.com/questions/tagged/syntastic
[7]: https://github.com/davidhalter/jedi-vim
[8]: https://github.com/klen/python-mode
-[9]: https://github.com/Valloric/YouCompleteMe
+[9]: http://valloric.github.io/YouCompleteMe/
[10]: http://perldoc.perl.org/perlrun.html#*-c*
View
19 sources_non_forked/syntastic/autoload/syntastic/postprocess.vim
@@ -8,25 +8,6 @@ set cpo&vim
" Public functions {{{1
-function! s:compareErrorItems(a, b) " {{{2
- 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', 0) - get(a:b, 'col', 0)
- endif
-endfunction " }}}2
-
-" natural sort
-function! syntastic#postprocess#sort(errors) " {{{2
- return sort(copy(a:errors), 's:compareErrorItems')
-endfunction " }}}2
-
" merge consecutive blanks
function! syntastic#postprocess#compressWhitespace(errors) " {{{2
for e in a:errors
View
39 sources_non_forked/syntastic/autoload/syntastic/preprocess.vim
@@ -56,6 +56,45 @@ function! syntastic#preprocess#perl(errors) " {{{2
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#validator(errors) " {{{2
let out = []
for e in a:errors
View
52 sources_non_forked/syntastic/autoload/syntastic/util.vim
@@ -101,7 +101,7 @@ function! syntastic#util#wideMsg(msg) " {{{2
"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(" ", &ts - s:width(v:val) % &ts)'), '') . chunks[-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
@@ -218,6 +218,13 @@ function! syntastic#util#dictFilter(errors, filter) " {{{2
endtry
endfunction " }}}2
+function! syntastic#util#sortLoclist(errors) " {{{2
+ for e in a:errors
+ call s:setScreenColumn(e)
+ endfor
+ call sort(a:errors, 's:compareErrorItems')
+endfunction " }}}2
+
" }}}1
" Private functions {{{1
@@ -254,6 +261,49 @@ function! s:translateElement(key, term) " {{{2
return ret
endfunction " }}}2
+function! s: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
+
+function! s:setScreenColumn(item) " {{{2
+ if !has_key(a:item, 'scol')
+ let col = get(a:item, 'col', 0)
+ if col != 0 && a:item['vcol'] == 0
+ let buf = str2nr(a:item['bufnr'])
+ try
+ let line = getbufline(buf, a:item['lnum'])[0]
+ catch /\m^Vim\%((\a\+)\)\=:E684/
+ let line = ''
+ endtry
+ let a:item['scol'] = s:screenWidth(strpart(line, 0, col), getbufvar(buf, '&tabstop'))
+ else
+ let a:item['scol'] = col
+ endif
+ endif
+endfunction " }}}2
+
+function! s:compareErrorItems(a, b) " {{{2
+ if a:a['bufnr'] != a:b['bufnr']
+ " group by file
+ return a:a['bufnr'] - a:b['bufnr']
+ elseif a:a['lnum'] != a:b['lnum']
+ " sort by line
+ 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
+ " sort by screen column
+ return a:a['scol'] - a:b['scol']
+ endif
+endfunction " }}}2
+
" }}}1
let &cpo = s:save_cpo
View
44 sources_non_forked/syntastic/doc/syntastic.txt
@@ -39,6 +39,8 @@ CONTENTS *syntastic-contents*
6.2.Interaction with python-mode...........|syntastic-pymode|
6.3.Interaction with the fish shell........|syntastic-fish|
6.4.Using syntastic with the fizsh shell...|syntastic-fizsh|
+ 6.5.Interaction with Eclim.................|syntastic-eclim|
+ 6.6.Interaction with vim-virtualenv........|syntastic-vim-virtualenv|
7.About........................................|syntastic-about|
8.License......................................|syntastic-license|
@@ -186,7 +188,12 @@ 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 these labels by unsetting '|syntastic_id_checkers|'.
+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*
@@ -279,6 +286,14 @@ 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 |syntastic_aggregate_errors| is enabled, 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 the error associated with the current line to
@@ -557,10 +572,10 @@ Use |:SyntasticInfo| to see which checkers are available for a given filetype.
------------------------------------------------------------------------------
5.2 Choosing the executable *syntastic-config-exec*
- *'syntastic_<filetype>_<subchecker>_exec'*
+ *'syntastic_<filetype>_<checker>_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_<filetype>_<subchecker>_exec': >
+'g:syntastic_<filetype>_<checker>_exec': >
let g:syntastic_ruby_mri_exec = '~/bin/ruby2'
<
------------------------------------------------------------------------------
@@ -569,7 +584,7 @@ checkers is registered. You can however override it by setting the variable
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_<filetype>_<subchecker>_<option>'*
+ *'syntastic_<filetype>_<checker>_<option>'*
Checkers that use 'makeprgBuild()' construct a 'makeprg' like this: >
let makeprg = self.makeprgBuild({
\ 'exe': self.getExec(),
@@ -580,7 +595,7 @@ Checkers that use 'makeprgBuild()' construct a 'makeprg' like this: >
The result is a 'makeprg' of the form: >
<exe> <args> <filename> <post_args> <tail>
<
- *'syntastic_<filetype>_<subchecker>_exe'*
+ *'syntastic_<filetype>_<checker>_exe'*
All arguments above are optional, and can be overridden by setting global
variables 'g:syntastic_<filetype>_<checker-name>_<option-name>' - even
parameters not specified in the call to makeprgBuild(). These variables also
@@ -598,7 +613,7 @@ To override the args and the tail: >
let g:syntastic_ruby_mri_tail = "> /tmp/my-output-file-biatch"
<
The general form of the override options is: >
- syntastic_<filetype>_<subchecker>_<option-name>
+ syntastic_<filetype>_<checker>_<option-name>
<
For checkers that do not use the 'makeprgBuild()' function you will have to
look at the source code of the checker in question. If there are specific
@@ -663,6 +678,23 @@ interactive features of 'fizsh'. Using a more traditional shell such as 'zsh',
'bash', 'ksh', or the original Bourne 'sh' might be a better choice: >
set shell=zsh
<
+------------------------------------------------------------------------------
+6.5. Interaction with Eclim *syntastic-eclim*
+
+As far as syntastic is concerned there shouldn't be any compatibility problems
+with the 'Eclim' Vim plugin (see http://eclim.org/). However, at the time of
+this writing there are several reports that 'Eclim' triggers a bug in Vim that
+makes syntastic forget some of its configuration parameters. No solutions or
+workarounds are known for now.
+
+------------------------------------------------------------------------------
+6.6. Interaction with vim-virtualenv *syntastic-vim-virtualenv*
+
+At the time of this writing, syntastic can't run checkers installed
+in Python virtual environments activated by 'vim-virtualenv' (see
+https://github.com/jmcantrell/vim-virtualenv). This is a limitation of
+'vim-virtualenv'.
+
==============================================================================
7. About *syntastic-about*
View
8 sources_non_forked/syntastic/plugin/syntastic.vim
@@ -18,7 +18,7 @@ if has('reltime')
let g:syntastic_start = reltime()
endif
-let g:syntastic_version = '3.4.0'
+let g:syntastic_version = '3.4.0-34'
" Sanity checks {{{1
@@ -64,6 +64,7 @@ let g:syntastic_defaults = {
\ 'loc_list_height': 10,
\ 'quiet_messages': {},
\ 'reuse_loc_lists': (v:version >= 704),
+ \ 'sort_aggregated_errors': 1,
\ 'stl_format': '[Syntax: line:%F (%t)]',
\ 'style_error_symbol': 'S>',
\ 'style_warning_symbol': 'S>',
@@ -297,6 +298,7 @@ function! s:CacheErrors(checker_names) " {{{2
let filetypes = s:resolveFiletypes()
let aggregate_errors = syntastic#util#var('aggregate_errors')
let decorate_errors = (aggregate_errors || len(filetypes) > 1) && syntastic#util#var('id_checkers')
+ let sort_aggregated_errors = aggregate_errors && syntastic#util#var('sort_aggregated_errors')
let clist = []
for type in filetypes
@@ -352,6 +354,10 @@ function! s:CacheErrors(checker_names) " {{{2
" }}}3
call syntastic#log#debug(g:SyntasticDebugLoclist, 'aggregated:', newLoclist)
+ if sort_aggregated_errors
+ call newLoclist.sort()
+ call syntastic#log#debug(g:SyntasticDebugLoclist, 'sorted:', newLoclist)
+ endif
endif
let b:syntastic_loclist = newLoclist
View
18 sources_non_forked/syntastic/plugin/syntastic/checker.vim
@@ -13,6 +13,7 @@ function! g:SyntasticChecker.New(args) " {{{2
let newObj._filetype = a:args['filetype']
let newObj._name = a:args['name']
let newObj._exec = get(a:args, 'exec', newObj._name)
+ let newObj._sort = 0
if has_key(a:args, 'redirect')
let [filetype, name] = split(a:args['redirect'], '/')
@@ -68,13 +69,22 @@ function! g:SyntasticChecker.getLocListRaw() " {{{2
call self._populateHighlightRegexes(list)
call syntastic#log#debug(g:SyntasticDebugLoclist, name . ' raw:', list)
call self._quietMessages(list)
+ call self._sortMessages(list)
return list
endfunction " }}}2
function! g:SyntasticChecker.getLocList() " {{{2
return g:SyntasticLoclist.New(self.getLocListRaw())
endfunction " }}}2
+function! g:SyntasticChecker.getWantSort() " {{{2
+ return self._sort
+endfunction " }}}2
+
+function! g:SyntasticChecker.setWantSort(val) " {{{2
+ let self._sort = a:val
+endfunction " }}}2
+
function! g:SyntasticChecker.makeprgBuild(opts) " {{{2
let basename = self._filetype . '_' . self._name . '_'
@@ -121,6 +131,14 @@ function! g:SyntasticChecker._quietMessages(errors) " {{{2
endif
endfunction " }}}2
+function! g:SyntasticChecker._sortMessages(errors) " {{{2
+ " don't sort now if we're going to sort the aggregated list later
+ if self._sort && !(syntastic#util#var('aggregate_errors') && syntastic#util#var('sort_aggregated_errors'))
+ call syntastic#util#sortLoclist(a:errors)
+ call syntastic#log#debug(g:SyntasticDebugLoclist, 'sorted:', a:errors)
+ endif
+endfunction " }}}2
+
function! g:SyntasticChecker._populateHighlightRegexes(errors) " {{{2
if has_key(self, '_highlightRegexFunc')
for e in a:errors
View
4 sources_non_forked/syntastic/plugin/syntastic/loclist.vim
@@ -37,6 +37,10 @@ function! g:SyntasticLoclist.extend(other) " {{{2
return g:SyntasticLoclist.New(list)
endfunction " }}}2
+function! g:SyntasticLoclist.sort() " {{{2
+ call syntastic#util#sortLoclist(self._rawLoclist)
+endfunction " }}}2
+
function! g:SyntasticLoclist.isEmpty() " {{{2
return empty(self._rawLoclist)
endfunction " }}}2
View
1 sources_non_forked/syntastic/plugin/syntastic/registry.vim
@@ -60,6 +60,7 @@ let s:defaultCheckers = {
\ 'pod': ['podchecker'],
\ 'puppet': ['puppet', 'puppetlint'],
\ 'python': ['python', 'flake8', 'pylint'],
+ \ 'r': [],
\ 'racket': ['racket'],
\ 'rst': ['rst2pseudoxml'],
\ 'ruby': ['mri'],
View
2 sources_non_forked/syntastic/syntax_checkers/actionscript/mxmlc.vim
@@ -47,7 +47,7 @@ endfunction
function! SyntaxCheckers_actionscript_mxmlc_GetLocList() dict
let makeprg = self.makeprgBuild({
\ 'args_before': (g:syntastic_actionscript_mxmlc_conf != '' ?
- \ ' -load-config+=' . g:syntastic_actionscript_mxmlc_conf : ''),
+ \ ' -load-config+=' . syntastic#util#shexpand(g:syntastic_actionscript_mxmlc_conf) : ''),
\ 'args_after': '-output=' . syntastic#util#DevNull() })
let errorformat =
View
9 sources_non_forked/syntastic/syntax_checkers/c/oclint.vim
@@ -30,7 +30,6 @@ set cpo&vim
function! SyntaxCheckers_c_oclint_GetLocList() dict
let makeprg = self.makeprgBuild({
- \ 'args_after': '-text',
\ 'post_args_before': '-- -c ' . syntastic#c#ReadConfig(g:syntastic_oclint_config_file) })
let errorformat =
@@ -42,12 +41,16 @@ function! SyntaxCheckers_c_oclint_GetLocList() dict
\ '%W%f:%l:%c: warning: %m,' .
\ '%-G%.%#'
- return SyntasticMake({
+ let loclist = SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'subtype': 'Style',
- \ 'postprocess': ['compressWhitespace', 'sort'],
+ \ 'postprocess': ['compressWhitespace'],
\ 'returns': [0, 3, 5] })
+
+ call self.setWantSort(1)
+
+ return loclist
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({
View
3 sources_non_forked/syntastic/syntax_checkers/c/splint.vim
@@ -35,8 +35,11 @@ function! SyntaxCheckers_c_splint_GetLocList() dict
let errorformat =
\ '%-G%f:%l:%v: %[%#]%[%#]%[%#] Internal Bug %.%#,' .
+ \ '%-G%f(%l\,%v): %[%#]%[%#]%[%#] Internal Bug %.%#,' .
\ '%W%f:%l:%v: %m,' .
+ \ '%W%f(%l\,%v): %m,' .
\ '%W%f:%l: %m,' .
+ \ '%W%f(%l): %m,' .
\ '%-C %\+In file included from %.%#,' .
\ '%-C %\+from %.%#,' .
\ '%+C %.%#'
View
5 sources_non_forked/syntastic/syntax_checkers/css/prettycss.vim
@@ -43,13 +43,14 @@ function! SyntaxCheckers_css_prettycss_GetLocList() dict
let loclist = SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
- \ 'defaults': {'bufnr': bufnr("")},
- \ 'postprocess': ['sort'] })
+ \ 'defaults': {'bufnr': bufnr("")} })
for e in loclist
let e["text"] .= ')'
endfor
+ call self.setWantSort(1)
+
return loclist
endfunction
View
28 sources_non_forked/syntastic/syntax_checkers/haskell/hdevtools.vim
@@ -19,22 +19,28 @@ let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_haskell_hdevtools_GetLocList() dict
+ if exists('g:hdevtools_options')
+ let g:syntastic_haskell_hdevtools_args = g:hdevtools_options
+ endif
+
let makeprg = self.makeprgBuild({
- \ 'exe': self.getExecEscaped() . ' check',
- \ 'args': get(g:, 'hdevtools_options', '') })
-
- let errorformat= '\%-Z\ %#,'.
- \ '%W%f:%l:%c:\ Warning:\ %m,'.
- \ '%W%f:%l:%c:\ Warning:,'.
- \ '%E%f:%l:%c:\ %m,'.
- \ '%E%>%f:%l:%c:,'.
- \ '%+C\ \ %#%m,'.
- \ '%W%>%f:%l:%c:,'.
- \ '%+C\ \ %#%tarning:\ %m,'
+ \ 'exe_after': 'check',
+ \ 'fname': syntastic#util#shexpand('%:p') })
+
+ let errorformat =
+ \ '%-Z %#,'.
+ \ '%W%f:%l:%v: Warning: %m,'.
+ \ '%W%f:%l:%v: Warning:,'.
+ \ '%E%f:%l:%v: %m,'.
+ \ '%E%>%f:%l:%v:,'.
+ \ '%+C %#%m,'.
+ \ '%W%>%f:%l:%v:,'.
+ \ '%+C %#%tarning: %m,'
return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
+ \ 'defaults': {'vcol': 1},
\ 'postprocess': ['compressWhitespace'] })
endfunction
View
8 sources_non_forked/syntastic/syntax_checkers/haskell/hlint.vim
@@ -14,16 +14,18 @@ let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_haskell_hlint_GetLocList() dict
- let makeprg = self.makeprgBuild({})
+ let makeprg = self.makeprgBuild({
+ \ 'fname': syntastic#util#shexpand('%:p')})
let errorformat =
- \ '%E%f:%l:%c: Error: %m,' .
- \ '%W%f:%l:%c: Warning: %m,' .
+ \ '%E%f:%l:%v: Error: %m,' .
+ \ '%W%f:%l:%v: Warning: %m,' .
\ '%C%m'
return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
+ \ 'defaults': {'vcol': 1},
\ 'postprocess': ['compressWhitespace'] })
endfunction
View
43 sources_non_forked/syntastic/syntax_checkers/haskell/scan.vim
@@ -0,0 +1,43 @@
+"============================================================================
+"File: scan.vim
+"Description: Syntax checking plugin for syntastic.vim
+"Maintainer: LCD 47 <lcd047 at gmail dot com>
+"License: This program is free software. It comes without any warranty,
+" to the extent permitted by applicable law. You can redistribute
+" it and/or modify it under the terms of the Do What The Fuck You
+" Want To Public License, Version 2, as published by Sam Hocevar.
+" See http://sam.zoy.org/wtfpl/COPYING for more details.
+"
+"============================================================================
+
+if exists('g:loaded_syntastic_haskell_scan_checker')
+ finish
+endif
+let g:loaded_syntastic_haskell_scan_checker = 1
+
+let s:save_cpo = &cpo
+set cpo&vim
+
+function! SyntaxCheckers_haskell_scan_GetLocList() dict
+ let makeprg = self.makeprgBuild({})
+
+ let errorformat = '%f:%l:%v: %m'
+
+ let loclist = SyntasticMake({
+ \ 'makeprg': makeprg,
+ \ 'errorformat': errorformat,
+ \ 'subtype': 'Style' })
+
+ call self.setWantSort(1)
+
+ return loclist
+endfunction
+
+call g:SyntasticRegistry.CreateAndRegisterChecker({
+ \ 'filetype': 'haskell',
+ \ 'name': 'scan'})
+
+let &cpo = s:save_cpo
+unlet s:save_cpo
+
+" vim: set et sts=4 sw=4:
View
3 sources_non_forked/syntastic/syntax_checkers/html/jshint.vim
@@ -34,7 +34,8 @@ endfunction
function! SyntaxCheckers_html_jshint_GetLocList() dict
let makeprg = self.makeprgBuild({
\ 'exe': expand(g:syntastic_jshint_exec),
- \ 'args': (g:syntastic_html_jshint_conf != '' ? '--config ' . g:syntastic_html_jshint_conf : ''),
+ \ 'args': (g:syntastic_html_jshint_conf != '' ?
+ \ '--config ' . syntastic#util#shexpand(g:syntastic_html_jshint_conf) : ''),
\ 'args_after': '--verbose --extract always' })
let errorformat = '%A%f: line %l\, col %v\, %m \(%t%*\d\)'
View
194 sources_non_forked/syntastic/syntax_checkers/html/tidy.vim
@@ -10,7 +10,15 @@
"
"============================================================================
"
-" Checker option:
+" Note: if you need to check HTML5 sources, you might consider installing a
+" fork of HTML Tidy, named "HTML Tidy for HTML5":
+"
+" http://w3c.github.io/tidy-html5/
+"
+" HTML Tidy for HTML5 can be used without changes by this checker, just install
+" it and point g:syntastic_html_tidy_exec to the executable.
+"
+" Checker options:
"
" - g:syntastic_html_tidy_ignore_errors (list; default: [])
" list of errors to ignore
@@ -48,108 +56,108 @@ set cpo&vim
" 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',
- \}
+ \ '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 = [
- \ "<table> lacks \"summary\" attribute",
- \ "not approved by W3C",
- \ "<input> proprietary attribute \"placeholder\"",
- \ "<meta> proprietary attribute \"charset\"",
- \ "<meta> lacks \"content\" attribute",
- \ "inserting \"type\" attribute",
- \ "proprietary attribute \"data-",
- \ "missing <!DOCTYPE> declaration",
- \ "inserting implicit <body>",
- \ "inserting missing 'title' element",
- \ "unescaped & or unknown entity",
- \ "<input> 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\""
- \ ]
+ \ "<table> lacks \"summary\" attribute",
+ \ "not approved by W3C",
+ \ "<input> proprietary attribute \"placeholder\"",
+ \ "<meta> proprietary attribute \"charset\"",
+ \ "<meta> lacks \"content\" attribute",
+ \ "inserting \"type\" attribute",
+ \ "proprietary attribute \"data-",
+ \ "missing <!DOCTYPE> declaration",
+ \ "inserting implicit <body>",
+ \ "inserting missing 'title' element",
+ \ "unescaped & or unknown entity",
+ \ "<input> 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\""
+ \ ]
let s:blocklevel_tags = [
- \ "main",
- \ "section",
- \ "article",
- \ "aside",
- \ "header",
- \ "footer",
- \ "nav",
- \ "figure",
- \ "figcaption"
- \ ]
+ \ "main",
+ \ "section",
+ \ "article",
+ \ "aside",
+ \ "header",
+ \ "footer",
+ \ "nav",
+ \ "figure",
+ \ "figcaption"
+ \ ]
let s:inline_tags = [
- \ "video",
- \ "audio",
- \ "source",
- \ "embed",
- \ "mark",
- \ "progress",
- \ "meter",
- \ "time",
- \ "ruby",
- \ "rt",
- \ "rp",
- \ "canvas",
- \ "command",
- \ "details",
- \ "datalist"
- \ ]
+ \ "video",
+ \ "audio",
+ \ "source",
+ \ "embed",
+ \ "mark",
+ \ "progress",
+ \ "meter",
+ \ "time",
+ \ "ruby",
+ \ "rt",
+ \ "rp",
+ \ "canvas",
+ \ "command",
+ \ "details",
+ \ "datalist"
+ \ ]
let s:empty_tags = [
- \ "wbr",
- \ "keygen"
- \ ]
+ \ "wbr",
+ \ "keygen"
+ \ ]
function! s:IgnoreError(text)
for i in s:ignore_errors + g:syntastic_html_tidy_ignore_errors
View
5 sources_non_forked/syntastic/syntax_checkers/java/checkstyle.vim
@@ -37,8 +37,9 @@ function! SyntaxCheckers_java_checkstyle_GetLocList() dict
let makeprg = self.makeprgBuild({
\ 'args_after': '-cp ' . g:syntastic_java_checkstyle_classpath .
- \ ' com.puppycrawl.tools.checkstyle.Main -c ' . g:syntastic_java_checkstyle_conf_file .
- \ ' -f xml',
+ \ ' 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'
View
22 sources_non_forked/syntastic/syntax_checkers/java/javac.vim
@@ -43,7 +43,7 @@ let s:save_cpo = &cpo
set cpo&vim
function! s:CygwinPath(path)
- return substitute(system("cygpath -m " . a:path), '\n', '', 'g')
+ return substitute(system("cygpath -m " . syntastic#util#shescape(a:path)), '\n', '', 'g')
endfunction
if !exists("g:syntastic_java_javac_temp_dir")
@@ -123,8 +123,8 @@ function! s:SplitClasspath(classpath)
endfunction
function! s:LoadConfigFile()
- if filereadable(g:syntastic_java_javac_config_file)
- exe 'source '.g:syntastic_java_javac_config_file
+ if filereadable(expand(g:syntastic_java_javac_config_file))
+ exe 'source ' . fnameescape(expand(g:syntastic_java_javac_config_file))
endif
endfunction
@@ -137,9 +137,9 @@ function! s:SaveClasspath()
endfor
" save classpath to config file
if g:syntastic_java_javac_config_file_enabled
- if filereadable(g:syntastic_java_javac_config_file)
+ if filereadable(expand(g:syntastic_java_javac_config_file))
" load lines from config file
- let lines = readfile(g:syntastic_java_javac_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)
@@ -155,7 +155,7 @@ function! s:SaveClasspath()
" add new g:syntastic_java_javac_classpath option to config
call add(lines, 'let g:syntastic_java_javac_classpath = "'.path.'"')
" save config file lines
- call writefile(lines, g:syntastic_java_javac_config_file)
+ call writefile(lines, expand(g:syntastic_java_javac_config_file))
endif
" set new classpath
let g:syntastic_java_javac_classpath = path
@@ -192,7 +192,7 @@ function! s:SaveConfig()
let lines = getline(1, line('$'))
if g:syntastic_java_javac_config_file_enabled
" save config file lines
- call writefile(lines, g:syntastic_java_javac_config_file)
+ call writefile(lines, expand(g:syntastic_java_javac_config_file))
endif
let &modified = 0
endfunction
@@ -202,8 +202,8 @@ function! s:EditConfig()
let winnr = bufwinnr('^' . command . '$')
if winnr < 0
let lines = []
- if filereadable(g:syntastic_java_javac_config_file)
- let lines = readfile(g:syntastic_java_javac_config_file)
+ 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)
@@ -329,7 +329,7 @@ function! s:MavenOutputDirectory()
endif
if has('win32unix')
- let output_dir=s:CygwinPath(output_dir)
+ let output_dir = s:CygwinPath(output_dir)
endif
return output_dir
endif
@@ -408,7 +408,7 @@ function! SyntaxCheckers_java_javac_GetLocList() dict
let fname = fnameescape(expand ( '%:p:h' ) . sep . expand ( '%:t' ))
if has('win32unix')
- let fname = s:CygwinPath(fname)
+ let fname = s:CygwinPath(fname)
endif
let makeprg = self.makeprgBuild({
View
15 sources_non_forked/syntastic/syntax_checkers/javascript/eslint.vim
@@ -21,22 +21,31 @@ endif
let s:save_cpo = &cpo
set cpo&vim
+function! SyntaxCheckers_javascript_eslint_IsAvailable() dict
+ return
+ \ executable('eslint') &&
+ \ syntastic#util#versionIsAtLeast(syntastic#util#getVersion('eslint --version'), [0, 1])
+endfunction
+
function! SyntaxCheckers_javascript_eslint_GetLocList() dict
let makeprg = self.makeprgBuild({
- \ 'args': (g:syntastic_javascript_eslint_conf != '' ? '--config ' . g:syntastic_javascript_eslint_conf : '') })
+ \ 'args_before': '-f compact',
+ \ 'args': (g:syntastic_javascript_eslint_conf != '' ?
+ \ '--config ' . syntastic#util#shexpand(g:syntastic_javascript_eslint_conf) : '') })
let errorformat =
\ '%E%f: line %l\, col %c\, Error - %m'
let loclist = SyntasticMake({
\ 'makeprg': makeprg,
- \ 'errorformat': errorformat,
- \ 'postprocess': ['sort'] })
+ \ 'errorformat': errorformat })
for e in loclist
let e['col'] += 1
endfor
+ call self.setWantSort(1)
+
return loclist
endfunction
View
9 sources_non_forked/syntastic/syntax_checkers/javascript/jscs.vim
@@ -19,14 +19,19 @@ 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'
- return SyntasticMake({
+
+ let loclist = SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'subtype': 'Style',
\ 'preprocess': 'checkstyle',
- \ 'postprocess': ['sort'],
\ 'returns': [0, 2] })
+
+ call self.setWantSort(1)
+
+ return loclist
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({
View
15 sources_non_forked/syntastic/syntax_checkers/javascript/jshint.vim
@@ -25,19 +25,22 @@ function! SyntaxCheckers_javascript_jshint_IsAvailable() dict
if !exists('g:syntastic_jshint_exec')
let g:syntastic_jshint_exec = self.getExec()
endif
- return executable(expand(g:syntastic_jshint_exec))
+ if !executable(expand(g:syntastic_jshint_exec))
+ return 0
+ endif
+ let s:jshint_version = syntastic#util#getVersion(syntastic#util#shexpand(g:syntastic_jshint_exec) . ' --version')
+ return syntastic#util#versionIsAtLeast(s:jshint_version, [1])
endfunction
function! SyntaxCheckers_javascript_jshint_GetLocList() dict
- let exe = syntastic#util#shexpand(g:syntastic_jshint_exec)
if !exists('s:jshint_new')
- let s:jshint_new =
- \ syntastic#util#versionIsAtLeast(syntastic#util#getVersion(exe . ' --version'), [1, 1])
+ let s:jshint_new = syntastic#util#versionIsAtLeast(s:jshint_version, [1, 1])
endif
let makeprg = self.makeprgBuild({
- \ 'exe': exe,
- \ 'args': (g:syntastic_javascript_jshint_conf != '' ? '--config ' . g:syntastic_javascript_jshint_conf : ''),
+ \ 'exe': syntastic#util#shexpand(g:syntastic_jshint_exec),
+ \ 'args': (g:syntastic_javascript_jshint_conf != '' ?
+ \ '--config ' . syntastic#util#shexpand(g:syntastic_javascript_jshint_conf) : ''),
\ 'args_after': (s:jshint_new ? '--verbose ' : '') })
let errorformat = s:jshint_new ?
View
3 sources_non_forked/syntastic/syntax_checkers/javascript/jsl.vim
@@ -23,7 +23,8 @@ set cpo&vim
function! SyntaxCheckers_javascript_jsl_GetLocList() dict
let makeprg = self.makeprgBuild({
- \ 'args': (g:syntastic_javascript_jsl_conf != '' ? '-conf ' . g:syntastic_javascript_jsl_conf : ''),
+ \ 'args': (g:syntastic_javascript_jsl_conf != '' ?
+ \ '-conf ' . syntastic#util#shexpand(g:syntastic_javascript_jsl_conf) : ''),
\ 'args_after': '-nologo -nofilelisting -nosummary -nocontext -process' })
let errorformat =
View
4 sources_non_forked/syntastic/syntax_checkers/javascript/jsxhint.vim
@@ -18,10 +18,6 @@ let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_javascript_jsxhint_IsAvailable() dict
- if !executable('jshint') || !syntastic#util#versionIsAtLeast(syntastic#util#getVersion('jshint --version'), [1, 1])
- return 0
- endif
-
let jsxhint_version = system(self.getExecEscaped() . ' --version')
return
\ v:shell_error == 0 &&
View
5 sources_non_forked/syntastic/syntax_checkers/python/pylama.vim
@@ -32,8 +32,7 @@ function! SyntaxCheckers_python_pylama_GetLocList() dict
let loclist = SyntasticMake({
\ 'makeprg': makeprg,
- \ 'errorformat': errorformat,
- \ 'postprocess': ['sort'] })
+ \ 'errorformat': errorformat })
" adjust for weirdness in each checker
for e in loclist
@@ -53,6 +52,8 @@ function! SyntaxCheckers_python_pylama_GetLocList() dict
endif