vimscriptヘルプファイルには、ユーザー関数を定義するときに次のように記載されています。
組み込み関数との混同を避けるために、関数名は大文字で始める必要があります。
これは、他の人のコードを調べて発見した次の場合を除いて、強制されます。
"This should not work.
"But it does as long as the function is in a file called 'overrides.vim'.
function! overrides#name() abort
echo 'Test overrides\name'
endfunction
"This should not work either.
"But it does as long as the file above is in a folder called 'plugin'.
function! plugin#overrides#name() abort
echo 'Test plugin\overrides\name'
endfunction
let stupid = {}
"This should not work.
"But it does aslong as the stupid Dictionary is defined.
function! stupid.name() abort
echo 'Test stupidname'
endfunction
call overrides#name()
call plugin#overrides#name()
call stupid.name()
私はこの構文を説明するものをどこでも探しました。私はこれが今うまくいくことを知っています。私が非常に興味を持っているのは、この構文を使用したことがある人にとって、どこでそれについて学んだのかということです。
ヘルプファイルのどこにも記載されていない他のvimscript機能はありますか?