diff options
author | Adam Hovorka <[email protected]> | 2018-10-07 09:54:18 -0600 |
---|---|---|
committer | Adam Hovorka <[email protected]> | 2018-10-07 09:54:18 -0600 |
commit | 87c73b77964b582900c50308eddd9518948eb895 (patch) | |
tree | 1d9d7aefa188dd9d21f11d93821f4e560f45b723 /base/vim/plugin/gitbranch.vim | |
parent | e97f406a99008f3a73209eb749b0a1382eb5c6dc (diff) |
Customize vim statusline
Diffstat (limited to 'base/vim/plugin/gitbranch.vim')
-rw-r--r-- | base/vim/plugin/gitbranch.vim | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/base/vim/plugin/gitbranch.vim b/base/vim/plugin/gitbranch.vim new file mode 100644 index 0000000..a6f776a --- /dev/null +++ b/base/vim/plugin/gitbranch.vim @@ -0,0 +1,23 @@ +" ============================================================================= +" Filename: plugin/gitbranch.vim +" Author: itchyny +" License: MIT License +" Last Change: 2015/05/12 08:16:47. +" ============================================================================= + +if exists('g:loaded_gitbranch') || v:version < 700 + finish +endif +let g:loaded_gitbranch = 1 + +let s:save_cpo = &cpo +set cpo&vim + +augroup GitBranch + autocmd! + autocmd BufNewFile,BufReadPost * call gitbranch#detect(expand('<amatch>:p:h')) + autocmd BufEnter * call gitbranch#detect(expand('%:p:h')) +augroup END + +let &cpo = s:save_cpo +unlet s:save_cpo |