Skip to content

Commit

Permalink
Updated plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
amix committed Sep 27, 2014
1 parent 2a9908e commit 89c36a0
Show file tree
Hide file tree
Showing 97 changed files with 3,609 additions and 1,629 deletions.
327 changes: 174 additions & 153 deletions autoload/pathogen.vim

Large diffs are not rendered by default.

14 changes: 10 additions & 4 deletions sources_non_forked/goyo.vim/plugin/goyo.vim
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ function! s:setup_pad(bufnr, vert, size)
execute win . 'wincmd w'
execute (a:vert ? 'vertical ' : '') . 'resize ' . max([0, a:size])
augroup goyop
autocmd WinEnter,CursorMoved <buffer> call s:blank()
autocmd WinEnter,CursorMoved <buffer> nested call s:blank()
autocmd WinLeave <buffer> call s:hide_statusline()
augroup END

" To hide scrollbars of pad windows in GVim
Expand Down Expand Up @@ -114,6 +115,10 @@ function! s:tranquilize()
endfor
endfunction

function! s:hide_statusline()
let &l:statusline = repeat(' ', winwidth(0))
endfunction

function! s:goyo_on(width)
let s:orig_tab = tabpagenr()

Expand All @@ -131,7 +136,6 @@ function! s:goyo_on(width)
\ 'winwidth': &winwidth,
\ 'winminheight': &winminheight,
\ 'winheight': &winheight,
\ 'statusline': &statusline,
\ 'ruler': &ruler,
\ 'sidescroll': &sidescroll,
\ 'sidescrolloff': &sidescrolloff
Expand Down Expand Up @@ -211,19 +215,20 @@ function! s:goyo_on(width)
call s:resize_pads()
call s:tranquilize()

let &statusline = repeat(' ', winwidth(0))

augroup goyo
autocmd!
autocmd BufWinLeave <buffer> call s:goyo_off()
autocmd TabLeave * call s:goyo_off()
autocmd VimResized * call s:resize_pads()
autocmd ColorScheme * call s:tranquilize()
autocmd WinEnter,WinLeave <buffer> call s:hide_statusline()
augroup END

call s:hide_statusline()
if exists('g:goyo_callbacks[0]')
call g:goyo_callbacks[0]()
endif
silent! doautocmd User GoyoEnter
endfunction

function! s:goyo_off()
Expand Down Expand Up @@ -312,6 +317,7 @@ function! s:goyo_off()
if exists('g:goyo_callbacks[1]')
call g:goyo_callbacks[1]()
endif
silent! doautocmd User GoyoLeave
endfunction

function! s:goyo(bang, ...)
Expand Down
4 changes: 2 additions & 2 deletions sources_non_forked/nerdtree/doc/NERD_tree.txt
Original file line number Diff line number Diff line change
Expand Up @@ -462,8 +462,8 @@ Jump to the previous sibling of the selected node.
------------------------------------------------------------------------------
*NERDTree-C*
Default key: C
Map option: NERDTreeMapChdir
Applies to: directories.
Map option: NERDTreeMapChangeRoot
Applies to: files and directories.

Make the selected directory node the new tree root. If a file is selected, its
parent is used.
Expand Down
81 changes: 55 additions & 26 deletions sources_non_forked/syntastic/README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,12 @@ 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.
Objective-C++, OCaml, Perl, Perl POD, PHP, gettext Portable Object, OS X and
iOS property lists, Puppet, Python, Racket, R, reStructuredText, RPM spec,
Ruby, SASS/SCSS, Scala, Slim, Tcl, TeX, Texinfo, Twig, TypeScript, Vala,
Verilog, VHDL, VimL, xHtml, XML, XSLT, YACC, YAML, z80, Zope page templates,
and zsh. See the [wiki][3] for details about the corresponding supported
checkers.

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
Expand Down Expand Up @@ -127,6 +128,16 @@ 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="faqpython3"></a>

__Q. The `python` checker complains about syntactically valid Python 3 constructs...__

A. Configure the `python` checker to call a Python 3 interpreter rather than
Python 2, e.g:
```vim
let g:syntastic_python_python_exec = '/path/to/python3'
```

