Add untracked feature to branch extension.

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
This commit is contained in:
Christian Brabandt
2016-02-02 22:45:47 +01:00
parent f57c5daf66
commit d8adbfa135
3 changed files with 53 additions and 1 deletions

View File

@@ -61,6 +61,7 @@ function! airline#init#bootstrap()
\ 'whitespace': get(g:, 'airline_powerline_fonts', 0) ? "\u2739" : '!',
\ 'linenr': get(g:, 'airline_powerline_fonts', 0) ? "\ue0a1" : ':',
\ 'branch': get(g:, 'airline_powerline_fonts', 0) ? "\ue0a0" : '',
\ 'notexists': get(g:, 'airline_powerline_fonts', 0) ? "\u2204" : '',
\ 'modified': '+',
\ 'space': ' ',
\ 'crypt': get(g:, 'airline_crypt_symbol', nr2char(0x1F512)),