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=markdownhelp or is the filetype already set correctly?
set syntax=markdownand neither made any difference.
vim -Nu NONE), write a small markdown example, enter
:syntax onit works for me. Do you have syntax enabled? Are you using an old Vim version?
-Nu NONEdid not work. My
~/.vimrcincludes these lines for editing CFEngine files, then at the bottom I have
filetype plugin indent on,
syntax onwhich may be redundant but I was trying to get something else to work...any of these look like a likely culprit?
:syntax onhave 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.