<a name="faqperl"></a>

__Q. The `perl` checker has stopped working...__
Expand All @@ -153,7 +164,8 @@ automatically by syntastic.

<a name="faqloclist"></a>

__Q. I run a checker and the location list is not updated...__
__Q. I run a checker and the location list is not updated...__
__Q. I run`:lopen` or `:lwindow` and the error window is empty...__

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
Expand Down Expand Up @@ -200,8 +212,7 @@ To tell syntastic to use `pylint`, you would use this setting:
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:
Checkers can be chained together like this:
```vim
let g:syntastic_php_checkers = ['php', 'phpcs', 'phpmd']
```
Expand All @@ -219,7 +230,37 @@ e.g. to run `phpcs` and `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`).
filetype of the current file is `php`).

<a name="faqstyle"></a>

__Q. What is the difference between syntax checkers and style checkers?__

A. The errors and warnings they produce are highlighted differently and can
be filtered by different rules, but otherwise the distinction is pretty much
arbitrary. There is an ongoing effort to keep things consistent, so you can
_generally_ expect messages produced by syntax checkers to be _mostly_ related
to syntax, and messages produced by style checkers to be _mostly_ about style.
But there can be no formal guarantee that, say, a style checker that runs into
a syntax error wouldn't die with a fatal message, nor that a syntax checker
wouldn't give you warnings against using some constructs as being bad practice.
There is also no guarantee that messages marked as "style" are less severe than
the ones marked as "syntax" (whatever that might mean). And there are even a
few Frankenstein checkers (for example `flake8` and `pylama`) that, by their
nature, produce both kinds of messages. Syntastic is not smart enough to be
able to sort out these things by itself.

In fact it's more useful to look at this from the perspective of filtering
unwanted messages, rather than as an indicator of severity levels. The
distinction between syntax and style is orthogonal to the distinction between
errors and warnings, and thus you can turn off messages based on level, on
type, or both.

e.g. To disable all style messages:
```vim
let g:syntastic_quiet_messages = { "type": "style" }
```
See `:help syntastic_quiet_messages` for details.

<a name="faqaggregate"></a>

Expand All @@ -238,29 +279,13 @@ 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
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).

<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
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.

<a name="faqbdelete"></a>

