The magic flags were in the wrong order, %e is the number of errors, it
should go in the parentheses after the # symbol. %fe is the line number
of the first error. Same for the warnings.
This is an experimental feature that allows to display the statusline in
the tabline. It might still be a bit rough, but seems to work so far.
Remaining problem:
- Mode changes are not immediately detected, only after moving the
cursor
fixes#1388closes#1867
currently, empty buffer names were still considered to match against the
exclude_path setting. That does not make sense, so skip the check for
empty bufnames.
In 781c40bb3d the AirlineModeChanged user-defined
autocommand has been introduced. However it was forgotten to mention
this actually in the documentation.
So here we go.
closes#1774
Compatibility:
- Don't use a script-local function to update the format strings
- Protect against `:normal!' moving the cursor on on the wordcount check
Bugfix:
- Let to_string() try to return something for all values
- Now returns correctly when passed both 0 and '0'
Upkeep:
- Simplify check again no valid key from winwidth()
- Old wordcount check: use matchstr() - more expressive and fewer steps
- Improve documentation style/clarity/detail
Add 'arduino' filetype to list of C-like languages. This is needed in
order to avoid mix-indent-file warnings when using hard tabs for
indentation in Arduino source files (*.ino, *.pde) containing top level
block comments with leading space before a '*'.
Similar to: 460ed02864
Original fix: 8fde76dd63
closes#1730
- Make sure to always call the term extension on TermOpen autocommands
- consistently use the airline_term highlighting group
- hard code the airline_term highlighting group, because by the time the
function airline#themes#patch() is called the highlighting group
airline_c would no be defined, so we cannot dynamically get those
attributes
- In the documentation, mention how the g:airline_mode_map can be set
including the terminal section
Startify unfortunately does not set the buftype option, so the
`[noperm]` would be shown, since the buffer is not really a file.
(see mhinz/vim-startify#324)
So allow to blacklist startify from this setting. To do so, the logic
from the tabline extension was refactored out into a separate function
that returns true, if the buffer matches
`g:airline#extensions#tabline#ignore_bufadd_pat` and that function is
then reused for the readonly() function as well.
Instead of requiring each version control plugin to modify airline to
show the current branch, provide a customization function we can check
instead.
Following the example of airline_theme_patch_func, you define the
variable like so:
let g:airline#extensions#branch#custom_head = 'david#svn#get_branch'
Custom functions should cache their value. They may need an autocmd to
invalidate their cache:
" Use a buffer-unique group name to prevent clearing autocmds for other
" buffers.
exec 'augroup svndavid-'. bufnr("%")
au!
autocmd BufWinLeave <buffer> unlet! b:svndavid_branch
augroup END
This change lets me integrate with vc.vim (I couldn't get VCSCommand
working for svn) or write my own thing for perforce.
Additionally, always load whole file and check for existence.
Instead of determining up front whether various scm plugins are
installed, check for them on use so they can be added after this script
is sourced.
This also mitigates the problem of checking for existence of autoload
functions (which are not loaded by exist()). Since we're checking
root-level functions, they're likely to be loaded once we're using any
part of the plugin.
This fixes the conflict of both plugins redifining the 'file' (or 'path')
function. Closes#1670.
As fugitiveline modifies the path display and bufferline replaces it,
the latter should be the plugin to be used if both are activated.
A new variable named cursormode_mode_func is used to store the function
returning the current mode. This allows more customization in the mapping.
The default value is the built-in mode function so there is no change in
behavior.
Add some documentation.
Signed-off-by: Thomas Faivre <thomas.faivre@6wind.com>
previously, when both tabs and buffers were displayed in the tabline, it
was not immediately obvious which side belongs to a buffer and which one
to a tab. Therefore, add [buffers]/[tabs] labels consistently.
The function shows the line number of the first error/warning that appears in the current buffer. If there are 20 warnings and the first warning exists on line 33, then vim-airline would show "W:20(L33)".
One can change how the line number is represented using: `g:airline#extensions#ale#open_lnum_symbol` and `airline#extensions#ale#close_lnum_symbol`
This enables the highlighting caching only when the variable
g:airline_highlighting_cache is set to 1
Should make airline faster and more performant, because we can save a
lot of expensive C core calls. However, when redefining highlighting
groups, it might not correctly reset the cache.
Indicates:
- whether the file is considered to be main or local
- whether the viewer is opened
- whether the compilation is running
- whether the compilation is continuous
Added:
* `vimtex` existence check
* variables documentation
TODO: readme and a screenshot
Update readme.md
Update doc
Update screenshot url
The denite extension functions return the content of some buffer-local
variables. Those variables are not defined, the first time the they are
accessed and therefore, the statusline is not updated later when
g:airline_skip_empty_sections is set.
So disable this variable in this window, by setting the
w:airline_skip_empty_section=0 variable in the denite window.
closes#1454
Adding an option to prevent windows from being closed when a buffer in
the tabline is middle clicked and the clicked buffer is currently open
in a window.
When this option is enabled, instead of closing the window a new buffer
will be opened in all of the windows editing the clicked buffer instead.
This is my first pull request AND my first experience with vimscript, so
my apologies if this is a bit sloppy 😄
The syntastic plugin recommends to adjust the statusline.
This does not apply for vim-airline for obvious reasons. Therefore
mention that this recommendation does not apply for us.
This is a little bit a hack, because by the time the separators are
added, it is not clear, if the following section is empty, therefore
we need to parse the content of the following section and eval the
expressions to find out, if this is empty
Remarks:
- catch all exceptions when eval'ing statusline
- make sure, that the seperators are highlighted
even when skipping empty regions (highlight group
names need to be adjusted)
- if a section is defined as empty, it will be removed completly from
the statusline. This means, it won't be called on the next update
and may not refresh properly (e.g. when the whitespace check
triggers, therefore, the whitesapce extension has to call an
explicit redraw whenever it is supposed to be refreshed)
Solution: Use the current one from ctrlspace 5.0 + minor style fixes
Problem: CtrlSpace 5.0 does no longer work with airline
Solution: Modify the ctrlspace extension to call the new APIs
The statusline work fine but the custom ctrlspace function
somehow/somewhere gets overridden and I could not figure out where.
Therefore the user must add
let g:CtrlSpaceStatuslineFunction = "airline#extensions#ctrlspace#statusline()"
to its .vimrc.
Problem: Ctrlspace 5.0 does not integrate well into tabline
Solution: Write a tabline extensions for ctrlspace 5.0.
The extensions is capable of showing both tabs and buffers, but only the
buffers of a current tab are shown.
This is an extension to the whitespace extension.
It can now detect, if there is mixed indentation used within a file,
e.g. (using space for indentation on some lines and using tabs on other
lines.
This fixes#560
This will show a little not-existing sign in a buffer,
if that file lives in a git/hg repository but does not exists
there yet. Use `:let g:airline_symbols.notexists='!'` to configure
the '!' as symbol. By default, will use U+2204 symbol
To not impact performance by shelling out a lot, the result is cached
until the buffer is written or a shell command is issued.
Should work with mercurial and git.
fixes#925
1) Make sure airline_error and airline_warning highlighting are
different, so that the correct separator will be drawn. This
fixes#982.
2) allow to deactivate %(%) to workaround a vim bug, that may cause
leaking of colors from one section to the next and adding additional
spaces. This needs to be fixed upstream:
https://groups.google.com/d/msg/vim_dev/sb1jmVirXPU/mPhvDnZ-CwAJ
Possibly, also related to neovim/neovim#4147
Use `:let airline#extensions#default#section_use_groupitems = 0`
to disable grouping of statusline items
meaning that branches retrieved from those are now displayed side by
side. The order can be customised with g:airline#extensions#branch#vcs_priority.
The VCS name is now prepended to the branch name to be able to tell
which is which. The VSCCommand behaviour is unchanged.
Also restructured the code a little bit, and made found_fugitive_head
variable behave as its name suggests.
Currently, vim-airline uses hard-coded '\s$' to check for trailing
whitespace. However you might want to check for different values.
Therefore, set the variable
g:airline#extensions#whitespace#trailing_regexp to the required regexp
value.
closes#663
1) allow for custom formatting of the output of the wordcount formatter
This allows for formatting numbers correctly e.g. 1,042 in English
locale and 1.042 in German locale.
2) cache values, so that no on every cursor move the wordcount needs to
be recalculated.