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.