1 " Get out of VI's compatible mode
2 set nocompatible
3
4 " Set GUI options
5 if has("gui_running")
6 " set guifont=Courier\ New:h10
7 " set guifont=Lucida\ Console:h9
8 set guifont=Consolas:h9
9 set guioptions=
10 " colorscheme torte
11 colorscheme desert
12 " colorscheme evening
13 else
14 colorscheme ron
15 endif
16
17 " How many lines of history VIM has to remember
18 set history=100
19
20 " Set to auto read when a file is changed from the outside
21 set autoread
22
23 " No sound on errors
24 "set novisualbell
25 "set visualbell
26 set noerrorbells
27 set guicursor=a:blinkon0
28
29 " Enable filetype plugin
30 filetype plugin on
31 filetype indent on
32
33 " Enable syntax highlight
34 syntax on
35
36 " Highlight search things
37 set hlsearch
38
39 " Show where the pattern, as it was typed so far when searching
40 set incsearch
41
42 " Set function of backspace
43 set backspace=2
44
45 " Enable some settings of indent
46 set autoindent
47
48 " Disabled backup
49 set nobackup
50
51 " Always show current position
52 set ruler
53
54 " Change buffer without saving
55 set hidden
56
57 " Show line numbers at the left side
58 set number
59
60 " Always show statusbar
61 set laststatus=2
62
63 " Show commander at the commander line
64 set showcmd
65
66 " Set the order of file encoding when reading files
67 set fileencodings=ucs-bom,utf-8,chinese,default,latin1
68
69 " Tabstop
70 set shiftwidth=4
71 " " Don't use tabstop
72 set softtabstop=4
73 set expandtab
74
75 " Show matching bracets
76 set showmatch
77
78 " Turn on wild menu
79 set wildmenu
80
81 " Set the shortcut of TAB function
82 :map <F5> :tabprevious<CR>
83 :map <F6> :tabnext<CR>
84 :map <F7> :tabclose<CR>
85 :map <F8> :tabnew
86 "" Insert mode. e.g.
87 ":imap <F5> <ESC>:tabprevious<CR>i
88
89 " Edit mail
90 autocmd FileType mail set textwidth=70
91 autocmd FileType mail set wrap
92 autocmd FileType mail set set spell
93
94 " File type detect
95 augroup filetypedetect
96 au BufNewFile,BufRead mail.google.com* setf mail
97 au BufNewFile,BufRead *.mkd setf mkd
98 au BufNewFile,BufRead *.t2t setf txt2tags
99 augroup END
100
101 " TMP RC
102 "" Use In Windows
103 winpos 400 300
跟 Toy 玩自架服务器:创建 DigitalOcean Droplet
9 years ago

No comments:
Post a Comment