自用的 .vimrc 满足高亮、代码颜色、缩进等

set nu
set encoding=utf-8
set st=4
set nocp
set is
set nocompatible        " Vim settings, not Vi settings.  must be first
set autoindent          " Auto align when insert new line, for instance, when using o or O to insert new line.
set ruler               " Show ruler at the bottom-right of vim window
set showcmd
set backspace=indent,eol,start          " Enable delete for backspace under insert mode"
colorscheme darkblue
syntax on
if &term =~ "xterm"
    if has("terminfo")
        set t_Co=8
        set t_Sf=^[[3%p1%dm
        set t_Sb=^[[4%p1%dm
    else
        set t_Co=8
        set t_Sf=^[[3%dm
        set t_Sb=^[[4%dm
    endif
endif
set backspace=indent,eol,start
if (has("gui_running"))
" 图形界面下的设置
    set nowrap
    set guioptions+=b
    colo torte
else
" 字符界面下的设置
    set wrap
    colo ron
endif
set history=100
set confirm
filetype on
filetype plugin on
set iskeyword+=_,$,@,%,#,-
filetype indent on
set linespace=0
set ruler
set rulerformat=%20(%2*%<%f%=\ %m%r\ %3l\ %c\ %p%%%)
set cmdheight=2
set backspace=2
set whichwrap+=<,>,h,l
set mouse=a
set selection=exclusive
set selectmode=mouse,key
set shortmess=atI
set report=0
set noerrorbells
set showmatch
set formatoptions=tcrqn
set autoindent
set smartindent
" 使用C样式的缩进
set cindent
" 制表符为4
set tabstop=4
" 统一缩进为4
set softtabstop=4
set shiftwidth=4




 


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值