Update omnicomplete autocmd checks

- drops file type constraint
- update file name checks to match COMMIT_EDITMSG, PULLREQ_EDITMSG,
  MERGE_MSG, SQUASH_MSG and TAG_EDITMSG

Closes #5
This commit is contained in:
Bruno Sutic
2014-07-18 23:33:26 +02:00
committed by Tim Pope
parent a48904e709
commit 3772a98b3a

View File

@@ -163,7 +163,7 @@ endfunction
augroup rhubarb
autocmd!
autocmd User Fugitive
\ if &filetype ==# 'gitcommit' && expand('%:t') ==# 'COMMIT_EDITMSG' &&
\ if expand('%:p') =~# '\.git[\/].*MSG$' &&
\ exists('+omnifunc') &&
\ &omnifunc =~# '^\%(syntaxcomplete#Complete\)\=$' &&
\ join(readfile(fugitive#buffer().repo().dir('config')),"\n")