macvim 突出显示打开文件的所有内容

macvim 突出显示打开文件的所有内容

当我用 MacVim 打开文件时,它会用红色突出显示所有内容。

我不知道如何永久摆脱这个问题。我该如何做.vimrc

答案1

set encoding=utf-8 let mapleader = ',' colorscheme koehler ""colorscheme: " blue, darkblue, default, delek, desert, elflord " evening, koehler, morning, purphy, pablo " peachpuff, ron, shine, slate, solarized, torte, zellner "set cmdheight=1 "set showmatch set gfn=Menlo:h14 "============================================================================================================= 语法开启 set showmode set nocompatible " 使用 vim 默认值 set number " 显示行号 set ignorecase " 搜索时忽略大小写 set title " 在控制台标题栏中显示标题 set marker " 一直显示光标位置 set scrolloff=0 " 滚动时保留 3 行 set ls=2 " 总是显示状态行,或者 set laststatus=2 set showcmd " 显示不完整的命令 set expandtab " 将制表符扩展为空格 set tabstop=4 " 制表符的空格数 set shiftwidth=4 " 要(自动)缩进的空格数 set autoindent " 总是打开自动缩进 set smartindent " 智能缩进 "set cindent " cindent set hlsearch " 高亮搜索 set incsearch " 进行增量搜索 "set visualbell t_vb= " 关闭错误蜂鸣/闪光 "set novisualbell " 关闭可视铃声 "set ttyfast " 更平滑的变化 "set ttyscroll=0 " 关闭滚动,与 PuTTY 配合不佳 "set modeline " 文档中的最后一行 设置 vim 模式 "set modelines=3 " 检查模型行的行数 "set shortmess=atI " 缩写消息 "set nostartofline " 分页时不要跳转到第一个字符 set whichwrap=b,s,h,l,<,>,[,] " 在文件间自由移动 "set nowrap " 不换行 "set nobackup " 不保留备份文件 "set viminfo='20,<50,s10,h " 递归设置项目路径。set path=$PWD/** setpellfile=~/.vim/spell/mySpellFile.en.utf-8.add

" 键盘映射 "inoremap nnoremap :buffers:buffer "nnoremap :!pdflatex % nnoremap :!./cmp % nnoremap :setlocalpellpelllang=en_us nnoremap :set nospell nnoremap . nnoremap j nnoremap h nnoremap k nnoremap l "Vimdiff 设置 "nnoremap u :diffupdate nnoremap du :diffupdate "nnoremap g :diffget "nnoremap p :diffput "删除尾随空格 nnoremap W :%s/\s+$// nnoremap < :winc < nnoremap > :winc > "将完整文件名复制到剪贴板 nnoremap cp :let @*= expand("%:p") "剪切 vnoremap :!pbcopy "复制 vnoremap :w !pbcopy "在可视模式下粘贴 vnoremap :!pbpaste "以正常模式粘贴 nnoremap :r !pbpaste nnoremap :noh

filetype on au BufNewFile,BufRead *.mrs 设置 filetype=c " 将 .mrs 文件设置为 c 高亮 au BufNewFile,BufRead *.th 设置 filetype=c au BufNewFile,BufRead *.izf 设置 filetype=c au BufNewFile,BufRead *.dat 设置 filetype=c au BufNewFile,BufRead *.org 设置 filetype=c au BufNewFile,BufRead *.bak 设置 filetype=c au BufNewFile,BufRead *.inp 设置 filetype=c

" 让 Vim 在重新打开文件时跳转到最后一个位置 if has("autocmd") au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") \| exe "normal! g'\"" | endif endif

相关内容