/
.vimrc
90 lines (75 loc) · 1.86 KB
/
.vimrc
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
" Vundle
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
" - Vim 插件
Plugin 'molokai'
Plugin 'altercation/vim-colors-solarized'
Plugin 'ciaranm/inkpot'
Plugin 'zenorocha/dracula-theme', {'rtp': 'vim/'}
Plugin 'bling/vim-airline'
Plugin 'Yggdroot/indentLine'
Plugin 'jiangmiao/auto-pairs'
Plugin 'wting/rust.vim'
Plugin 'hynek/vim-python-pep8-indent'
Plugin 'hallison/vim-markdown'
Bundle 'cespare/vim-toml'
Bundle 'pangloss/vim-javascript'
Plugin 'kchmck/vim-coffee-script'
Plugin 'scrooloose/nerdtree'
Plugin 'majutsushi/tagbar'
Plugin 'SirVer/ultisnips'
Plugin 'honza/vim-snippets'
Plugin 'scrooloose/syntastic'
Plugin 'Valloric/YouCompleteMe'
call vundle#end()
filetype plugin indent on
" 通用
set autochdir
set number
syntax on
set cursorline
set list
set listchars=tab:>-,trail:-
set wrapscan
set hlsearch
set incsearch
set ignorecase
set history=1024
set nobackup
set noswapfile
set autoread
set whichwrap =b,s,<,>,[,],h,l
set nowrap
set completeopt-=preview
" 缩进
set smartindent
set tabstop=4
set shiftwidth=4
set expandtab
set softtabstop=4
set smarttab
" 插件
let mapleader = ","
set laststatus=2
map <Leader>f :NERDTreeToggle<CR>
map <Leader>s :w<CR>
let g:UltiSnipsExpandTrigger="<c-\\>"
" - Tagbar
let g:tagbar_ctags_bin = '/usr/local/Cellar/ctags/5.8_1/bin/ctags'
nmap <Leader>t :TagbarToggle<CR>
let g:tagbar_type_rust = {
\ 'ctagstype' : 'rust',
\ 'kinds' : [
\'T:types,type definitions',
\'f:functions,function definitions',
\'g:enum,enumeration names',
\'s:structure names',
\'m:modules,module names',
\'c:consts,static constants',
\'t:traits,traits',
\'i:impls,trait implementations',
\]
\}