diff options
| author | jdhao <jdhao@hotmail.com> | 2021-08-08 22:05:16 +0800 |
|---|---|---|
| committer | jdhao <jdhao@hotmail.com> | 2021-08-08 22:06:47 +0800 |
| commit | fe26dfa9c191843f884d86f2427f89d9fe4fc40f (patch) | |
| tree | 5eff00afbeefb78c7ec11757da3c7fb2099e43f3 /core/plugins.vim | |
| parent | 1ead4f782453ff275b74e62faee499edec0dc04d (diff) | |
Use custom git branch name for vim-airline
Airline relies on fugitive to get the branch name, but fugitive is
conditionally loaded. So the branch name is not shown. We need to
provide our own function to get the branch name.
Diffstat (limited to 'core/plugins.vim')
| -rw-r--r-- | core/plugins.vim | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/plugins.vim b/core/plugins.vim index 8f901fa..9af4b61 100644 --- a/core/plugins.vim +++ b/core/plugins.vim @@ -421,6 +421,9 @@ let g:airline_symbols.branch = '⎇' let g:airline_symbols.paste = 'ρ' let g:airline_symbols.spell = 'Ꞩ' +" Custom branch name +let g:airline#extensions#branch#custom_head = 'utils#GetGitBranch' + " Only show git hunks which are non-zero let g:airline#extensions#hunks#non_zero_only = 1 |
