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?
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
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.