【解決済み】解決策はこれのようです:
if exists('g:nameOfMyOption') && g:nameOfMyOption
...
endif
とても簡単ですが、オンラインで答えを見つけることができません。プラグインファイルで次のようなことをしたい:
" MyChecker.vim
"
" Uncomment the following line to set the autochecker option
"set autochecker=1
if ISSET(autochecker)
autocmd InsertChange * :call MyAutoCheckerFunction()
endif
ISSET ラインはどのように行うのですか? 明示的に autochecker=0 を設定する必要はなく、autochecker が存在するかどうかを確認するだけにしたいのです。
編集:次のことを試すと:
if &autochecker == 1
...
endif
次のエラー メッセージが表示されます。
Error detected while processing MyChecker.vim:
line 32:
E113: Unknown option: autochecker
E15: Invalid expression: &autochecker == 1