vim-airline/autoload/airline
David Briscoe 8209ca7da1 Make branch detection customizable
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.
2018-04-06 09:40:17 -07:00
..
extensions Make branch detection customizable 2018-04-06 09:40:17 -07:00
themes Update copyright notifications 2018-01-05 10:37:59 +01:00
async.vim Update copyright notifications 2018-01-05 10:37:59 +01:00
builder.vim Update copyright notifications 2018-01-05 10:37:59 +01:00
debug.vim Update copyright notifications 2018-01-05 10:37:59 +01:00
extensions.vim Disable fugitiveline if bufferline is activated 2018-03-05 11:56:03 +01:00
highlighter.vim Update copyright notifications 2018-01-05 10:37:59 +01:00
init.vim Update copyright notifications 2018-01-05 10:37:59 +01:00
msdos.vim Update copyright notifications 2018-01-05 10:37:59 +01:00
parts.vim Update copyright notifications 2018-01-05 10:37:59 +01:00
section.vim Update copyright notifications 2018-01-05 10:37:59 +01:00
themes.vim Update copyright notifications 2018-01-05 10:37:59 +01:00
util.vim Update copyright notifications 2018-01-05 10:37:59 +01:00