Reputation: 32721
At the moment I use :syntax off
for markdown. But I'd like to make it syntax off when I edit a markdown file.
I tried this in .vimrc but md files has syntax.
"""""syntax off for markdown"""
if &ft=='md'
syntax off
else
syntax on
endif
How can I do it?
Upvotes: 2
Views: 403
Reputation: 40830
You can accomplish it with an auto-command for all buffers for which the filetype is set to "markdown", or "md", like so:
autocmd Filetype markdown setlocal syntax=OFF
You can read about the syntax of commands Vim can execute automatically with :help :autocmd
.
Upvotes: 3