1 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
2 " General
3 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
4 "Get out of VI's compatible mode
5 set nocp
6
7 "Show the cursor position on the status bar
8 set ruler
9
10 "Enable filetype plugin
11 filetype plugin on
12 filetype indent on
13
14 "Turn backup off
15 set nobackup
16
17 "Set file encodings
18 set fileencodings=gbk,utf8
19
20 "Set auto indent
21 set autoindent
22
23 "Set the directory of swap file
24 if has("win32")
25 set dir=%temp%
26 else
27 set dir=/tmp
28 endif
29
30 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
31 " Colors and Fonts
32 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
33 "Enable syntax highlight
34 syntax on
35
36 "Set color scheme
37 colorscheme slate
38
39 "Set font to bitstream
40 if has("win32")
41 set gfn=Bitstream_Vera_Sans_Mono:h10"
42 else
43 set gfn=Bitstream/ Vera/ Sans/ Mono/ 10"
44 endif
45
46 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
47 " VIM userinterface
48 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
49 "Show line number
50 set number
51
52 "Set backspace
53 set backspace=eol,start,indent
54
55 "Allow the cursor move to previouse/next line
56 set whichwrap=b,s,<,>,[,]
57
58 "Ignore case when searching
59 set ignorecase
60
61 "Show dynamically searching
62 set incsearch
63
64 "Highlight search matches
65 set hlsearch
66
67 "Right mouse button to popup menu
68 set mousemodel=popup
69
70 "Use shift to select text
71 set keymodel=startsel,stopsel
72
73 if has("guirunning")
74 set lines=25
75 set column=100
76 winpos 300 100
77 endif
78
79 "Show enhanced command completion
80 set wildmenu
81
82 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
83 " Text options
84 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
85 "Set the space of tab
86 set tabstop=4
87
88 "Set the space of indent
89 set shiftwidth=4
90
91 "Set how to wrap for long lines
92 set linebreak
93
94 "Support line break for Asian characters
95 set fo+=mB
96
97 "Not use space instead of tab
98 set noexpandtab
99
100 "Set match pair form
101 set matchpairs+=<:>
102
103 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
104 " Development
105 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
106 "Show matching brackets
107 set showmatch
108
109 "Set automatic indent for c program
110 set cin
111 set cino=:0g0p0t0
112
vim 配置文件
最新推荐文章于 2023-02-16 00:02:54 发布