Skip to content
Browse files

Only set omnifunc when no configuration present

While I agree that by default we could try to guess the settings
automatically, I want configuration to be explicit when anything
is set manually. A little bit of magic is acceptable though :)
  • Loading branch information...
1 parent 7d47f3e commit 692607d37f95b2b1a1d085bf344aa53f7ebfd533 @caio committed Sep 17, 2012
Showing with 1 addition and 3 deletions.
  1. +1 −3 plugin/querycommandcomplete.vim
View
4 plugin/querycommandcomplete.vim
@@ -51,6 +51,7 @@ if !exists("g:qcc_query_command")
if len(s:querycmd)
let g:qcc_query_command = s:querycmd
+ autocmd FileType mail setlocal omnifunc=QueryCommandComplete
else
echoerr "QueryCommandComplete: g:qcc_query_command not set!"
finish
@@ -142,7 +143,4 @@ function! QueryCommandComplete(findstart, base)
endif
endfunction
-" only set omnifunc if not already set
-autocmd FileType mail if !len(&omnifunc) | setlocal omnifunc=QueryCommandComplete | endif
-
let &cpo = s:save_cpo

0 comments on commit 692607d

Please sign in to comment.
Something went wrong with that request. Please try again.