mini vimrc

 Mini version:python

set enc=utf-8 ffs=unix,dos,mac lm=zh_CN.utf-8
set nu nowb nocp nowrap ru nobk sm is noswf acd hls autoread 
set hi=700 mouse=a sel=exclusive slm=mouse,key
set cin sta et ai si ts=4 bs=2 sw=4 sts=4
set guifont=DejaVu\ Sans\ Mono\ 14
colorscheme desert
syntax on
filetype indent plugin on
map <C-s> <ESC>:wall<CR>

 

Full version:ui

"----Encoding setting----
set enc=utf-8                   "encoding
set ffs=unix,dos,mac            "fileformats
set lm=zh_CN.utf-8              "langmenu

"----Basic function----
set nu                          "number
set nowb                        "nowritebackup  禁止自動保存
set nocp                        "nocompatible   去除vi一致性
set ru                          "ruler          顯示標尺
set nobk                        "nobackup       禁止緩衝保存
set sm                          "showmatch      符號自動匹配
set is                          "incsearch      搜索加強模式
set noswf                       "noswapfile     去除swap文件
set hi=700                      "history        最大歷史記錄
set acd                         "autochdir      設置爲當前文件目錄
set hls                         "highlightsearch 高亮搜索
set ar                          "autoread       自動讀文件
"----Mouse setting----
set mouse=a                     "mouse          鼠標模式
set sel=exclusive               "selection      不包含最後的換行符
set slm=mouse,key               "selectmode     選擇模式

"----Indent habit----
set nowrap                      "nowrap         不自動換行
set cin                         "cindent        C格式縮進
set sta                         "smarttab       智能tab
set et                          "expandtab      tab=backspace
set ts=4                        "tabstop        tab=4個字符
set ai                          "autoindent     自動縮進
set si                          "smartindent    智能縮進
set bs=2                        "backspace      =indent,eol,start
set sw=4                        "shiftwidth     自動縮進設置爲4個字符
set sts=4                       "softtabstop    按一次tab 前進4個字符

"一鍵ctrl+s保存
map <C-s> <ESC>:wall<CR>

"----Theme setting----
syntax on                       "開啓高亮
colorscheme desert              "主題配色
set guifont=DejaVu\ Sans\ Mono\ 14

"----Autoread the text----  
filetype on                     "自動識別文件類型
相關文章
相關標籤/搜索