-
Notifications
You must be signed in to change notification settings - Fork 3
/
.vimrc.bundles
197 lines (180 loc) · 6.17 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
192
193
194
195
196
197
" Environment {
" Basics {
set nocompatible " Must be first line
set background=dark " Assume a dark background
" }
" Windows Compatible {
" On Windows, also use '.vim' instead of 'vimfiles'; this makes synchronization
" across (heterogeneous) systems easier.
if has('win32') || has('win64')
set runtimepath=$HOME/.vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,$HOME/.vim/after
" Be nice and check for multi_byte even if the config requires
" multi_byte support most of the time
if has("multi_byte")
" Windows cmd.exe still uses cp850. If Windows ever moved to
" Powershell as the primary terminal, this would be utf-8
set termencoding=cp850
" Let Vim use utf-8 internally, because many scripts require this
set encoding=utf-8
setglobal fileencoding=utf-8
" Windows has traditionally used cp1252, so it's probably wise to
" fallback into cp1252 instead of eg. iso-8859-15.
" Newer Windows files might contain utf-8 or utf-16 LE so we might
" want to try them first.
set fileencodings=ucs-bom,utf-8,utf-16le,cp1252,iso-8859-15
endif
endif
" }
" }
" Bundles {
filetype off
call plug#begin('~/.vim/bundle')
" Use before config if available
if filereadable(expand("~/.vimrc.before"))
source ~/.vimrc.before
endif
" In your .vimrc.before file
" list only the plugin groups you will use
if !exists('g:cfg_bundle_preset')
let g:cfg_bundle_preset = "nano"
endif
if !exists('g:cfg_bundle_groups')
if g:cfg_bundle_preset == "full"
let g:cfg_bundle_groups = ['general', 'selecting', 'searching', 'youcompleteme', 'frontend']
elseif g:cfg_bundle_preset == 'cpp'
let g:cfg_bundle_groups = ['general', 'selecting', 'searching', 'youcompleteme']
elseif g:cfg_bundle_preset == 'frontend'
let g:cfg_bundle_groups = ['general', 'selecting', 'searching', 'youcompleteme', 'frontend']
else
let g:cfg_bundle_groups = ['general', 'selecting']
endif
endif
" You can use 'K' on plugin to show document
if count(g:cfg_bundle_groups, 'general')
" Management {
"if has('unix') && !has('mac')
"Plug 'lilydjwg/fcitx.vim'
"endif
"Plug 'scrooloose/nerdtree'
"Plug 'jistr/vim-nerdtree-tabs'
Plug 'lambdalisue/fern.vim'
Plug 'vim-ctrlspace/vim-ctrlspace'
Plug 'editorconfig/editorconfig-vim'
Plug 'majutsushi/tagbar'
Plug 'moll/vim-bbye'
" inline git management
Plug 'tpope/vim-fugitive'
" auto detect indent size
Plug 'tpope/vim-sleuth'
Plug 'airblade/vim-gitgutter'
Plug 'zivyangll/git-blame.vim'
if has('vim9script')
Plug 'Eliot00/git-lens.vim'
endif
"Plug 'mbbill/undotree'
" }
" UI {
Plug 'spf13/vim-colors'
"Plug 'joshdick/onedark.vim'
"Plug 'sainnhe/sonokai'
"Plug 'NLKNguyen/papercolor-theme'
"Plug 'Mizux/vim-colorschemes'
Plug 'sainnhe/edge'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'edkolev/tmuxline.vim'
Plug 'powerline/fonts', { 'do': './install.sh' }
"Plug 'junegunn/vim-emoji'
Plug 'flazz/vim-colorschemes'
"Plug 'nathanaelkane/vim-indent-guides'
Plug 'Yggdroot/indentLine'
Plug 'godlygeek/tabular'
"Plug 'luochen1990/rainbow'
" Show git changes
"Plug 'mhinz/vim-signify'
" }
" Edit {
Plug 'w0rp/ale'
"Plug 'Chiel92/vim-autoformat'
" syntax support for every language
"Plug 'sheerun/vim-polyglot'
" many useful jump mappings with [ and ]
Plug 'tpope/vim-unimpaired'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-repeat'
Plug 'rhysd/conflict-marker.vim'
Plug 'jiangmiao/auto-pairs'
Plug 'Valloric/MatchTagAlways'
Plug 'tpope/vim-abolish'
Plug 'osyo-manga/vim-over'
Plug 'mhinz/vim-hugefile'
Plug 'scrooloose/nerdcommenter'
Plug 'tpope/vim-commentary'
Plug 'quentindecock/vim-cucumber-align-pipes'
" }
endif
if count(g:cfg_bundle_groups, 'selecting')
" Selecting {
Plug 'terryma/vim-multiple-cursors'
Plug 'gcmt/wildfire.vim'
Plug 'kana/vim-textobj-user'
Plug 'kana/vim-textobj-indent'
Plug 'beloglazov/vim-textobj-quotes'
Plug 'Julian/vim-textobj-brace'
Plug 'Chun-Yang/vim-textobj-chunk'
Plug 'whatyouhide/vim-textobj-xmlattr'
Plug 'jceb/vim-textobj-uri'
" }
endif
if count(g:cfg_bundle_groups, 'searching')
" Search {
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all --no-update-rc' }
Plug 'junegunn/fzf.vim'
"Plug 'ctrlpvim/ctrlp.vim'
"Plug 'tacahiroy/ctrlp-funky'
Plug 'dyng/ctrlsf.vim'
" }
endif
if count(g:cfg_bundle_groups, 'youcompleteme')
if g:cfg_bundle_preset == 'cpp'
Plug 'ycm-core/YouCompleteMe', {'do': 'python3 install.py --system-libclang --clang-completer --clangd-completer'}
elseif g:cfg_bundle_preset == 'frontend'
Plug 'ycm-core/YouCompleteMe', {'do': 'python3 install.py --js-completer'}
elseif g:cfg_bundle_preset == "full"
Plug 'ycm-core/YouCompleteMe', {'do': 'python3 install.py --system-libclang --clang-completer --clangd-completer --js-completer'}
endif
" Snips {
Plug 'SirVer/ultisnips'
Plug 'honza/vim-snippets'
" }
endif
if count(g:cfg_bundle_groups, 'frontend')
" Javascript {
Plug 'pangloss/vim-javascript'
"Plug 'ternjs/tern_for_vim', {'do': 'npm install'}
Plug 'elzr/vim-json'
Plug 'isRuslan/vim-es6'
Plug 'posva/vim-vue'
Plug 'prettier/vim-prettier'
"Plug 'mxw/vim-jsx'
Plug 'leafgarland/typescript-vim'
"Plug 'maxmellon/vim-jsx-pretty'
Plug 'peitalin/vim-jsx-typescript'
Plug 'groenewege/vim-less'
Plug 'kchmck/vim-coffee-script'
Plug 'Quramy/tsuquyomi'
Plug 'Quramy/vim-js-pretty-template'
Plug 'jason0x43/vim-js-indent'
" }
" HTML&CSS {
Plug 'othree/html5.vim'
Plug 'alvan/vim-closetag'
Plug 'hail2u/vim-css3-syntax'
Plug 'ap/vim-css-color'
Plug 'othree/csscomplete.vim'
Plug 'tpope/vim-haml'
Plug 'mattn/emmet-vim'
" }
endif
call plug#end()
" }