Updated plugins

pull/179/head
amix 7 years ago
parent 71fc570357
commit 20729bff94
  1. 16
      sources_non_forked/syntastic/CONTRIBUTING.md
  2. 48
      sources_non_forked/syntastic/README.markdown
  3. 15
      sources_non_forked/syntastic/autoload/syntastic/util.vim
  4. 80
      sources_non_forked/syntastic/doc/syntastic.txt
  5. 2
      sources_non_forked/syntastic/plugin/syntastic.vim
  6. 7
      sources_non_forked/syntastic/plugin/syntastic/registry.vim
  7. 14
      sources_non_forked/syntastic/plugin/syntastic/signs.vim
  8. 1
      sources_non_forked/syntastic/syntax_checkers/haskell/hlint.vim
  9. 56
      sources_non_forked/syntastic/syntax_checkers/python/pep257.vim
  10. 66
      sources_non_forked/syntastic/syntax_checkers/python/pydocstyle.vim
  11. 6
      sources_non_forked/vim-airline-themes/autoload/airline/themes/lucius.vim
  12. 34
      sources_non_forked/vim-airline/CHANGELOG.md
  13. 14
      sources_non_forked/vim-airline/ISSUE_TEMPLATE.md
  14. 5
      sources_non_forked/vim-airline/autoload/airline.vim
  15. 4
      sources_non_forked/vim-airline/autoload/airline/extensions.vim
  16. 2
      sources_non_forked/vim-airline/autoload/airline/extensions/branch.vim
  17. 36
      sources_non_forked/vim-airline/autoload/airline/extensions/po.vim
  18. 39
      sources_non_forked/vim-airline/autoload/airline/extensions/tabline.vim
  19. 35
      sources_non_forked/vim-airline/autoload/airline/extensions/tabline/buffers.vim
  20. 117
      sources_non_forked/vim-airline/autoload/airline/extensions/tabline/ctrlspace.vim
  21. 32
      sources_non_forked/vim-airline/autoload/airline/extensions/tabline/tabs.vim
  22. 8
      sources_non_forked/vim-airline/autoload/airline/extensions/whitespace.vim
  23. 11
      sources_non_forked/vim-airline/autoload/airline/init.vim
  24. 6
      sources_non_forked/vim-airline/autoload/airline/parts.vim
  25. 46
      sources_non_forked/vim-airline/doc/airline.txt
  26. 4
      sources_non_forked/vim-commentary/plugin/commentary.vim
  27. 4
      sources_non_forked/vim-fugitive/doc/fugitive.txt
  28. 50
      sources_non_forked/vim-fugitive/plugin/fugitive.vim
  29. 9
      sources_non_forked/vim-go/.github/CONTRIBUTING.md
  30. 30
      sources_non_forked/vim-go/.github/ISSUE_TEMPLATE.md
  31. 34
      sources_non_forked/vim-go/autoload/go/alternate.vim
  32. 14
      sources_non_forked/vim-go/autoload/go/cmd.vim
  33. 7
      sources_non_forked/vim-go/autoload/go/complete.vim
  34. 2
      sources_non_forked/vim-go/autoload/go/def.vim
  35. 10
      sources_non_forked/vim-go/autoload/go/doc.vim
  36. 53
      sources_non_forked/vim-go/autoload/go/fmt.vim
  37. 2
      sources_non_forked/vim-go/autoload/go/import.vim
  38. 4
      sources_non_forked/vim-go/autoload/go/oracle.vim
  39. 6
      sources_non_forked/vim-go/autoload/go/util.vim
  40. 4
      sources_non_forked/vim-go/ftplugin/go/commands.vim
  41. 8
      sources_non_forked/vim-go/ftplugin/go/mappings.vim
  42. 2
      sources_non_forked/vim-go/plugin/go.vim
  43. 23
      sources_non_forked/vim-go/syntax/go.vim
  44. 2
      sources_non_forked/vim-markdown/ftplugin/markdown.vim
  45. 4
      sources_non_forked/vim-snipmate/autoload/snipMate.vim
  46. 12
      sources_non_forked/vim-snipmate/plugin/snipMate.vim
  47. 4
      sources_non_forked/vim-snippets/README.md
  48. 2
      sources_non_forked/vim-snippets/UltiSnips/django.snippets
  49. 35
      sources_non_forked/vim-snippets/UltiSnips/go.snippets
  50. 6
      sources_non_forked/vim-snippets/UltiSnips/javascript.snippets
  51. 6
      sources_non_forked/vim-snippets/UltiSnips/rust.snippets
  52. 10
      sources_non_forked/vim-snippets/snippets/elixir.snippets
  53. 49
      sources_non_forked/vim-snippets/snippets/go.snippets
  54. 2
      sources_non_forked/vim-snippets/snippets/javascript/javascript.node.snippets
  55. 4
      sources_non_forked/vim-snippets/snippets/ruby.snippets
  56. 4
      sources_non_forked/vim-snippets/snippets/rust.snippets

