diff options
Diffstat (limited to 'vim/.vimrc')
-rw-r--r-- | vim/.vimrc | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/vim/.vimrc b/vim/.vimrc new file mode 100644 index 0000000..a55de80 --- /dev/null +++ b/vim/.vimrc | |||
@@ -0,0 +1,69 @@ | |||
1 | " Vim Configuration | ||
2 | " Author: clarkzjw | ||
3 | " 2016.11.14 | ||
4 | |||
5 | """"""""""""""""""""""""""""""""" | ||
6 | " Vim-Plug基础插件 | ||
7 | call plug#begin('~/.vim/plugged') | ||
8 | |||
9 | " Complete | ||
10 | Plug 'Valloric/YouCompleteMe' | ||
11 | |||
12 | " Syntax | ||
13 | Plug 'scrooloose/syntastic' | ||
14 | |||
15 | " Theme | ||
16 | Plug 'bling/vim-airline' | ||
17 | Plug 'vim-airline/vim-airline-themes' | ||
18 | Plug 'tomasr/molokai' | ||
19 | |||
20 | " Python | ||
21 | Plug 'hdima/python-syntax' | ||
22 | Plug 'hynek/vim-python-pep8-indent' | ||
23 | |||
24 | " Misc | ||
25 | Plug 'jiangmiao/auto-pairs' | ||
26 | Plug 'Yggdroot/indentLine' | ||
27 | Plug 'kien/rainbow_parentheses.vim' | ||
28 | Plug 'bronson/vim-trailing-whitespace' | ||
29 | |||
30 | call plug#end() | ||
31 | """"""""""""""""""""""""""""""""" | ||
32 | |||
33 | """"""""""""""""""""""""""""""""" | ||
34 | " 设置缩进宽度为 4 个空格 | ||
35 | set shiftwidth=4 | ||
36 | set tabstop=4 | ||
37 | set softtabstop=4 | ||
38 | set expandtab | ||
39 | |||
40 | " 打开时光标放在上次退出时的位置 | ||
41 | if has("autocmd") | ||
42 | autocmd BufReadPost * | ||
43 | \ if line("'\"") > 0 && line ("'\"") <= line("$") | | ||
44 | \ exe "normal g'\"" | | ||
45 | \ endif | ||
46 | endif | ||
47 | |||
48 | set so=10 " 光标移动到倒数第10行时开始滚屏 | ||
49 | set number " 显示行号 | ||
50 | syntax on " 打开语法高亮 | ||
51 | filetype on " 打开文件类型支持 | ||
52 | filetype plugin on " 打开文件类型插件支持 | ||
53 | filetype indent on " 打开文件类型缩进支持 | ||
54 | let mapleader = "," | ||
55 | |||
56 | |||
57 | " 模糊键 | ||
58 | :command W w | ||
59 | :command WQ wq | ||
60 | :command Wq wq | ||
61 | :command Q q | ||
62 | """"""""""""""""""""""""""""""""" | ||
63 | |||
64 | " 插件配置文件 | ||
65 | source ~/.vim/config/airline.vim | ||
66 | source ~/.vim/config/molokai.vim | ||
67 | source ~/.vim/config/ycm.vim | ||
68 | source ~/.vim/config/rainbow.vim | ||
69 | source ~/.vim/config/syntastic.vim | ||