-
Notifications
You must be signed in to change notification settings - Fork 6
/
.vimplugins.vim
244 lines (219 loc) · 8.4 KB
/
.vimplugins.vim
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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
"###############################################3
"## Plugin stuff
"###############################################3
" Vundle Plugins Setup
filetype off
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
" Examples:
" Plugin 'tpope/vim-fugitive'
" Plugin 'git://git.wincent.com/command-t.git'
" Plugin 'file:///home/gmarik/path/to/plugin'
" Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
"""""""""""""""""""""""""""""""""""""""""""
"" Install Vim plugins with Vundle here
"vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
" Install plugins here.
" They can be easily installed without entering Vim by running:
" vim +PluginInstall +qall
Plugin 'AndrewRadev/linediff.vim'
Plugin 'ConradIrwin/vim-bracketed-paste' " Automatic set paste when pasting. which is nice.
Plugin 'altercation/vim-colors-solarized' " Pleasant colors
Plugin 'bogado/file-line' " Open paths like `/path/to/file:NN` directly to the specified line number
Plugin 'cespare/vim-toml'
Plugin 'chaimleib/vim-renpy'
Plugin 'christoomey/vim-sort-motion'
Plugin 'christoomey/vim-titlecase'
Plugin 'coachshea/vim-textobj-markdown'
Plugin 'craigemery/vim-autotag'
Plugin 'cspeterson/vim-convert' " Unit conversion
Plugin 'dhruvasagar/vim-table-mode'
Plugin 'editorconfig/editorconfig-vim'
Plugin 'elzr/vim-json' " Better than standard javascript highlighting
Plugin 'godlygeek/tabular' " Aligns text
Plugin 'iamcco/markdown-preview.vim' " Md preview with commands MarkdownPreview and MarkdownPreviewStop
Plugin 'jeetsukumaran/vim-indentwise'
Plugin 'junegunn/fzf'
Plugin 'junegunn/fzf.vim'
Plugin 'junegunn/vader.vim'
Plugin 'kana/vim-textobj-entire' " Requires kana/vim-textobj-user
Plugin 'kana/vim-textobj-line' " Requires kana/vim-textobj-use
Plugin 'kana/vim-textobj-user'
Plugin 'kshenoy/vim-signature' " Show vim placemarks in sidebar
Plugin 'michaeljsmith/vim-indent-object'
Plugin 'mzlogin/vim-markdown-toc'
Plugin 'othree/html5.vim'
Plugin 'pangloss/vim-javascript'
Plugin 'plasticboy/vim-markdown'
Plugin 'psf/black'
Plugin 'rhysd/vim-textobj-anyblock'
Plugin 'rodjek/vim-puppet'
Plugin 'sk1418/HowMuch'
Plugin 'tmhedberg/SimpylFold' " smarter code folding
Plugin 'tmhedberg/matchit'
Plugin 'tommcdo/vim-exchange'
Plugin 'tpope/vim-commentary'
Plugin 'tpope/vim-endwise'
Plugin 'tpope/vim-fugitive'
Plugin 'tpope/vim-repeat'
Plugin 'tpope/vim-speeddating'
Plugin 'tpope/vim-surround' " Easily work with surrounding objects eg parens, quotes, tags
Plugin 'vim-ruby/vim-ruby'
Plugin 'vim-scripts/ReplaceWithRegister'
if (has('python3'))
Plugin 'fisadev/vim-isort'
Plugin 'python-mode/python-mode'
endif
if v:version < 800
Plugin 'vim-syntastic/syntastic'
let syntax_checker = 'syntastic'
else
Plugin 'dense-analysis/ale'
let syntax_checker = 'ale'
endif
"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
"" End list of plugins to install/manage
"""""""""""""""""""""""""""""""""""""""""""
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
"###############################################3
"# vim-json
"###############################################3
" If this is left on (default), the editor only shows the quotes around keys and values
" for the active line
"let g:vim_json_syntax_conceal = 0
"###############################################3
"# vim-fugitive
"###############################################3
set diffopt+=vertical
"###############################################3
"# vim-markdown-toc
"###############################################3
:command! Mdtoc GenTocGFM
"###############################################3
"# vim-markdown
"###############################################3
let g:vim_markdown_conceal_code_blocks = 0
let g:vim_markdown_edit_url_in = 'hsplit'
let g:vim_markdown_follow_anchor = 1
let g:vim_markdown_follow_anchor = 1
let g:vim_markdown_new_list_item_indent = 0
let g:vim_markdown_strikethrough = 1
let g:vim_markdown_yaml_frontmatter = 1
"###############################################3
"# Markdown Preview
"###############################################3
:command! Mdprev MarkdownPreview
:command! Mdprevs MarkdownPreviewStop
"# Pymode
let g:pymode_lint_checkers = [] " using ALE for linting already thx
"###############################################3
"# Linediff
"###############################################3
nnoremap <Leader>ld :Linediff<Enter>
vnoremap <Leader>ld :Linediff<Enter>
nnoremap <Leader>ldr :LinediffReset<Enter>
vnoremap <Leader>ldr :LinediffReset<Enter>
"###############################################3
"# Theming
"###############################################3
syntax enable
let g:solarized_termcolors=256
colorscheme solarized
" Set undercurl mode to get around underline fallback bug in some vim versions
" https://github.com/vim/vim/issues/2424
set t_Cs=
" Toggle dark/light colors
call togglebg#map("<F5>")
" now set it so it doesn't do that awful ugly blocky coloring behind text
" (this needs to be after the syntax line above)
hi Normal ctermbg=NONE
"###############################################3
"# Snytax
"###############################################3
if syntax_checker ==# 'syntastic'
"# Syntax highlighting options for Syntastic plugin
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
let g:syntastic_python_checkers = ['python3']
else
let g:ale_echo_msg_format = '%code%: %s [%linter%]'
let g:ale_lint_on_enter = 1
let g:ale_lint_on_insert_leave = 1
let g:ale_lint_on_save = 1
let g:ale_lint_on_text_changed = 'never'
let g:ale_linters = { 'markdown': ['vale']}
let g:ale_sign_error = '✘'
let g:ale_sign_warning = '⚠'
nnoremap ]l :ALENextWrap<CR>
nnoremap [l :ALEPreviousWrap<CR>
endif
"###############################################
"# Speeddating
"###############################################
let g:speeddating_no_mappings = 1
nmap + <Plug>SpeedDatingUp
nmap = <Plug>SpeedDatingUp
nmap - <Plug>SpeedDatingDown
xmap + <Plug>SpeedDatingUp
xmap = <Plug>SpeedDatingUp
xmap - <Plug>SpeedDatingDown
nmap d+ <Plug>SpeedDatingNowUTC
nmap d= <Plug>SpeedDatingNowUTC
nmap d- <Plug>SpeedDatingNowLocal
"###############################################
"# titlecase
"###############################################
nmap gt <Plug>Titlecase
vmap gt <Plug>Titlecase
"###############################################
"# Textobj-Markdown
"###############################################
" I only want this plugin in order to make objects of fenced codeblocks, so
" stop it from doing its other things
let g:textobj_markdown_no_default_key_mappings=1
omap aF <plug>(textobj-markdown-Bchunk-a)
omap af <plug>(textobj-markdown-chunk-a)
omap iF <plug>(textobj-markdown-Bchunk-i)
omap if <plug>(textobj-markdown-chunk-i)
vmap aF <plug>(textobj-markdown-Bchunk-a)
vmap af <plug>(textobj-markdown-chunk-a)
vmap iF <plug>(textobj-markdown-Bchunk-i)
vmap if <plug>(textobj-markdown-chunk-i)
"###############################################3
"# Man
"###############################################3
runtime ftplugin/man.vim
"###############################################3
"# Fzf
"###############################################3
imap <c-x><c-f> <plug>(fzf-complete-file)
imap <c-x><c-l> <plug>(fzf-complete-line)
" File completion of *directories only*
imap <expr> <c-x><c-d> fzf#vim#complete#path("find . -type d -print \| sed '1d;s:^..::'")
"###############################################3
"# Tabular(ize)
"###############################################3
autocmd VimEnter * AddTabularPattern first_hash /^[^#]*\zs#
autocmd VimEnter * AddTabularPattern puppet_params /^[^\$]*\zs\$/l1c0
autocmd VimEnter * AddTabularPattern rocket /^[^\$]*\zs\$/l1c0