「Vim」我的Vim配置文件备份

2015.03.23 15:47 Mon| 33 visits vim| Text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
"=========================================================================
" DesCRiption: Waiichou使用的vimrc文件,for Windows GUI
"
" Last Change: 2015年02月01日
"
" For Vim Version:     7.4
"
"=========================================================================

"set nobackup   覆盖文件时不备份
"set autochdir  自动切换当前目录为当前文件所在的目录
"filetype plugin indent on  开启插件

set nocompatible     " 关闭 vi 兼容模式
syntax on   " 自动语法高亮
set number  " 显示行号
colorscheme tango2  " 设定配色方案
set cursorline  " 突出显示当前行
set shiftwidth=4    " 设定换行时自动缩进的宽度为 4
set tabstop=4   " 设定 tab 长度为 4
set smartindent " 开启新行时使用智能自动缩进
set noexpandtab " 不要用空格代替制表符
set guifont=Consolas:h12:cANSI  " :set guifont=*设置字体、用:set guifont?查看字体并修改
set go=  " 默认   set go=egmrLtT,已知最后一个toolbar

set encoding=utf-8
set fileencodings=utf-8,chinese,latin-1,

" 使用中文菜单
source $VIMRUNTIME/delmenu.vim
"source $VIMRUNTIME/menu.vim
language messages zh_CN.utf-8

" 复制粘贴
"source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin

set backspace=indent,eol,start
set bs=2

set laststatus=2
set statusline=[FORMAT=%{&ff}]\ [TYPE=%Y]\ [POS=%04l,%04v][%p%%]\ [LEN=%L]

filetype plugin on                              "文件格式

" set foldenable                                        "启用折叠
" set foldmethod=indent                                 "indent 折叠方式
" set foldmethod=marker                                "marker 折叠方式

" 用空格键来开关折叠
nnoremap <space> @=((foldclosed(line('.')) < 0) ? 'zc' : 'zo')<CR>

" 常规模式下输入 cM 清除行尾 ^M 符号
nmap cM :%s/\r$//g<CR>:noh<CR>

au GUIEnter * simalt ~x                           " Win 下窗口启动时自动最大化

" vimwiki
let g:vimwiki_use_mouse = 1
let g:vimwiki_list = [{'path': 'Z:\VimWiki\',
\ 'path_html': 'Z:\VimWiki\html\',
\ 'html_header': 'Z:\VimWiki\template\header.tpl',}]


" IMPORTANT: win32 users will need to have 'shellslash' set so that latex
" can be called correctly.
set shellslash

" IMPORTANT: grep will sometimes skip displaying the file name if you
" search in a singe file. This will confuse Latex-Suite. Set your grep
" program to always generate a file-name.
set grepprg=grep\ -nH\ $*

" OPTIONAL: This enables automatic indentation as you type.
filetype indent on

" OPTIONAL: Starting with Vim 7, the filetype of empty .tex files defaults to
" 'plaintex' instead of 'tex', which results in vim-latex not being loaded.
" The following changes the default filetype back to 'tex':
let g:tex_flavor='latex'

let g:Tex_FormatDependency_pdf = 'pdf'

let g:Tex_CompileRule_pdf = 'xelatex -interaction=nonstopmode $*.tex'

hi VimwikiHeader1 guifg=#FF0000
hi VimwikiHeader2 guifg=#00FF00
hi VimwikiHeader3 guifg=#0000FF
hi VimwikiHeader4 guifg=#FF00FF
hi VimwikiHeader5 guifg=#00FFFF
hi VimwikiHeader6 guifg=#FFFF00