1 " 在處理未保存或只讀文件的時候,彈出確認
2 set confirm
3 " 帶有如下符號的單詞不要被換行分割
4 set iskeyword+=_,$,@,%,#,-
5 " 不使用vi默認鍵盤佈局
6 set nocompatible
7
8 "設置編碼
9 set encoding=utf-8
10 set fencs=utf-8,ucs-bom,shift-jis,gb18030,gbk,gb2312,cp936
11 set fileencodings=utf-8,ucs-bom,chinese
12
13 "語言設置
14 set langmenu=zh_CN.UTF-8
15
16 " 顯示行號
17 set number
18 " 智能對齊
19 set smartindent
20 " 括號匹配模式
21 set showmatch
22 " 顯示狀態行
23 set ruler
24
25 "設置配色方案
26 "colorscheme torte
27
28 "可以在buffer的任何地方使用鼠標
29 set mouse=a
30 set selection=exclusive
31 set selectmode=mouse,key
32
33 set incsearch
34 " tab鍵爲4個空格
35 set tabstop=4
36 set shiftwidth=4
37 set softtabstop=4
38 " 自動對齊
39 set autoindent
40
41 " C語言格式對齊
42 set cindent
43 " 不要備份文件
44 set nobackup
45
46 syntax on
47 "打開文件類型自動檢測功能
48 filetype on