vimscript注释中断语法高亮显示

vimscript注释中断语法高亮显示,vim,Vim,我的vimrc文件来源的文件中有以下代码 set textwidth=80 " Column at which text will be auto-rolled to next line set winwidth=80 " this is the desired minimum, not absolute, of any new window in vim. set splitbelow " Open new split panes to right and bottom, which feel

我的vimrc文件来源的文件中有以下代码

set textwidth=80 " Column at which text will be auto-rolled to next line
set winwidth=80 " this is the desired minimum, not absolute, of any new window in vim.
set splitbelow " Open new split panes to right and bottom, which feels more natural
set splitright " Open new split panes to right and bottom, which feels more natural
set ruler "always with the ruler
set laststatus=2 "always with the status line
set cmdheight=2 " command height taller
set vb " beeps for your eyes
set showmatch " show matching brackets
set number " show line numbers
set hlsearch | highlight Search cterm=underline " hilight search results while typing, underline after enter.
set cursorline " hilight current line
set showtabline=2 "always show tabs at top
set scrolloff=3 " keep more context when scrolling off the end of a buffer
set showcmd " show commands as they are entered
set wildmenu | set wildmode=list:longest,full  " autocomplete settings
文件中的交替行未正确高亮显示。我可以通过在每个评论行的末尾添加一个额外的引用来解决这个问题,但我认为这不是最好的方法

我能做些什么来解决这个问题?见下文img


不应该。就像它不知道这是Vimscript一样。首先,你能告诉我们:详细设置ft吗?报告?如果它不是filetype=vim,而是从…runtime/filetype.vim以外的任何位置设置的,则会出现文件类型检测问题,而不是语法突出显示问题。另外,请注意,您正在编辑一些我认为是visual_settings.vim而不是.vimrc的内容。在vimrc中打开文件类型插件缩进以打开文件类型检测。@amadan结果是:filetype=vim Last set from/usr/local/cell/vim/7.4.488/share/vim/vim/vim74/filetype.vim您也正确。这是一个源于我的vimrc的文件。@fdinoff我的vimrc中有这个文件。。不确定它为什么不工作OK,我错了,文件类型检测按预期工作:/n您可以检查您的vim文档并告诉我们这种现象是从文件的开头开始发生的,或者文件中是否有注释开始出现这种奇怪行为的点?它是全局的,还是由文档中的某些内容触发的?如果您创建了一个新的foo.vim文档,并且只复制了两行设置的内容,它是否也会这样做?