What I usually do is put a VimEnter autocommand in my vimrc that
tests for the existence of the plugin function or command I want to
use before calling or executing it. For example, I have this for
configuring the Align plugin:
autocmd VimEnter * if exists(":AlignCtrl") | AlignCtrl p0P0 | endif
Your code would look something like this:
autocmd VimEnter * if exists("*operator#user#define)
\ | call operator#user#define()
\ | endif
See also:
:help VimEnter
:help exists()
Alternatively, I have put code that requires a particular plugin in
~/.vim/after/plugin/<pluginname>.vim. For example,
~/.vim/after/plugin/EnhancedDiff.vim contains this:
if !exists(":PatienceDiff")
finish
endif
PatienceDiff
Regards,
Gary