You can now specify the special theme name `random` and vim-airline will
load a random theme from the ones installed. This works from either your
.vimrc as well as when calling `:AirlineTheme` command directly.
closesvim-airline/vim-airline-themes#170
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.