我运维和dba通常使用的如下:
set paste
set shortmess=atI
syntax enable
syntax on
set ai
set ruler
set autoindent
set nocompatible
set magic
set confirm
set history=1000
set cursorline
highlight Comment ctermfg=lightblue guifg=darkblue
set cindent
set tabstop=4
set softtabstop=4
set shiftwidth=4
set smarttab
set si
set wrap
set showmatch
set smartindent
set cin
set hlsearch
au BufReadPost * if line("‘"") > 0|if line("‘"") <= line("$")|exe("norm ‘"")|else|exe "norm $"|endif|endif
set nu
" 设置状态栏
set laststatus=2
highlight StatusLine cterm=bold ctermfg=yellow ctermbg=blue
function! CurDir()
let curdir = substitute(getcwd(), $HOME, "~", "g")
return curdir
endfunction
set statusline=[%n] %f%m%r%h | pwd: %{CurDir()} |%=| %l,%c %p%% | ascii=%b,hex=%b%{((&fenc=="")?"":" | ".&fenc)} | %{$USER} @ %{hostname()}
原文:http://lee90.blog.51cto.com/10414478/1966359
【说明】:本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!