-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.vimrc.bundles
194 lines (180 loc) · 7.12 KB
/
.vimrc.bundles
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
if &compatible
set nocompatible
end
call plug#begin('~/.vim/plugged')
let g:plug_url_format = '[email protected]:%s.git'
" ------Plugins start-------
" 中文帮助, 使用方法`:h 待查找的内容`
Plug 'yianwillis/vimcdoc'
" python 语法高亮
Plug 'hdima/python-syntax', { 'for': 'python' }
" 目录树
Plug 'scrooloose/nerdtree', { 'on': ['NERDTreeToggle','NERDTreeMirror','NERDTree'] }
" 目录树下显示git状态
Plug 'Xuyuanp/nerdtree-git-plugin', { 'on': ['NERDTreeToggle','NERDTreeMirror','NERDTree'] }
" 使nerdtree下可以用enter展开文件、用enter开文件到新tab
Plug 'Nopik/vim-nerdtree-direnter', { 'on': 'NERDTreeToggle' }
" 自动加注释
Plug 'hyliang96/nerdcommenter'
" 缩进线
Plug 'Yggdroot/indentLine'
" , {'on' : 'IndentLinesToggle'}
" 多光标
" Plug 'terryma/vim-multiple-cursors'
" Plug 'hyliang96/vim-multiple-cursors'
" 更好用的多光标
Plug 'mg979/vim-visual-multi'
" Plug 'mg979/vim-visual-multi' , {'tag': 'v0.2'}
" 界面框架(tab,提示栏等)美化
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
" airline的gruvbox主题
Plug 'morhetz/gruvbox' " 好看
" Plug 'sainnhe/gruvbox-material' " 不好看
" 获取git状态,让airline显示之;并支持在vim中进行git操作
Plug 'tpope/vim-fugitive'
" 它会在 Vim 的行号列旁显示 git diff 的差异标记
Plug 'airblade/vim-gitgutter', { 'branch' : 'main' }
" 用于支持我的vimrc中的双击选词高亮相同词
Plug 'Tuxdude/mark.vim'
" " 模糊搜索文件
" Plug 'hyliang96/ctrlp.vim'
" " , { 'on': [ 'CtrlP', 'CtrlPBuffer', 'CtrlPMRU' ] }
" " 模糊搜索文件内容的方法名
" Plug 'tacahiroy/ctrlp-funky'
" " , { 'on': [ 'CtrlP', 'CtrlPBuffer', 'CtrlPMRU' ] }
" 工程内模糊搜索文件、最近文(mru)件、函数/类/变量(tags)、命令历史、文件、中的某一行、vim的help、marks"
" Plug 'hyliang96/LeaderF', { 'do': './install.sh' }
Plug 'Yggdroot/LeaderF', { 'do': ':LeaderfInstallCExtension' }
" 高速全局搜索插件
Plug 'dyng/ctrlsf.vim'
" 全局搜搜与替换
" Plug 'hyliang96/far.vim' " 已经merge到'brooth/far.vim'
Plug 'brooth/far.vim'
" 自动补全
" mac 上的 conda里的python无法编译ycm,需要系统自带的Python
" 详见 https://github.com/ycm-core/YouCompleteMe#ycm-does-not-work-with-my-anaconda-python-setup
Plug 'ycm-core/YouCompleteMe', { 'do': '~/.vim/install_ycm.sh' }
" Plug 'Valloric/YouCompleteMe', { 'do': './install.py' }
" ultisnips是引擎
Plug 'SirVer/ultisnips'
" 所有常用snippet都在vim-snippets里
Plug 'honza/vim-snippets'
" supertab用来防止使用tab展开snippet与youcompleteme的tab补全发生冲突
Plug 'hyliang96/supertab'
" 括号补全
Plug 'Raimondi/delimitMate'
" 彩色括号对
Plug 'kien/rainbow_parentheses.vim'
" 快速给词加环绕符号,例如单引号/双引号/括号/成对标签等
Plug 'tpope/vim-surround'
" 重复一个插件的操作, 支持surround.vim, 通过 surround 操作之后的行为, .号重复
" Plug 'tpope/vim-repeat'
" 补全 HTML/XML 标签
" Plug 'docunext/closetag.vim'
" 配色库
Plug 'flazz/vim-colorschemes'
" ------Plugins end -------
if filereadable(expand("~/.vimrc.bundles.local"))
source ~/.vimrc.bundles.local
endif
call plug#end()
function! PlugLoaded(name)
let l:container = {}
function! container.RemoveDirTail(dir)
let l:len = len(a:dir)
if a:dir[l:len-1] == '/'
return a:dir[0 : l:len-2]
endif
return a:dir
endfunction
return (
\ has_key(g:plugs, a:name) &&
\ isdirectory(g:plugs[a:name].dir) &&
\ stridx(&rtp, l:container.RemoveDirTail(g:plugs[a:name].dir)) >= 0)
endfunction
" 参考插件
" ------Plugins-------
" Define bundles via Github repos
" Bundle 'christoomey/vim-run-interactive'
" Bundle 'Valloric/YouCompleteMe'
" Bundle 'croaky/vim-colors-github'
" Bundle 'danro/rename.vim'
" Bundle 'majutsushi/tagbar'
" Bundle 'kchmck/vim-coffee-script'
" Bundle 'kien/ctrlp.vim'
" Bundle 'pbrisbin/vim-mkdir'
" Bundle 'scrooloose/syntastic'
" Bundle 'slim-template/vim-slim'
" Bundle 'thoughtbot/vim-rspec'
" Bundle 'tpope/vim-bundler'
" Bundle 'tpope/vim-endwise'
" Bundle 'tpope/vim-fugitive'
" Bundle 'tpope/vim-rails'
" Bundle 'tpope/vim-surround'
" Bundle 'vim-ruby/vim-ruby'
" Bundle 'vim-scripts/ctags.vim'
" Bundle 'vim-scripts/matchit.zip'
" " Bundle 'vim-scripts/tComment'
" Bundle "mattn/emmet-vim"
" Bundle "Lokaltog/vim-powerline"
" Bundle "godlygeek/tabular"
" Bundle "msanders/snipmate.vim"
" Bundle "jelera/vim-javascript-syntax"
" Bundle "altercation/vim-colors-solarized"
" Bundle "othree/html5.vim"
" Bundle "xsbeats/vim-blade"
" Bundle "Raimondi/delimitMate"
" Bundle "groenewege/vim-less"
" " Bundle 'evanmiller/nginx-vim-syntax'
" " 安装失败,需要github账号和密码
" Bundle "Lokaltog/vim-easymotion"
" Bundle "tomasr/molokai"
" Bundle "klen/python-mode"
" Plugin 'airblade/vim-gitgutter'
" Plugin 'davidhalter/jedi-vim'
" Plugin 'gcmt/breeze.vim'
" Plugin 'tomtom/tcomment_vim'
" " ------Plugins-------
" Plugin 'scrooloose/nerdtree'
" Plugin 'tpope/vim-surround'
" Plugin 'gcmt/breeze.vim'
" Plugin 'kien/ctrlp.vim'
" Plugin 'SirVer/ultisnips'
" Plugin 'tomtom/tcomment_vim'
" Plugin 'vim-airline/vim-airline'
" Plugin 'vim-airline/vim-airline-themes'
" Plugin 'airblade/vim-gitgutter'
" Plugin 'Valloric/YouCompleteMe'
" Plugin 'davidhalter/jedi-vim'
"-----------------------------------------------------------------
" plugin - matchit.vim 对%命令进行扩展使得能在嵌套标签和语句之间跳转
" % 正向匹配 g% 反向匹配
" [% 定位块首 ]% 定位块尾
"-----------------------------------------------------------------
" plugin - vcscommand.vim 对%命令进行扩展使得能在嵌套标签和语句之间跳转
" SVN/git管理工具
"-----------------------------------------------------------------
" plugin – a.vim
"-----------------------------------------------------------------
" plugin - mark.vim 给各种tags标记不同的颜色,便于观看调式的插件。
" \m mark or unmark the word under (or before) the cursor
" \r manually input a regular expression. 用于搜索.
" \n clear this mark (i.e. the mark under the cursor), or clear all highlighted marks .
" \* 当前MarkWord的下一个 \# 当前MarkWord的上一个
" \/ 所有MarkWords的下一个 \? 所有MarkWords的上一个
"-----------------------------------------------------------------
" plugin – ZenCoding.vim 很酷的插件,HTML代码生成
" 插件最新版:http://github.com/mattn/zencoding-vim
" 常用命令可看:http://nootn.com/blog/Tool/23/
"-----------------------------------------------------------------
" plugin - bufexplorer.vim Buffers切换
" \be 全屏方式查看全部打开的文件列表
" \bv 左右方式查看 \bs 上下方式查看
"-----------------------------------------------------------------
" plugin - taglist.vim 查看函数列表,需要ctags程序
" F4 打开隐藏taglist窗口