__Q. The error window is closed automatically when I :quit the current buffer
Expand Down Expand Up @@ -303,3 +328,7 @@ a look at [jedi-vim][7], [python-mode][8], or [YouCompleteMe][9].
[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/

<!--
vim:tw=79:sw=4:
-->
66 changes: 33 additions & 33 deletions sources_non_forked/syntastic/autoload/syntastic/c.vim
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,17 @@ endfunction " }}}2
" GetLocList() for C-like compilers
function! syntastic#c#GetLocList(filetype, subchecker, options) " {{{2
try
let flags = s:getCflags(a:filetype, a:subchecker, a:options)
let flags = s:_getCflags(a:filetype, a:subchecker, a:options)
catch /\m\C^Syntastic: skip checks$/
return []
endtry

let makeprg = syntastic#util#shexpand(g:syntastic_{a:filetype}_compiler) .
\ ' ' . flags . ' ' . syntastic#util#shexpand('%')

let errorformat = s:getCheckerVar('g', a:filetype, a:subchecker, 'errorformat', a:options['errorformat'])
let errorformat = s:_getCheckerVar('g', a:filetype, a:subchecker, 'errorformat', a:options['errorformat'])

let postprocess = s:getCheckerVar('g', a:filetype, a:subchecker, 'remove_include_errors', 0) ?
let postprocess = s:_getCheckerVar('g', a:filetype, a:subchecker, 'remove_include_errors', 0) ?
\ ['filterForeignErrors'] : []

" process makeprg
Expand All @@ -87,29 +87,29 @@ endfunction " }}}2
" Private functions {{{1

" initialize c/cpp syntax checker handlers
function! s:init() " {{{2
function! s:_init() " {{{2
let s:handlers = []
let s:cflags = {}

call s:regHandler('\m\<cairo', 'syntastic#c#checkPKG', ['cairo', 'cairo'])
call s:regHandler('\m\<freetype', 'syntastic#c#checkPKG', ['freetype', 'freetype2', 'freetype'])
call s:regHandler('\m\<glade', 'syntastic#c#checkPKG', ['glade', 'libglade-2.0', 'libglade'])
call s:regHandler('\m\<glib', 'syntastic#c#checkPKG', ['glib', 'glib-2.0', 'glib'])
call s:regHandler('\m\<gtk', 'syntastic#c#checkPKG', ['gtk', 'gtk+-2.0', 'gtk+', 'glib-2.0', 'glib'])
call s:regHandler('\m\<libsoup', 'syntastic#c#checkPKG', ['libsoup', 'libsoup-2.4', 'libsoup-2.2'])
call s:regHandler('\m\<libxml', 'syntastic#c#checkPKG', ['libxml', 'libxml-2.0', 'libxml'])
call s:regHandler('\m\<pango', 'syntastic#c#checkPKG', ['pango', 'pango'])
call s:regHandler('\m\<SDL', 'syntastic#c#checkPKG', ['sdl', 'sdl'])
call s:regHandler('\m\<opengl', 'syntastic#c#checkPKG', ['opengl', 'gl'])
call s:regHandler('\m\<webkit', 'syntastic#c#checkPKG', ['webkit', 'webkit-1.0'])

call s:regHandler('\m\<php\.h\>', 'syntastic#c#checkPHP', [])
call s:regHandler('\m\<Python\.h\>', 'syntastic#c#checkPython', [])
call s:regHandler('\m\<ruby', 'syntastic#c#checkRuby', [])
call s:_regHandler('\m\<cairo', 'syntastic#c#checkPKG', ['cairo', 'cairo'])
call s:_regHandler('\m\<freetype', 'syntastic#c#checkPKG', ['freetype', 'freetype2', 'freetype'])
call s:_regHandler('\m\<glade', 'syntastic#c#checkPKG', ['glade', 'libglade-2.0', 'libglade'])
call s:_regHandler('\m\<glib', 'syntastic#c#checkPKG', ['glib', 'glib-2.0', 'glib'])
call s:_regHandler('\m\<gtk', 'syntastic#c#checkPKG', ['gtk', 'gtk+-2.0', 'gtk+', 'glib-2.0', 'glib'])
call s:_regHandler('\m\<libsoup', 'syntastic#c#checkPKG', ['libsoup', 'libsoup-2.4', 'libsoup-2.2'])
call s:_regHandler('\m\<libxml', 'syntastic#c#checkPKG', ['libxml', 'libxml-2.0', 'libxml'])
call s:_regHandler('\m\<pango', 'syntastic#c#checkPKG', ['pango', 'pango'])
call s:_regHandler('\m\<SDL', 'syntastic#c#checkPKG', ['sdl', 'sdl'])
call s:_regHandler('\m\<opengl', 'syntastic#c#checkPKG', ['opengl', 'gl'])
call s:_regHandler('\m\<webkit', 'syntastic#c#checkPKG', ['webkit', 'webkit-1.0'])

call s:_regHandler('\m\<php\.h\>', 'syntastic#c#checkPHP', [])
call s:_regHandler('\m\<Python\.h\>', 'syntastic#c#checkPython', [])
call s:_regHandler('\m\<ruby', 'syntastic#c#checkRuby', [])
endfunction " }}}2

" return a handler dictionary object
function! s:regHandler(regex, function, args) " {{{2
function! s:_regHandler(regex, function, args) " {{{2
let handler = {}
let handler["regex"] = a:regex
let handler["func"] = function(a:function)
Expand All @@ -118,7 +118,7 @@ function! s:regHandler(regex, function, args) " {{{2
endfunction " }}}2

" resolve checker-related user variables
function! s:getCheckerVar(scope, filetype, subchecker, name, default) " {{{2
function! s:_getCheckerVar(scope, filetype, subchecker, name, default) " {{{2
let prefix = a:scope . ':' . 'syntastic_'
if exists(prefix . a:filetype . '_' . a:subchecker . '_' . a:name)
return {a:scope}:syntastic_{a:filetype}_{a:subchecker}_{a:name}
Expand All @@ -130,10 +130,10 @@ function! s:getCheckerVar(scope, filetype, subchecker, name, default) " {{{2
endfunction " }}}2

" resolve user CFLAGS
function! s:getCflags(ft, ck, opts) " {{{2
function! s:_getCflags(ft, ck, opts) " {{{2
" determine whether to parse header files as well
if has_key(a:opts, 'header_names') && expand('%') =~? a:opts['header_names']
if s:getCheckerVar('g', a:ft, a:ck, 'check_header', 0)
if s:_getCheckerVar('g', a:ft, a:ck, 'check_header', 0)
let flags = get(a:opts, 'header_flags', '') . ' -c ' . syntastic#c#NullOutput()
else
" checking headers when check_header is unset: bail out
Expand All @@ -143,21 +143,21 @@ function! s:getCflags(ft, ck, opts) " {{{2
let flags = get(a:opts, 'main_flags', '')
endif

let flags .= ' ' . s:getCheckerVar('g', a:ft, a:ck, 'compiler_options', '') . ' ' . s:getIncludeDirs(a:ft)
let flags .= ' ' . s:_getCheckerVar('g', a:ft, a:ck, 'compiler_options', '') . ' ' . s:_getIncludeDirs(a:ft)

" check if the user manually set some cflags
let b_cflags = s:getCheckerVar('b', a:ft, a:ck, 'cflags', '')
let b_cflags = s:_getCheckerVar('b', a:ft, a:ck, 'cflags', '')
if b_cflags == ''
" check whether to search for include files at all
if !s:getCheckerVar('g', a:ft, a:ck, 'no_include_search', 0)
if !s:_getCheckerVar('g', a:ft, a:ck, 'no_include_search', 0)
if a:ft ==# 'c' || a:ft ==# 'cpp'
" refresh the include file search if desired
if s:getCheckerVar('g', a:ft, a:ck, 'auto_refresh_includes', 0)
let flags .= ' ' . s:searchHeaders()
if s:_getCheckerVar('g', a:ft, a:ck, 'auto_refresh_includes', 0)
let flags .= ' ' . s:_searchHeaders()
else
" search for header includes if not cached already
if !exists('b:syntastic_' . a:ft . '_includes')
let b:syntastic_{a:ft}_includes = s:searchHeaders()
let b:syntastic_{a:ft}_includes = s:_searchHeaders()
endif
let flags .= ' ' . b:syntastic_{a:ft}_includes
endif
Expand All @@ -169,15 +169,15 @@ function! s:getCflags(ft, ck, opts) " {{{2
endif

" add optional config file parameters
let config_file = s:getCheckerVar('g', a:ft, a:ck, 'config_file', '.syntastic_' . a:ft . '_config')
let config_file = s:_getCheckerVar('g', a:ft, a:ck, 'config_file', '.syntastic_' . a:ft . '_config')
let flags .= ' ' . syntastic#c#ReadConfig(config_file)

return flags
endfunction " }}}2

" get the gcc include directory argument depending on the default
" includes and the optional user-defined 'g:syntastic_c_include_dirs'
function! s:getIncludeDirs(filetype) " {{{2
function! s:_getIncludeDirs(filetype) " {{{2
let include_dirs = []

if a:filetype =~# '\v^%(c|cpp|objc|objcpp)$' &&
Expand All @@ -195,7 +195,7 @@ endfunction " }}}2

" search the first 100 lines for include statements that are
" given in the handlers dictionary
function! s:searchHeaders() " {{{2
function! s:_searchHeaders() " {{{2
let includes = ''
let files = []
let found = []
Expand Down Expand Up @@ -324,7 +324,7 @@ let s:default_includes = [
\ '..' . syntastic#util#Slash() . 'include',
\ '..' . syntastic#util#Slash() . 'includes' ]

call s:init()
call s:_init()

let &cpo = s:save_cpo
unlet s:save_cpo
Expand Down
Loading

0 comments on commit 89c36a0

Please sign in to comment.