.vimrc 的设置
$HOME/.vimrc 的普通设置,例如以下。
set nocompatible "" not compatible with VI "" Encodings and fonts set encoding=utf-8 set fileencoding=utf-8 set fileencodings=ucs-bom,gb18030,gbk,gb2312,cp936 set termencoding=utf-8 set langmenu=zh_CN.UTF-8 language messages zh_CN.UTF-8 set guifontset=wenquanyi,-*-16-*-*-* "" Tab and Backspace set sw=2 set tabstop=4 set shiftwidth=4 set cindent set smartindent set autoindent set backspace=indent,eol,start "" set backspace "" Display set number "" show line number set ruler "" always show current position set cursorline "" highlight the current line set showcmd "" Searching set ignorecase "" search setting set incsearch set hlsearch set showmatch set history=100 highlight Search term=reverse ctermbg=4 ctermfg=7 "" Syntax and color scheme syntax enable filetype plugin indent on "colorscheme torte colorscheme default highlight Comment ctermfg=grey highlight Normal ctermfg=grey ctermbg=darkblue """""""""" 自己主动补全命令 """""""""" autocmd Filetype c set omnifunc=ccomplete#Complete autocmd Filetype html set omnifunc=htmlcomplete#CompleteTags autocmd Filetype xml set omnifunc=xmlcomplete#CompleteTags autocmd Filetype python set omnifunc=pythoncomplete#CompleteTags autocmd Filetype tex set omnifunc=syntaxcomplete#Complete """""""""" 英文拼写检查 """"""""""" " 拼写错误被画红线,比缺省设置更美观 " """""""""""""""""""""""""""""""""" set spell spelllang=en_us setlocal spell spelllang=en_us highlight clear SpellBad highlight SpellBad term=standout ctermfg=1 term=underline cterm=underline highlight clear SpellCap highlight SpellCap term=underline cterm=underline highlight clear SpellRare highlight SpellRare term=underline cterm=underline highlight clear SpellLocal highlight SpellLocal term=underline cterm=underline """""""""""" END """"""""""""
时间: 2025-01-23 12:00:43