blob: a55de803ebae8b7342a22818b2e02f1ace800869 (
plain) (
blame)
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
|
" Vim Configuration
" Author: clarkzjw
" 2016.11.14
"""""""""""""""""""""""""""""""""
" Vim-Plug基础插件
call plug#begin('~/.vim/plugged')
" Complete
Plug 'Valloric/YouCompleteMe'
" Syntax
Plug 'scrooloose/syntastic'
" Theme
Plug 'bling/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'tomasr/molokai'
" Python
Plug 'hdima/python-syntax'
Plug 'hynek/vim-python-pep8-indent'
" Misc
Plug 'jiangmiao/auto-pairs'
Plug 'Yggdroot/indentLine'
Plug 'kien/rainbow_parentheses.vim'
Plug 'bronson/vim-trailing-whitespace'
call plug#end()
"""""""""""""""""""""""""""""""""
"""""""""""""""""""""""""""""""""
" 设置缩进宽度为 4 个空格
set shiftwidth=4
set tabstop=4
set softtabstop=4
set expandtab
" 打开时光标放在上次退出时的位置
if has("autocmd")
autocmd BufReadPost *
\ if line("'\"") > 0 && line ("'\"") <= line("$") |
\ exe "normal g'\"" |
\ endif
endif
set so=10 " 光标移动到倒数第10行时开始滚屏
set number " 显示行号
syntax on " 打开语法高亮
filetype on " 打开文件类型支持
filetype plugin on " 打开文件类型插件支持
filetype indent on " 打开文件类型缩进支持
let mapleader = ","
" 模糊键
:command W w
:command WQ wq
:command Wq wq
:command Q q
"""""""""""""""""""""""""""""""""
" 插件配置文件
source ~/.vim/config/airline.vim
source ~/.vim/config/molokai.vim
source ~/.vim/config/ycm.vim
source ~/.vim/config/rainbow.vim
source ~/.vim/config/syntastic.vim
|