Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/vim/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在vim中使用:选项卡编辑时保持:高亮显示_Vim - Fatal编程技术网

在vim中使用:选项卡编辑时保持:高亮显示

在vim中使用:选项卡编辑时保持:高亮显示,vim,Vim,我使用vim。我要求使用80个或更少的列。此修复非常有效: highlight OverLength ctermbg=red ctermfg=white guibg=#592929 match OverLength /\%81v.*/ 我打开的第一个文件看起来很好。但是当我 :tabedit some/other/file 某些/other/file没有突出显示设置,我必须手动输入它们。如何保持文件I:tabedit的突出显示设置?将这两行代码添加到~/.vim/after/syntax/s

我使用vim。我要求使用80个或更少的列。此修复非常有效:

highlight OverLength ctermbg=red ctermfg=white guibg=#592929
match OverLength /\%81v.*/
我打开的第一个文件看起来很好。但是当我

:tabedit some/other/file

某些/other/file没有突出显示设置,我必须手动输入它们。如何保持文件I:tabedit的突出显示设置?

将这两行代码添加到~/.vim/after/syntax/syncolor.vim(如果不存在则创建)对我来说很有用

顺便说一下,这是一个很棒的片段

ETA:可能需要将此文件添加到.vimrc文件中:

autocmd BufRead,BufNewFile (pattern) source ~/.vim/after/syntax/syncolor.vim

其中,
(模式)
可以类似于
/home/foo/bar/**

将这两行代码添加到~/.vim/after/syntax/syncolor.vim(如果它不存在的话创建)对我来说很有帮助

顺便说一下,这是一个很棒的片段

ETA:可能需要将此文件添加到.vimrc文件中:

autocmd BufRead,BufNewFile (pattern) source ~/.vim/after/syntax/syncolor.vim

其中
(模式)
可以类似于
/home/foo/bar/**

是:在vrc文件中突出显示超长字符mbg=red-ctermfg=white-guibg=\592929匹配超长/\%81v./是:在vrc文件中突出显示超长字符mbg=red-ctermfg=white-guibg=\592929匹配超长/\%81v./谢谢!我将这些行放在~/.vim/after/syntax/syncolor.vim中,并将autocmd BufRead、BufNewFile**source~/.vim/after/syntax/syncolor.vim添加到我的~/.vimrc中,谢谢!我将这些行放在~/.vim/after/syntax/syncolor.vim中,并将autocmd BufRead、BufNewFile**source~/.vim/after/syntax/syncolor.vim添加到我的~/.vimrc中