If the file is named *.markdown
then the highlighting works correctly. If it is named *.md
then it doesn't work.
Even if I type :set syntax=markdown
, the highlighting doesn't turn on.
With other filetypes e.g. awk
, I can turn on the highlighting by running :set syntax=awk
. But this doesn't work for markdown.
Ultimately I want to make Vim recognize .md files as markdown, but when the autocommand didn't work I tried just setting the syntax directly and found that didn't work either.
What could be causing this?
I am using MobaXterm.
:set filetype=markdown
help or is the filetype already set correctly?set filetype=markdown
andset syntax=markdown
and neither made any difference.vim -Nu NONE
), write a small markdown example, enter:set filetype=markdown
and:syntax on
it works for me. Do you have syntax enabled? Are you using an old Vim version?-Nu NONE
did not work. My~/.vimrc
includes these lines for editing CFEngine files, then at the bottom I haveset smartindent
,filetype plugin indent on
,syntax on
which may be redundant but I was trying to get something else to work...any of these look like a likely culprit?:syntax on
have no effect? At least you now know that it is related to your.vimrc
. You can try to comment out blocks of code to figure out what causes this behaviour. The lines you linked don't look relevant to me.