鑷繁鐢ㄧ殑vim閰嶇疆

      1 set hlsearch
      2 syntax on
      3 set encoding=cp936
      4 set langmenu=zh_CN
      5 set imcmdline
      6 set termencoding=utf8
      7 set fileencodings=utf-8,gbk,ucs-bom,cp936
      8 "缂╄繘璁剧疆
      9 set tabstop=4
     10 set softtabstop=4
     11 set shiftwidth=4
     12 set autoindent
     13 set expandtab
     14 " 鑷姩缂╄繘
     15 set smartindent
     16 "鏄剧ず琛屽彿
     17 set number
     18 " 鎼滅储
     19 set ignorecase smartcase "蹇界暐澶у皬鍐
     20 set incsearch  "杈撳叆鎼滅储鍐呭鏃跺氨鏄剧ず鎼滅储缁撴灉
     21 set hlsearch "楂樹寒鏄剧ず鎼滅储缁撴灉
     22 
     23 " 宸ュ叿鏍
     24 set guioptions-=T "闅愯棌宸ュ叿鏍
     25 "set guioptions-=m "闅愯棌鑿滃崟鏍
     26 " 鑷姩濉厖
     27 inoremap ( ()<ESC>i
     28 inoremap [ []<ESC>i
     29 inoremap " ""<ESC>i
     30 inoremap ' ''<ESC>i
     31 inoremap { {}<ESC>i
     32 inoremap {<CR> {<CR>}<ESC>O
     33 inoremap } <c-r>=ClosePair('}')<CR>
     34 inoremap ) <c-r>=ClosePair(')')<CR>
     35 inoremap ] <c-r>=ClosePair(']')<CR>
     36 
     37 function ClosePair(char)
     38     if getline('.')[col('.')-1] == a:char

All posts

Other pages

鍙戣〃璇勮

鐢靛瓙閭欢鍦板潃涓嶄細琚叕寮銆 蹇呭~椤瑰凡鐢*鏍囨敞