@ -11,11 +11,11 @@
## 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
[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`
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.
@ -26,7 +26,7 @@ When creating a new issue be sure to state the following:
* 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
that you are using. Adding debugging information is typically useful
too:
* open a file handled by your checker;
@ -38,10 +38,10 @@ too:
## 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 features
you want to add exist already.
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 possible that some features you want to add exist
already.
To submit a patch:
@ -54,7 +54,7 @@ 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
Also, make sure to update the manual whenever applicable. Nobody can use
features that aren't documented.
<a name="generalstyle"></a>

@ -35,7 +35,7 @@
4.8. [How can I pass additional arguments to a checker?](#faqargs)
4.9. [Syntastic supports several checkers for my filetype - how do I tell which one(s) to use?](#faqcheckers)
4.10. [What is the difference between syntax checkers and style checkers?](#faqstyle)
4.11. [I have enabled multiple checkers for the current filetype. How can I display all errors from all checkers together?](#faqaggregate)
4.11. [I have enabled multiple checkers for the current filetype. How can I display all errors from all checkers together?](#faqaggregate)
4.12. [How can I jump between the different errors without using the location list at the bottom of the window?](#faqlnext)
4.13. [The error window is closed automatically when I :quit the current buffer but not when I :bdelete it?](#faqbdelete)
5. [Resources](#otherresources)
@ -64,7 +64,7 @@ Object, OS X and iOS property lists, Pug (formerly Jade), Puppet, Python, QML,
R, Racket, Relax NG, reStructuredText, RPM spec, Ruby, SASS/SCSS, Scala, Slim,
SML, Sphinx, SQL, Stylus, Tcl, TeX, Texinfo, Twig, TypeScript, Vala, Verilog,
VHDL, VimL, xHtml, XML, XSLT, XQuery, YACC, YAML, z80, Zope page templates, and
zsh. See the [wiki][3] for details about the corresponding supported checkers.
zsh. See the [wiki][3] for details about the corresponding supported checkers.
A number of third-party Vim plugins also provide checkers for syntastic,
for example: [merlin][30], [omnisharp-vim][25], [rust.vim][12],
@ -72,7 +72,7 @@ for example: [merlin][30], [omnisharp-vim][25], [rust.vim][12],
[vim-eastwood][28], and [vim-swift][24].
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
errors. Note that, in practise, you will only have a subset of these methods
enabled.
![Screenshot 1][0]
@ -105,6 +105,12 @@ Syntastic should work with any modern plugin managers for Vim, such as
[Vundle][17]. Instructions for installing syntastic with [Pathogen][1] are
included below for completeness.
Starting with Vim version 7.4.1486 you can also load syntastic using the
standard mechanism of packages, without the help of third-party plugin managers
(see `:help packages` in Vim for details). Beware however that, while support
for packages has been added in Vim 7.4.1384, the functionality needed by
syntastic is present only in versions 7.4.1486 and later.
Last but not least: syntastic doesn't know how to do any syntax checks by
itself. In order to get meaningful results you need to install external
checkers corresponding to the types of files you use. Please consult the
@ -122,7 +128,7 @@ If you already have [Pathogen][1] working then skip [Step 1](#step1) and go to
#### 2.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`
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 && \
@ -148,7 +154,7 @@ 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][1] right. Go back to [Step 1](#step1) and make sure you did the
[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.
@ -161,7 +167,7 @@ following:
## 3\. Recommended settings
Syntastic has numerous options that can be configured, and the defaults
are not particularly well suitable for new users. It is recommended
are not particularly well suitable for new users. It is recommended
that you start by adding the following lines to your `vimrc` file, and
return to them after reading the manual (see `:help syntastic` in Vim):
```vim
@ -231,8 +237,8 @@ let g:syntastic_python_python_exec = '/path/to/python3'
__4.3. Q. Are there any local checkers for HTML5 that I can use with syntastic?__
[HTML Tidy][18] has a fork named [HTML Tidy for HTML5][19]. It's a drop
in replacement, and syntastic can use it without changes. Just install it
[HTML Tidy][18] has a fork named [HTML Tidy for HTML5][19]. It's a drop
in replacement, and syntastic can use it without changes. Just install it
somewhere and point `g:syntastic_html_tidy_exec` to its executable:
```vim
let g:syntastic_html_tidy_exec = 'tidy5'
@ -253,12 +259,12 @@ __4.4. 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`:
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
```
@ -267,7 +273,7 @@ let g:syntastic_enable_perl_checker = 1
__4.5. Q. What happened to the `rustc` checker?__
A. It is now part of the [rust.vim][12] plugin. If you install this plugin the
A. It is now part of the [rust.vim][12] plugin. If you install this plugin the
checker should be picked up automatically by syntastic.
<a name="faqxcrun"></a>
@ -275,7 +281,7 @@ checker should be picked up automatically by syntastic.
__4.6. Q. What happened to the `xcrun` checker?__
A. The `xcrun` checker used to have a security problem and it has been removed.
A better checker for __Swift__ is part of the [vim-swift][24] plugin. If you
A better checker for __Swift__ is part of the [vim-swift][24] plugin. If you
install this plugin the checker should be picked up automatically by syntastic.
<a name="faqloclist"></a>
@ -284,7 +290,7 @@ __4.7. Q. I run a checker and the location list is not updated...__
__4.7. 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
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
@ -367,7 +373,7 @@ 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
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.
@ -380,7 +386,7 @@ See `:help syntastic_quiet_messages` for details.
<a name="faqaggregate"></a>
__4.11. Q. I have enabled multiple checkers for the current filetype. How can I
__4.11. Q. I have enabled multiple checkers for the current filetype. How can I
display all errors from all checkers together?__
A. Set `g:syntastic_aggregate_errors` to 1 in your `vimrc`:
@ -426,8 +432,8 @@ 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
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 [ghcmod-vim][31], [jedi-vim][7], [python-mode][8], [vim-go][32], or
[YouCompleteMe][9].

@ -240,7 +240,12 @@ function! syntastic#util#findGlobInParent(what, where) abort " {{{2
let old = ''
while here !=# ''
let p = split(globpath(here, a:what, 1), '\n')
try
" Vim 7.4.279 and later
let p = globpath(here, a:what, 1, 1)
catch /\m^Vim\%((\a\+)\)\=:E118/
let p = split(globpath(here, a:what, 1), "\n")
endtry
if !empty(p)
return fnamemodify(p[0], ':p')
@ -499,7 +504,13 @@ function! s:_rmrf(what) abort " {{{2
return
endif
for f in split(globpath(a:what, '*', 1), "\n")
try
" Vim 7.4.279 and later
let entries = globpath(a:what, '*', 1, 1)
catch /\m^Vim\%((\a\+)\)\=:E118/
let entries = split(globpath(a:what, '*', 1), "\n")
endtry
for f in entries
call s:_rmrf(f)
endfor
silent! call syntastic#util#system(s:rmdir . ' ' . syntastic#util#shescape(a:what))

@ -64,8 +64,8 @@ CONTENTS *syntastic-contents*
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
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.
@ -103,8 +103,8 @@ list with |:SyntasticReset|, and you can use |:SyntasticToggleMode| to switch
between active (checking on writing the buffer) and passive (manual) checking.
You don't have to switch focus to the |location-list| window to jump to the
different errors. Vim provides several built-in commands for this, for
example |:lnext| and |:lprevious|. You may want to add shortcut mappings for
different errors. Vim provides several built-in commands for this, for
example |:lnext| and |:lprevious|. You may want to add shortcut mappings for
these commands, or perhaps install a plugin such as Tim Pope's 'unimpaired'
(see https://github.com/tpope/vim-unimpaired) that provides such mappings.
@ -242,7 +242,7 @@ 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
type, then column number. Otherwise messages produced by the same checker are
grouped together, and sorting within each group is decided by the variables
|'syntastic_<filetype>_<checker>_sort'|.
@ -274,17 +274,17 @@ for more info.
:SyntasticCheck *:SyntasticCheck*
Manually cause a syntax check to be done. By default the checkers in the
Manually cause a syntax check to be done. By default the checkers in the
|'g:syntastic_<filetype>_checkers'| or |'b:syntastic_checkers'| lists are run,
cf. |syntastic-filetype-checkers|. If |'syntastic_aggregate_errors'| is unset
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
The command may be followed by a (space separated) list of checkers. In this
case |'g:syntastic_<filetype>_checkers'| and |'b:syntastic_checkers'| are
ignored, and the checkers named by the command's arguments are run instead, in
the order specified. The set by |'syntastic_aggregate_errors'| still apply.
the order specified. The set by |'syntastic_aggregate_errors'| still apply.
Example: >
:SyntasticCheck flake8 pylint
@ -319,7 +319,7 @@ when buffers are first loaded, as well as on saving: >
*'syntastic_check_on_wq'*
Default: 1
In active mode syntax checks are normally run whenever buffers are written to
disk, even when the writes happen just before quitting Vim. If you want to
disk, even when the writes happen just before quitting Vim. If you want to
skip checks when you issue |:wq|, |:x|, and |:ZZ|, set this variable to 0: >
let g:syntastic_check_on_wq = 0
<
@ -347,7 +347,7 @@ 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
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
<
@ -413,7 +413,7 @@ option to tell syntastic to always stick any detected errors into the
<
Please note that if |'syntastic_auto_jump'| is set to a non-zero value the
location list is overwritten with Syntastic's own list when taking a jump,
regardless of the value of |'syntastic_always_populate_loc_list'|. The
regardless of the value of |'syntastic_always_populate_loc_list'|. The
location list is also overwritten when running the |:Errors| command.
*'syntastic_auto_jump'*
@ -469,10 +469,10 @@ opens. >
<
*'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
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: >
to specify case-insensitive patterns. Example: >
let g:syntastic_ignore_files = ['\m^/usr/include/', '\m\c\.h$']
<
*'syntastic_filetype_map'*
@ -504,7 +504,7 @@ The option should be set to something like: >
<
"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
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
@ -531,7 +531,7 @@ whether the corresponding buffer should be checked automatically.
*'syntastic_quiet_messages'*
Default: {}
Use this option to filter out some of the messages produced by checkers. The
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": "errors",
@ -646,20 +646,20 @@ The above variable can be used to disable exit code checks in syntastic.
Default: Vim's 'shell'
This is the (full path to) the shell syntastic will use to run the checkers.
On UNIX and Mac OS-X this shell must accept Bourne-compatible syntax for
file "stdout" and "stderr" redirections ">file" and "2>file". Examples of
file "stdout" and "stderr" redirections ">file" and "2>file". Examples of
compatible shells are "zsh", "bash", "ksh", and of course the original Bourne
"sh".
This shell is independent of Vim's 'shell', and it isn't used for interactive
operations. It must take care to initialize all environment variables needed
by the checkers you're using. Example: >
operations. It must take care to initialize all environment variables needed
by the checkers you're using. Example: >
let g:syntastic_shell = "/bin/sh"
<
*'syntastic_nested_autocommands'*
Default: 0
Controls whether syntastic's autocommands |BufReadPost| and |BufWritePost|
are called from other |BufReadPost| and |BufWritePost| autocommands (see
|autocmd-nested|). This is known to trigger interoperability problems with
|autocmd-nested|). This is known to trigger interoperability problems with
other plugins, so only enable it if you actually need that functionality.
*'syntastic_debug'*
@ -688,7 +688,7 @@ addition to being added to Vim's |message-history|: >
<
*'syntastic_extra_filetypes'*
Default: []
List of filetypes handled by checkers external to syntastic. If you have a Vim
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: >
@ -710,7 +710,7 @@ variable 'g:syntastic_<filetype>_checkers' to a list of checkers, e.g. >
<
*'b:syntastic_checkers'*
There is also a per-buffer version of this setting, 'b:syntastic_checkers'.
When set, it takes precedence over |'g:syntastic_<filetype>_checkers'|. You can
When set, it takes precedence over |'g:syntastic_<filetype>_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
@ -856,19 +856,19 @@ composite filetypes to simple ones using |'syntastic_filetype_map'|, e.g.: >
6.2 Editing files over network *syntastic-netrw*
The standard plugin |netrw| allows Vim to transparently edit files over
network and inside archives. Currently syntastic doesn't support this mode
of operation. It can only check files that can be accessed directly by local
network and inside archives. Currently syntastic doesn't support this mode
of operation. It can only check files that can be accessed directly by local
checkers, without any translation or conversion.
------------------------------------------------------------------------------
6.3 The 'shellslash' option *syntastic-shellslash*
The 'shellslash' option is relevant only on Windows systems. This option
The 'shellslash' option is relevant only on Windows systems. This option
determines (among other things) the rules for quoting command lines, and there
is no easy way for syntastic to make sure its state is appropriate for your
shell. It should be turned off if your 'shell' (or |'syntastic_shell'|) is
shell. It should be turned off if your 'shell' (or |'syntastic_shell'|) is
"cmd.exe", and on for shells that expect an UNIX-like syntax, such as Cygwin's
"sh". Most checkers will stop working if 'shellslash' is set to the wrong
"sh". Most checkers will stop working if 'shellslash' is set to the wrong
value.
------------------------------------------------------------------------------
@ -887,8 +887,8 @@ quickfix windows.
------------------------------------------------------------------------------
7.1 The csh and tcsh shells *syntastic-csh*
The "csh" and "tcsh" shells are mostly compatible with syntastic. However,
some checkers assume Bourne shell syntax for redirecting "stderr". For this
The "csh" and "tcsh" shells are mostly compatible with syntastic. However,
some checkers assume Bourne shell syntax for redirecting "stderr". For this
reason, you should point |'syntastic_shell'| to a Bourne-compatible shell,
such as "zsh", "bash", "ksh", or even the original Bourne "sh": >
let g:syntastic_shell = "/bin/sh"
@ -961,7 +961,7 @@ packaged with a syntastic segment. To customize this segment create a file
At the time of this writing, syntastic is not compatible with using "Windows
PowerShell" (http://technet.microsoft.com/en-us/library/bb978526.aspx) as Vim's
'shell'. You may still run Vim from 'PowerShell', but you do have to point
'shell'. You may still run Vim from 'PowerShell', but you do have to point
Vim's 'shell' to a more traditional program, such as "cmd.exe": >
set shell=cmd.exe
<
@ -980,18 +980,18 @@ for python in syntastic (see |'syntastic_mode_map'|), or disable lint checks in
7.9. vim-auto-save *syntastic-vim-auto-save*
Syntastic can be used together with the "vim-auto-save" Vim plugin (see
https://github.com/907th/vim-auto-save). However, syntastic checks in active
https://github.com/907th/vim-auto-save). However, syntastic checks in active
mode only work with "vim-auto-save" version 0.1.7 or later.
------------------------------------------------------------------------------
7.10. vim-go *syntastic-vim-go*
Syntastic can be used along with the "vim-go" Vim plugin (see
https://github.com/fatih/vim-go). However, both "vim-go" and syntastic run
syntax checks by default when you save buffers to disk. To avoid conflicts,
https://github.com/fatih/vim-go). However, both "vim-go" and syntastic run
syntax checks by default when you save buffers to disk. To avoid conflicts,
you have to either set passive mode in syntastic for the go filetype (see
|syntastic_mode_map|), or prevent "vim-go" from showing a quickfix window when
|g:go_fmt_command| fails, by setting |g:go_fmt_fail_silently| to 1. E.g.: >
|g:go_fmt_command| fails, by setting |g:go_fmt_fail_silently| to 1. E.g.: >
let g:go_fmt_fail_silently = 1
<
------------------------------------------------------------------------------
@ -999,16 +999,16 @@ you have to either set passive mode in syntastic for the go filetype (see
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
https://github.com/jmcantrell/vim-virtualenv). This is a limitation of
"vim-virtualenv".
------------------------------------------------------------------------------
7.12 YouCompleteMe *syntastic-ycm*
Syntastic can be used together with the "YouCompleteMe" Vim plugin (see
http://valloric.github.io/YouCompleteMe/). However, by default "YouCompleteMe"
http://valloric.github.io/YouCompleteMe/). However, by default "YouCompleteMe"
disables syntastic's checkers for the "c", "cpp", "objc", and "objcpp"
filetypes, in order to allow its own checkers to run. If you want to use YCM's
filetypes, in order to allow its own checkers to run. If you want to use YCM's
identifier completer but still run syntastic's checkers for those filetypes you
have to set |g:ycm_show_diagnostics_ui| to 0. E.g.: >
let g:ycm_show_diagnostics_ui = 0
@ -1018,9 +1018,9 @@ have to set |g:ycm_show_diagnostics_ui| to 0. E.g.: >
If you're running MacVim together with the "zsh" shell (http://www.zsh.org/)
you need to be aware that MacVim does not source your .zshrc file, but will
source a .zshenv file. Consequently you have to move any setup steps relevant
source a .zshenv file. Consequently you have to move any setup steps relevant
to the checkers you're using from .zshrc to .zshenv, otherwise your checkers
will misbehave when run by syntastic. This is particularly important for
will misbehave when run by syntastic. This is particularly important for
programs such as "rvm" (https://rvm.io/) or "rbenv" (http://rbenv.org/), that
rely on setting environment variables.

@ -19,7 +19,7 @@ if has('reltime')
lockvar! g:_SYNTASTIC_START
endif
let g:_SYNTASTIC_VERSION = '3.7.0-88'
let g:_SYNTASTIC_VERSION = '3.7.0-99'
lockvar g:_SYNTASTIC_VERSION
" Sanity checks {{{1

@ -164,7 +164,7 @@ function! g:SyntasticRegistry.CreateAndRegisterChecker(args) abort " {{{2
if has_key(a:args, 'redirect')
let [ft, name] = split(a:args['redirect'], '/')
call registry._loadCheckersFor(ft)
call registry._loadCheckersFor(ft, 1)
let clone = get(registry._checkerMap[ft], name, {})
if empty(clone)
@ -320,8 +320,9 @@ function! g:SyntasticRegistry._filterCheckersByName(checkers_map, list) abort "
return filter( map(copy(a:list), 'get(a:checkers_map, v:val, {})'), '!empty(v:val)' )
endfunction " }}}2
function! g:SyntasticRegistry._loadCheckersFor(filetype) abort " {{{2
if has_key(self._checkerMap, a:filetype)
function! g:SyntasticRegistry._loadCheckersFor(filetype, ...) abort " {{{2
" XXX: a:1 == 1 means re-scan checkers for filetype
if has_key(self._checkerMap, a:filetype) && (!a:0 || !a:1)
return
endif

@ -21,13 +21,6 @@ let s:setup_done = 0
function! g:SyntasticSignsNotifier.New() abort " {{{2
let newObj = copy(self)
if !s:setup_done
call self._setup()
let s:setup_done = 1
lockvar s:setup_done
endif
return newObj
endfunction " }}}2
@ -37,8 +30,15 @@ endfunction " }}}2
function! g:SyntasticSignsNotifier.refresh(loclist) abort " {{{2
call syntastic#log#debug(g:_SYNTASTIC_DEBUG_NOTIFICATIONS, 'signs: refresh')
let old_signs = copy(self._bufSignIds())
if self.enabled()
if !s:setup_done
call self._setup()
let s:setup_done = 1
lockvar s:setup_done
endif
call self._signErrors(a:loclist)
endif
call self._removeSigns(old_signs)

@ -21,6 +21,7 @@ function! SyntaxCheckers_haskell_hlint_GetLocList() dict
\ '%E%f:%l:%v: Error while reading hint file\, %m,' .
\ '%E%f:%l:%v: Error: %m,' .
\ '%W%f:%l:%v: Warning: %m,' .
\ '%W%f:%l:%v: Suggestion: %m,' .
\ '%C%m'
return SyntasticMake({

@ -1,6 +1,13 @@
"============================================================================
"File: pep257.vim
"Description: Docstring style checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"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_python_pep257_checker')
@ -8,52 +15,9 @@ if exists('g:loaded_syntastic_python_pep257_checker')
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(self.getVersion(), [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
\ 'name': 'pep257',
\ 'redirect': 'python/pydocstyle'})
" vim: set sw=4 sts=4 et fdm=marker:

@ -0,0 +1,66 @@
"============================================================================
"File: pydocstyle.vim
"Description: Syntax checking plugin for syntastic
"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_python_pydocstyle_checker')
finish
endif
let g:loaded_syntastic_python_pydocstyle_checker = 1
let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_python_pydocstyle_GetLocList() dict
if !exists('s:pydocstyle_new')
let s:pydocstyle_new = syntastic#util#versionIsAtLeast(self.getVersion(), [0, 3])
endif
let makeprg = self.makeprgBuild({})
if s:pydocstyle_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:pydocstyle_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': 'pydocstyle'})
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set sw=4 sts=4 et fdm=marker:

@ -50,6 +50,12 @@ function! airline#themes#lucius#refresh()
\ 'red': airline#themes#get_highlight('Constant'),
\ }
" Extra tabline colors
let s:TS = airline#themes#get_highlight('TabLineSel')
let g:airline#themes#lucius#palette.tabline = {}
let g:airline#themes#lucius#palette.tabline.airline_tabsel = s:TS
let g:airline#themes#lucius#palette.tabline.airline_tabsel_right = s:TS
endfunction
call airline#themes#lucius#refresh()

@ -3,16 +3,31 @@
This is the Changelog for the vim-airline project.
## [Unreleased]
## [0.8] - 2016-03-09
- Changes
- Themes have been moved into an extra repository [vim-airline-themes](https://github.com/vim-airline/vim-airline-themes)
- Many new themes
- Airline Moved to new [repository](https://github.com/vim-airline/vim-airline)
- New features
- Integration with [taboo](https://github.com/gcmt/taboo.vim), [vim-ctrlspace](https://github.com/szw/vim-ctrlspace),
[quickfixsigns](https://github.com/tomtom/quickfixsigns_vim), [YouCompleteMe](https://github.com/Valloric/YouCompleteMe)
- Airline converted to an organization and moved to new [repository](https://github.com/vim-airline/vim-airline)
- Themes have been split into an separate repository [vim-airline-themes](https://github.com/vim-airline/vim-airline-themes)
- Improvements
- Extensions
- branch: support Git and Mercurial simultaneously, untracked files
- whitespace: new mixed-indent rule
- Windows support
- Many bug fixes
- Support for Neovim
- Added wordcount extension
- Adding Crypt and Byte Order Mark Indicator
- New features
- Many new themes
- Extensions/integration
- [taboo](https://github.com/gcmt/taboo.vim)
- [vim-ctrlspace](https://github.com/szw/vim-ctrlspace)
- [quickfixsigns](https://github.com/tomtom/quickfixsigns_vim)
- [YouCompleteMe](https://github.com/Valloric/YouCompleteMe)
- [po.vim](http://www.vim.org/scripts/script.php?script_id=695)
- [unicode.vim](https://github.com/chrisbra/unicode.vim)
- wordcount
- crypt indicator
- byte order mark indicator
- Tabline's tab mode can display splits simultaneously
## [0.7] - 2014-12-10
- New features
@ -94,7 +109,8 @@ This is the Changelog for the vim-airline project.
- integration with other plugins: netrw, unite, nerdtree, undotree, gundo, tagbar, minibufexplr, ctrlp
- support for themes: 8 included
[Unreleased]: https://github.com/vim-airline/vim-airline/compare/v0.7...HEAD
[Unreleased]: https://github.com/vim-airline/vim-airline/compare/v0.8...HEAD
[0.8]: https://github.com/vim-airline/vim-airline/compare/v0.7...v0.8
[0.7]: https://github.com/vim-airline/vim-airline/compare/v0.6...v0.7
[0.6]: https://github.com/vim-airline/vim-airline/compare/v0.5...v0.6
[0.5]: https://github.com/vim-airline/vim-airline/compare/v0.4...v0.5

@ -0,0 +1,14 @@
#### environment
- vim: ????
- vim-airline: ????
- OS: ????
- terminal: ????
#### actual behavior
????
#### expected behavior
????

@ -72,9 +72,10 @@ endfunction
function! airline#switch_matching_theme()
if exists('g:colors_name')
let existing = g:airline_theme
let theme = substitute(g:colors_name, '-', '_', 'g')
try
let palette = g:airline#themes#{g:colors_name}#palette
call airline#switch_theme(g:colors_name)
let palette = g:airline#themes#{theme}#palette
call airline#switch_theme(theme)
return 1
catch
for map in items(g:airline_theme_map)

@ -210,6 +210,10 @@ function! airline#extensions#load()
call airline#extensions#whitespace#init(s:ext)
endif
if get(g:, 'airline#extensions#po#enabled', 1) && executable('msgfmt')
call airline#extensions#po#init(s:ext)
endif
if get(g:, 'airline#extensions#wordcount#enabled', 1)
call airline#extensions#wordcount#init(s:ext)
endif

@ -154,7 +154,7 @@ function! airline#extensions#branch#head()
if exists("g:airline#extensions#branch#displayed_head_limit")
let w:displayed_head_limit = g:airline#extensions#branch#displayed_head_limit
if len(b:airline_head) > w:displayed_head_limit - 1
let b:airline_head = b:airline_head[0:w:displayed_head_limit - 1].'…'
let b:airline_head = b:airline_head[0:(w:displayed_head_limit - 1)].(&encoding ==? 'utf-8' ? '…' : '.')
endif
endif

@ -0,0 +1,36 @@
" MIT License. Copyright (c) 2013-2016 Bailey Ling.
" vim: et ts=2 sts=2 sw=2
function! airline#extensions#po#apply(...)
if &ft ==# 'po'
call airline#extensions#prepend_to_section('z', '%{airline#extensions#po#stats()}')
autocmd airline BufWritePost * unlet! b:airline_po_stats
endif
endfunction
function! airline#extensions#po#stats()
if exists('b:airline_po_stats') && !empty(b:airline_po_stats)
return b:airline_po_stats
endif
let airline_po_stats = system('msgfmt --statistics -o /dev/null -- '. expand('%:p'))
if v:shell_error
return ''
endif
try
let b:airline_po_stats = '['. split(airline_po_stats, '\n')[0]. ']'
catch
let b:airline_po_stats = ''
endtry
if exists("g:airline#extensions#po#displayed_limit")
let w:displayed_po_limit = g:airline#extensions#po#displayed_limit
if len(b:airline_po_stats) > w:displayed_po_limit - 1
let b:airline_po_stats = b:airline_po_stats[0:(w:displayed_po_limit - 1)].(&encoding==?'utf-8' ? '…' : '.')
endif
endif
return b:airline_po_stats
endfunction
function! airline#extensions#po#init(ext)
call a:ext.add_statusline_func('airline#extensions#po#apply')
endfunction

@ -5,6 +5,7 @@ let s:formatter = get(g:, 'airline#extensions#tabline#formatter', 'default')
let s:show_buffers = get(g:, 'airline#extensions#tabline#show_buffers', 1)
let s:show_tabs = get(g:, 'airline#extensions#tabline#show_tabs', 1)
let s:ignore_bufadd_pat = get(g:, 'airline#extensions#tabline#ignore_bufadd_pat', '\c\vgundo|undotree|vimfiler|tagbar|nerd_tree')
let s:taboo = get(g:, 'airline#extensions#taboo#enabled', 1) && get(g:, 'loaded_taboo', 0)
if s:taboo
let g:taboo_tabline = 0
@ -41,27 +42,21 @@ function! s:toggle_on()
endfunction
function! s:update_tabline()
if get(g:, 'airline#extensions#tabline#disable_refresh', 0)
return
endif
let match = expand('<afile>')
if pumvisible()
return
elseif !get(g:, 'airline#extensions#tabline#enabled', 0)
return
" return, if buffer matches ignore pattern or is directory (netrw)
elseif empty(match)
elseif empty(match)
\ || match(match, s:ignore_bufadd_pat) > -1
\ || isdirectory(expand("<afile>"))
return
endif
if empty(mapcheck("<Plug>AirlineTablineRefresh", 'n'))
noremap <silent> <Plug>AirlineTablineRefresh :set mod!<cr>
endif
call feedkeys("\<Plug>AirlineTablineRefresh")
call feedkeys("\<Plug>AirlineTablineRefresh")
"call feedkeys(',,', 't')
"call feedkeys(':unmap ,,')
" force re-evaluation of tabline setting
" disable explicit redraw, may cause E315
"redraw
doautocmd User BufMRUChange
endfunction
function! airline#extensions#tabline#load_theme(palette)
@ -92,6 +87,7 @@ function! airline#extensions#tabline#load_theme(palette)
" Theme for tabs on the right
let l:tabsel_right = get(colors, 'airline_tabsel_right', a:palette.normal.airline_a)
let l:tab_right = get(colors, 'airline_tab_right', a:palette.inactive.airline_c)
let l:tabmod_right = get(colors, 'airline_tabmod_right', a:palette.insert.airline_a)
let l:tabhid_right = get(colors, 'airline_tabhid_right', a:palette.normal.airline_c)
if has_key(a:palette, 'normal_modified') && has_key(a:palette.normal_modified, 'airline_c')
@ -100,6 +96,7 @@ function! airline#extensions#tabline#load_theme(palette)
"Fall back to normal airline_c if modified airline_c isn't present
let l:tabmodu_right = get(colors, 'airline_tabmod_unsel_right', a:palette.normal.airline_c)
endif
call airline#highlighter#exec('airline_tab_right', l:tab_right)
call airline#highlighter#exec('airline_tabsel_right', l:tabsel_right)
call airline#highlighter#exec('airline_tabmod_right', l:tabmod_right)
call airline#highlighter#exec('airline_tabhid_right', l:tabhid_right)
@ -163,3 +160,23 @@ function! airline#extensions#tabline#new_builder()
return airline#builder#new(builder_context)
endfunction
function! airline#extensions#tabline#group_of_bufnr(tab_bufs, bufnr)
let cur = bufnr('%')
if cur == a:bufnr
if g:airline_detect_modified && getbufvar(a:bufnr, '&modified')
let group = 'airline_tabmod'
else
let group = 'airline_tabsel'
endif
else
if g:airline_detect_modified && getbufvar(a:bufnr, '&modified')
let group = 'airline_tabmod_unsel'
elseif index(a:tab_bufs, a:bufnr) > -1
let group = 'airline_tab'
else
let group = 'airline_tabhid'
endif
endif
return group
endfunction

@ -5,6 +5,7 @@ scriptencoding utf-8
let s:buffer_idx_mode = get(g:, 'airline#extensions#tabline#buffer_idx_mode', 0)
let s:show_tab_type = get(g:, 'airline#extensions#tabline#show_tab_type', 1)
let s:buffers_label = get(g:, 'airline#extensions#tabline#buffers_label', 'buffers')
let s:spc = g:airline_symbols.space
let s:current_bufnr = -1
@ -64,23 +65,16 @@ function! airline#extensions#tabline#buffers#get()
continue
endif
if cur == nr
if g:airline_detect_modified && getbufvar(nr, '&modified')
let group = 'airline_tabmod'
else
let group = 'airline_tabsel'
endif
let group = airline#extensions#tabline#group_of_bufnr(tab_bufs, nr)
if nr == cur
let s:current_modified = (group == 'airline_tabmod') ? 1 : 0
else
if g:airline_detect_modified && getbufvar(nr, '&modified')
let group = 'airline_tabmod_unsel'
elseif index(tab_bufs, nr) > -1
let group = 'airline_tab'
else
let group = 'airline_tabhid'
endif
endif
" Neovim feature: Have clickable buffers
if has("tablineat")
call b.add_raw('%'.nr.'@airline#extensions#tabline#buffers#switchbuf@')
endif
if s:buffer_idx_mode
if len(s:number_map) > 0
call b.add_section(group, s:spc . get(s:number_map, l:index, '') . '%(%{airline#extensions#tabline#get_buffer_name('.nr.')}%)' . s:spc)
@ -91,13 +85,16 @@ function! airline#extensions#tabline#buffers#get()
else
call b.add_section(group, s:spc.'%(%{airline#extensions#tabline#get_buffer_name('.nr.')}%)'.s:spc)
endif
if has("tablineat")
call b.add_raw('%X')
endif
endfor
call b.add_section('airline_tabfill', '')
call b.split()
call b.add_section('airline_tabfill', '')
if s:show_tab_type
call b.add_section('airline_tabtype', ' buffers ')
call b.add_section_spaced('airline_tabtype', s:buffers_label)
endif
let s:current_bufnr = cur
@ -198,3 +195,11 @@ function s:map_keys()
noremap <silent> <Plug>AirlineSelectNextTab :<C-u>call <SID>jump_to_tab(v:count1)<CR>
endif
endfunction
function airline#extensions#tabline#buffers#switchbuf(minwid, clicks, button, modifiers) abort
" Run the following code only on a single left mouse button click without modifiers pressed
" works only in recent NeoVim with has('tablineat')
if a:clicks == 1 && a:button is# 'l' && a:modifiers !~# '[^ ]'
sil execute 'buffer' a:minwid
endif
endfunction

@ -7,6 +7,12 @@ let s:current_bufnr = -1
let s:current_tabnr = -1
let s:current_tabline = ''
let s:buffers_label = get(g:, 'airline#extensions#tabline#buffers_label', 'buffers')
let s:tabs_label = get(g:, 'airline#extensions#tabline#tabs_label', 'tabs')
let s:switch_buffers_and_tabs = get(g:, 'airline#extensions#tabline#switch_buffers_and_tabs', 0)
let s:show_buffers = get(g:, 'airline#extensions#tabline#show_buffers', 1)
let s:show_tabs = get(g:, 'airline#extensions#tabline#show_tabs', 1)
function! airline#extensions#tabline#ctrlspace#off()
augroup airline_tabline_ctrlspace
autocmd!
@ -25,73 +31,114 @@ function! airline#extensions#tabline#ctrlspace#invalidate()
let s:current_tabnr = -1
endfunction
function! airline#extensions#tabline#ctrlspace#get()
let cur_buf = bufnr('%')
let s:tab_list = ctrlspace#api#TabList()
for tab in s:tab_list
if tab.current
let cur_tab = tab.index
endif
endfor
if cur_buf == s:current_bufnr && cur_tab == s:current_tabnr
return s:current_tabline
function! airline#extensions#tabline#ctrlspace#add_buffer_section(builder, cur_tab, cur_buf, pos)
if a:pos == 0
let pos_extension = ''
else
let pos_extension = '_right'
endif
let b = airline#extensions#tabline#new_builder()
call b.add_section_spaced('airline_tabtype', 'buffers')
let s:buffer_list = ctrlspace#api#BufferList(cur_tab)
let s:buffer_list = ctrlspace#api#BufferList(a:cur_tab)
for buffer in s:buffer_list
if cur_buf == buffer.index
if a:cur_buf == buffer.index
if buffer.modified
let group = 'airline_tabmod'
let group = 'airline_tabmod'.pos_extension
else
let group = 'airline_tabsel'
let group = 'airline_tabsel'.pos_extension
endif
else
if buffer.modified
let group = 'airline_tabmod_unsel'
let group = 'airline_tabmod_unsel'.pos_extension
elseif buffer.visible
let group = 'airline_tab'
let group = 'airline_tab'.pos_extension
else
let group = 'airline_tabhid'
let group = 'airline_tabhid'.pos_extension
endif
endif
let buf_name = '%(%{airline#extensions#tabline#get_buffer_name('.buffer.index.')}%)'
call b.add_section_spaced(group, buf_name)
call a:builder.add_section_spaced(group, buf_name)
endfor
endfunction
call b.add_section('airline_tabfill', '')
call b.split()
call b.add_section('airline_tabfill', '')
function! airline#extensions#tabline#ctrlspace#add_tab_section(builder, pos)
if a:pos == 0
let pos_extension = ''
else
let pos_extension = '_right'
endif
for tab in s:tab_list
if tab.current
if tab.modified
let group = 'airline_tabmod_right'
let group = 'airline_tabmod'.pos_extension
else
let group = 'airline_tabsel_right'
let group = 'airline_tabsel'.pos_extension
endif
else
if tab.modified
let group = 'airline_tabmod_unsel_right'
let group = 'airline_tabmod_unsel'.pos_extension
else
let group = 'airline_tabhid_right'
let group = 'airline_tabhid'.pos_extension
endif
endif
call b.add_section_spaced(group, tab.title.ctrlspace#api#TabBuffersNumber(tab.index))
call a:builder.add_section_spaced(group, tab.title.ctrlspace#api#TabBuffersNumber(tab.index))
endfor
endfunction
function! airline#extensions#tabline#ctrlspace#get()
let cur_buf = bufnr('%')
let s:tab_list = ctrlspace#api#TabList()
for tab in s:tab_list
if tab.current
let cur_tab = tab.index
endif
endfor
call b.add_section_spaced('airline_tabtype', 'tabs')
if cur_buf == s:current_bufnr && cur_tab == s:current_tabnr
return s:current_tabline
endif
let builder = airline#extensions#tabline#new_builder()
" Add left tabline content
if s:show_buffers == 0
call airline#extensions#tabline#ctrlspace#add_tab_section(builder, 0)
elseif s:show_tabs == 0
call airline#extensions#tabline#ctrlspace#add_buffer_section(builder, cur_tab, cur_buf, 0)
else
if s:switch_buffers_and_tabs == 0
call builder.add_section_spaced('airline_tabtype', s:buffers_label)
call airline#extensions#tabline#ctrlspace#add_buffer_section(builder, cur_tab, cur_buf, 0)
else
call builder.add_section_spaced('airline_tabtype', s:tabs_label)
call airline#extensions#tabline#ctrlspace#add_tab_section(builder, 0)
endif
endif
call builder.add_section('airline_tabfill', '')
call builder.split()
call builder.add_section('airline_tabfill', '')
" Add right tabline content
if s:show_buffers == 0
call builder.add_section_spaced('airline_tabtype', s:tabs_label)
elseif s:show_tabs == 0
call builder.add_section_spaced('airline_tabtype', s:buffers_label)
else
if s:switch_buffers_and_tabs == 0
call airline#extensions#tabline#ctrlspace#add_tab_section(builder, 1)
call builder.add_section_spaced('airline_tabtype', s:tabs_label)
else
call airline#extensions#tabline#ctrlspace#add_buffer_section(builder, cur_tab, cur_buf, 1)
call builder.add_section_spaced('airline_tabtype', s:buffers_label)
endif
endif
let s:current_bufnr = cur_buf
let s:current_tabnr = cur_tab
let s:current_tabline = b.build()
let s:current_tabline = builder.build()
return s:current_tabline
endfunction

@ -1,11 +1,14 @@
" MIT License. Copyright (c) 2013-2016 Bailey Ling.
" vim: et ts=2 sts=2 sw=2
let s:show_tab_nr = get(g:, 'airline#extensions#tabline#show_tab_nr', 1)
let s:tab_nr_type = get(g:, 'airline#extensions#tabline#tab_nr_type', 0)
let s:show_close_button = get(g:, 'airline#extensions#tabline#show_close_button', 1)
let s:show_tab_type = get(g:, 'airline#extensions#tabline#show_tab_type', 1)
let s:show_tab_nr = get(g:, 'airline#extensions#tabline#show_tab_nr', 1)
let s:tab_nr_type = get(g:, 'airline#extensions#tabline#tab_nr_type', 0)
let s:close_symbol = get(g:, 'airline#extensions#tabline#close_symbol', 'X')
let s:tabs_label = get(g:, 'airline#extensions#tabline#tabs_label', 'tabs')
let s:show_splits = get(g:, 'airline#extensions#tabline#show_splits', 1)
let s:spc = g:airline_symbols.space
let s:current_bufnr = -1
let s:current_tabnr = -1
@ -39,19 +42,20 @@ function! airline#extensions#tabline#tabs#get()
endif
let b = airline#extensions#tabline#new_builder()
for i in range(1, tabpagenr('$'))
if i == curtab
let group = 'airline_tabsel'
let group = 'airline_tabsel_right'
if g:airline_detect_modified
for bi in tabpagebuflist(i)
if getbufvar(bi, '&modified')
let group = 'airline_tabmod'
let group = 'airline_tabmod_right'
endif
endfor
endif
let s:current_modified = (group == 'airline_tabmod') ? 1 : 0
let s:current_modified = (group == 'airline_tabmod_right') ? 1 : 0
else
let group = 'airline_tab'
let group = 'airline_tab_right'
endif
let val = '%('
if s:show_tab_nr
@ -66,14 +70,22 @@ function! airline#extensions#tabline#tabs#get()
call b.add_section(group, val.'%'.i.'T %{airline#extensions#tabline#title('.i.')} %)')
endfor
call b.add_raw('%T')
call b.add_section('airline_tabfill', '')
call b.split()
call b.add_section('airline_tabfill', '')
if s:show_close_button
call b.add_section('airline_tab', ' %999X'.s:close_symbol.' ')
call b.add_section('airline_tab_right', ' %999X'.s:close_symbol.' ')
endif
if s:show_tab_type
call b.add_section('airline_tabtype', ' tabs ')
if s:show_splits == 1
let buffers = tabpagebuflist(curtab)
for nr in buffers
let group = airline#extensions#tabline#group_of_bufnr(buffers, nr)
call b.add_section_spaced(group, '%(%{airline#extensions#tabline#get_buffer_name('.nr.')}%)')
endfor
elseif s:show_tab_type == 1
call b.add_section_spaced('airline_tabtype', s:tabs_label)
endif
let s:current_bufnr = curbuf

@ -35,8 +35,14 @@ function! s:check_mixed_indent()
endfunction