vimwiki has an ftplugin script file with name ‘vimwiki.vim’,
and vimwiki file is named by *.wiki, but in the vim’s help doc,
ftplugin script only works for
<filetype>.vim
<filetype>_xxx.vim
<filetype>/xxx.vim;
then how does the vimwiki.vim works?
Thanks in advance.
If I understood you correctly, you are mistaking filetype and extension. They are not equal, first is set in various ftdetect plugins that look like
(above is from
$VIMRUNTIME/filetype.vim). This works because there is somewhere a command that sets filetypevimwikifor files that match*.wiki. Though for most files filetype can be guessed based on extension, ftdetect plugins can also use shebang or analyze file contents.