Vim file type detection error

  question, vim

Vim turns on file type detection, that is, “filetype on”, and turns off vi compatibility, “set nocompatible”. According to the document:

Detail: The “:filetype on” command will load one of these files:
Mac $VIMRUNTIME:filetype.vim
Unix $VIMRUNTIME/filetype.vim
This file is a Vim script that defines autocommands for the
BufNewFile and BufRead events. If the file type is not found by the
name, the file $VIMRUNTIME/scripts.vim is used to detect it from the
contents of the file.

In which filetype.vim has the following entry about markdown:

” Markdown
au BufNewFile,BufRead *.markdown,*.mdown,*.mkd,*.mkdn, setf markdown

Md will be treated as a markdown file.

However, when I opened the markdown file, it was displayed as a vimwiki file (a plug-in installed by vimwiki for me), as shown in the following figure:

What is the reason for this?

The easiest solution to this is to change the default setting of the g:vimwiki_ext2syntax variable in your .vimrc (or Janus could make this the default) as follows:

let g:vimwiki_ext2syntax = {}

The default value of g:vimwikiext2syntax = {‘.md’: ‘markdown’}. This setting tells vimwiki to recognize files with a “.md” extension, overriding previous filetype associations. See “:help vimwikiext2syntax”.

vimwiki/markdown conflict