1 " Ingore case
 2 set ignorecase
 3 " Highlight for searching
 4 set hlsearch
 5 " Highlight for recognised file type
 6 syntax on
 7 " Character encodings used in Vim
 8 set encoding=utf8
 9 " Automatically detected character encodings
10 set fileencodings=ucs-bom,utf8,cp936,big5
11 " grep will sometimes skip displaying the file name if you
12 " search in a singe file. This will confuse latex-suite. Set your grep
13 " program to alway generate a file-name.
14  set grepprg=grep\ -nH\ $*
15 " This enables automatic indentation as you type.
16  filetype indent on
17 " Font for displaying file
18 set guifont=Consolas\ 13
19 " Search as i type
20 set incsearch
21 " tab stop
22 set softtabstop=4
23 set shiftwidth=4
24 set expandtab
25 " swap file dir
26 set directory=~/test
27 " color scheme
28 colorscheme zellner
29 " lines and cos and window position
30 if (has("gui_running"))
31   colorscheme peachpuff " darkblue
32   set lines=32
33     set columns=80
34     winpos 0 40
35 endif
36 " show line numbers
37 set number
38 " always display the status line
39 set laststatus=2
40 " display the line and column number of the cursor position
41 set ruler
42 " pasting to other X apps doesn't require prefixing "*
43 set clipboard+=unnamed
44 " enable filetype plugins
45 filetype plugin on
46 " enable mouse in xterm
47 set mouse=a
48 set mousemodel=extend
49 " avoid hit-enter prompt and some other messages
50 set shortmess=a
51 " start editing from the last position
52 set nostartofline
53 " m:在多字节字符处可以折行,对中文特别有效(否则只在空白字符处折行);
54 " M:在拼接两行时(重新格式化,或者是手工使用"J"命令),如果前一行的结尾或后一行的开头是多字节字符,则不插入空格,非常适合中文
55 set formatoptions+=mM
56 " use xterm to enable mouse
57 if (! has("gui_running"))
58   set term=xterm
59 endif
60 " enable spelling checking
61 "set textwidth=72
62 set autochdir
63 "set foldmethod=indent
64 
65 """""""""""""""""""" map section """""""""""""""""""" 
66 " tab switch windows
67 nnoremap <TAB> <ESC><C-W><C-W>
68 " show history of commands
69 nnoremap : q:i
70 " jump only one 'line' when wrap set on
71 nnoremap <Down> gj
72 nnoremap <Up> gk
73 vnoremap <Down> gj
74 vnoremap <Up> gk
75 inoremap <Down> <C-o>gj
76 inoremap <Up> <C-o>gk
77 "set imactivatekey=C-space
78 "inoremap <ESC> <ESC>:set iminsert=0<CR>
79 " map F2 to insert the current date to the bottom
80 :map <F2> Go<ESC>:read !date<CR>kJ``
81 " make move easier in insert mode
82 inoremap <C-F> <C-O>a
83 inoremap <C-B> <C-O>h