1 " Vim configuration file
2 set fileencodings=prc
3 set encoding=prc
4 " DEFAULT OPTIONS
5 set nocompatible " make Vim default to nicer options
6
7 " READING OPTIONS
8 set modeline modelines=1 " use settings from file being edited
9
10 " INPUT OPTIONS
11 set mouse=a " use the mouse
12
13 " DISPLAY OPTIONS
14 "set background=light " better colors for white terminals
15 set number " show line numbers
16 set ruler " show line and column information
17 set notitle " don't set change terminal's title
18 set backspace=indent,eol,start " backspaces can go over lines
19 set tabstop=4 " tabs are every 8 columns
20 set softtabstop=4
21 set shiftwidth=4
22
23
24 " jump only one 'line' when wrap set on
25 nnoremap j gj
26 nnoremap k gk
27 vnoremap j gj
28 vnoremap k gk
29 nnoremap <Down> gj
30 nnoremap <Up> gk
31 vnoremap <Down> gj
32 vnoremap <Up> gk
33 inoremap <Down> <C-o>gj
34 inoremap <Up> <C-o>gk
35
36
37 map <S-Insert> <MiddleMouse>
38 map! <S-Insert> <MiddleMouse>
39
40 imap <C-s> <C-o>:update<CR>
41
42 set cin
43 set sm
44 set et
45 set cino=:0g0t0(sus
46 set hls
47 set whichwrap=b,s,<,>,[,]
48 set fo+=mB
49 set mousemodel=popup
50 set selection=inclusive
51
52
53
54 :if version >= 600
55 set listchars=eol:$,tab:>-,trail:-,extends:>,precedes:<
56 :elseif version >= 500
57 set listchars=eol:$,tab:>-,trail:-,extends:+
58 :endif
59
60 set laststatus=2 " always show status line
61 set showmode " always show command or insert mode
62 set shortmess=lnrxI " brief messages, don't show intro
63 set showcmd " show partial commands
64 set more " use a pager for long listings
65
66 "set nowrap " do not wrap long lines
67 set wrap
68 set lbr
69 syntax on " use syntax highlighting
70
71 " Cursor movement
72 nnoremap <Down> gj
73 nnoremap <Up> gk
74 vnoremap <Down> gj
75 vnoremap <Up> gk
76 inoremap <Down> <C-o>gj
77 inoremap <Up> <C-o>gk
78
79 nnoremap <End> g$
80 nnoremap <Home> g0
81 vnoremap <End> g$
82 vnoremap <Home> g0
83 inoremap <End> <C-o>g$
84 inoremap <Home> <C-o>g0
85
86
87 if (has("gui_running"))
88 set wrap
89 set guioptions+=b
90 colo torte
91 else
92 set wrap
93 colo ron
94 endif
95
96 "set the guifont
97 if (has("gui_running"))
98 set guifont=Bitstream\ Vera\ Sans\ Mono\ 11
99 source $VIMRUNTIME/delmenu.vim
100 source $VIMRUNTIME/menu.vim
101 endif
102
103 " SAVING OPTIONS
104 set noexpandtab " don't change tabs into spaces
105 set backupext=~ " backup files end in ~
106
107 " EDITING OPTIONS
108 set autoindent " keep indenting at same level
109 set noerrorbells visualbell " flash screen instead of ringing bell
110 set esckeys " allow arrow keys in insert mode
111 set showmatch " show matching brackets
112
113 " SEARCH OPTIONS
114 set nohlsearch " don't highlight search patterns
115 set incsearch " search while typing
116 set ignorecase " make searches case-insensitive
117
118 " JavaID
119 :let java_highlight_all=1
120 :let java_highlight_java_beans=1
121
122 " MISCELLANEOUS OPTIONS
123 set dictionary=/usr/share/dict/words " get words from system dictionary
124 set magic " regexp chars have special meaning
125
126 filetype plugin on
127
128
129 " learn from carlos@linuxsir, to use multi cjk charset
130 "
131 " multi-encoding setting
132 if has("multi_byte")
133 "set bomb
134 set fileencodings=ucs-bom,utf-8,cp936,big5,euc-jp,euc-kr,latin1
135 " CJK environment detection and corresponding setting
136 if v:lang =~ "^zh_CN"
137 " Use cp936 to support GBK, euc-cn == gb2312
138 set encoding=cp936
139 set termencoding=cp936
140 set fileencoding=cp936
141 elseif v:lang =~ "^zh_TW"
142 " cp950, big5 or euc-tw
143 " Are they equal to each other?
144 set encoding=big5
145 set termencoding=big5
146 set fileencoding=big5
147 elseif v:lang =~ "^ko"
148 " Copied from someone's dotfile, untested
149 set encoding=euc-kr
150 set termencoding=euc-kr
151 set fileencoding=euc-kr
152 elseif v:lang =~ "^ja_JP"
153 " Copied from someone's dotfile, untested
154 set encoding=euc-jp
155 set termencoding=euc-jp
156 set fileencoding=euc-jp
157 endif
158 " Detect UTF-8 locale, and replace CJK setting if needed
159 if v:lang =~ "utf8$" || v:lang =~ "UTF-8$"
160 set encoding=utf-8
161 set termencoding=utf-8
162 set fileencoding=utf-8
163 endif
164 else
165 echoerr "Sorry, this version of (g)vim was not compiled with multi_byte"
166 endif
167
vim ?????? *nix???????
?vim????????????????????:
1. http://www.moolenaar.net/ha...
(vim??Bram Moolenaar???????????????????)
2.http://iccf-holland.org/ima...
[The vi Improved Editor] (???Bram Moolenaar, ???)
-------
2. SciTE
?????vim 3??????ruby??????
???SciTE ????
?????SciTE??????
??????????(?????????vim)
????SciTE.(???????????vim)
?????“?????”?
???Vi/vim??????????????“??”?????????????????
??????????Unix???????????
?vim????????????????????????????highlight????C?Java?Makefile?XML?Stylesheet?????????etc??????????????????????????????... ????????????????????
?????????????????????SSH???????????????????????????GUI??????????X Forward??????????????????????????
????180?????????????????????Emacs??????
????vim??????????????????????????????????????
vim??????????hoho
????????Emacs??????????????????????vim??
?????vim?????????????
??????????vim?
??????vim?win?…?vim.org???????????…
??????????~
????vim?autoindent????????????????????????????vim??????????C?HTML?????????????????indent???????????????????????????????????
vim 6.4???????????bug???????
vim rules?
@Kiral:
??????????? gg=G ????
??????????..?????????????indent????????????????????
gvim??????????????
??indent??????????indent??????????html???indent???????html.vim????indent??????????????????????html?????indent?????????????????auto-indent??????
notepad << ????????