开发者

Syntax highlighting changes after save in Vim

开发者 https://www.devze.com 2023-03-14 07:37 出处:网络
I have installed Markdown syntax plugin. When I\'m on a new buffer not associated with any file, and paste the source portion of the site http://rosylilly.git开发者_如何学运维hub.com/markdown.html in

I have installed Markdown syntax plugin.

When I'm on a new buffer not associated with any file, and paste the source portion of the site http://rosylilly.git开发者_如何学运维hub.com/markdown.html into it, the colors appear nicely as it should for the markdown syntax.

However, after saving the file, the colors change. Any idea how I can fix this?


Can you, before and after saving do

:verbose set filetype
:verbose set

Tip: use :redir > file.txt to capture the output so you won't have to copy/paste which can be difficult with gvim - for command output

You could also look at the autocommands when saving:

:verbose au BufWrite
:verbose au BufWritePre
:verbose au BufWritePost

This would serve to discover what plugin/script is causing the highlighting to go haywire.

0

精彩评论

暂无评论...
验证码 换一张
取 消