-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc-2nd
399 lines (296 loc) · 9.75 KB
/
.vimrc-2nd
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
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
call plug#begin('~/.vim/plugged')
" _ _
" _ __ | |_ _ __ _(_)_ __ ___
"| '_ \| | | | |/ _` | | '_ \/ __|
"| |_) | | |_| | (_| | | | | \__ \
"| .__/|_|\__,_|\__, |_|_| |_|___/
"|_| |___/
" using vim-plug, installation:
" curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
" https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
" open vi, :PlugInstall
" general auto-completion
" cd .vim/plugged/YouCompleteMe; ./install.py
" off now because it barely works and takes all the cpu
" Plug 'Valloric/YouCompleteMe'
" use lines to match and track indention
" UPDATE: switched to indention guides instead, lines break a bunch of syntax
" highlighting
"Plug 'Yggdroot/indentLine'
Plug 'nathanaelkane/vim-indent-guides'
let g:indent_guides_auto_colors = 0
let g:indent_guides_enable_on_vim_startup = 1
autocmd VimEnter,Colorscheme * :hi IndentGuidesOdd guibg=#222222 ctermbg=0
autocmd VimEnter,Colorscheme * :hi IndentGuidesEven guibg=#333333 ctermbg=0
" tern for vm - javascript
Plug 'ternjs/tern_for_vim'
" lets try this again
Plug 'Valloric/YouCompleteMe'
Plug 'ervandew/supertab'
" Start autocompletion after 4 chars
let g:ycm_min_num_of_chars_for_completion = 3
let g:ycm_min_num_identifier_candidate_chars = 3
let g:ycm_enable_diagnostic_highlighting = 0
" Don't show YCM's preview window [ I find it really annoying ]
" set completeopt-=preview
" let g:ycm_add_preview_to_completeopt = 0
" lets get some proper html5 syntax
Plug 'othree/html5.vim'
" vue syntax, sure lets do it
Plug 'posva/vim-vue'
" vim git awesomeness
Plug 'tpope/vim-fugitive'
" tabular, line up text, ex:
" one = 1
" four = 4
" Execute either selected or w/in range: :Tab /=
" one = 1
" four = 4
"
Plug 'godlygeek/tabular'
" sweet status/tabline for vim
" for powerline fonts remember to install em via
" https://github.com/powerline/fonts
" then make sure macvim is installed
" with: brew install macvim --env-std --override-system-vim
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
" fzf.vim
Plug '/usr/local/opt/fzf'
Plug 'junegunn/fzf.vim'
Plug 'https://github.com/Alok/notational-fzf-vim'
" easymotion, on-screen search clarity, just hit \w and then type the chars
" of the word/part you want to hop to, w = word, l = line, f = find
Plug 'easymotion/vim-easymotion'
" nerdtree, ctrl+n
Plug 'scrooloose/nerdtree'
" nerdtree git support - shows git status of files/dirs
Plug 'Xuyuanp/nerdtree-git-plugin'
" gitgutter - (switcedh from signify cuz emojis, shows add/modified/removed
" lines in git
Plug 'airblade/vim-gitgutter'
" minimap - hilarious dots
Plug 'severin-lemaignan/vim-minimap'
" cursor crosshair!
" MAJOR LAG Plug 'bronson/vim-crosshairs'
" show hex/text color values in css/stylus/yaml/etc
Plug 'ap/vim-css-color'
" coffeesript syntax and auto-compilation
Plug 'kchmck/vim-coffee-script'
Plug 'pangloss/vim-javascript'
" jade syntax - being renamed to pug??? - dont forget to npm install -g
" jade-lint
"
Plug 'digitaltoad/vim-pug'
" https://github.com/dNitro/vim-pug-complete
" Vim omni-completion support for pug (formerly jade) template engine
" Hit <C-x><C-o> in insert mode everywhere you expect something to popup
Plug 'dNitro/vim-pug-complete'
" stylus syntax
Plug 'wavded/vim-stylus'
" sass/scss syntax
Plug 'cakebaker/scss-syntax.vim'
" json syntax
Plug 'elzr/vim-json'
" sweet themes
Plug 'morhetz/gruvbox'
Plug 'mhinz/vim-janah'
" a ton of 256color colorschemes to browse
Plug 'flazz/vim-colorschemes'
Plug 'vim-scripts/Ambient-Color-Scheme'
" blade syntax, why not
Plug 'jwalton512/vim-blade'
" lets see what happens
Plug 'w0rp/ale'
" https://github.com/joshdick/onedark.vim
" A dark Vim color scheme for the GUI and 16/256-color terminals, based on FlatColor, with colors inspired by the excellent One Dark syntax theme for the Atom text editor.
"
Plug 'editorconfig/editorconfig-vim'
"
Plug 'joshdick/onedark.vim'
" vim emojis ofcourse, combined with git gutter we got emoji gutters
Plug 'junegunn/vim-emoji'
" les try youcompleteme
" Plug 'Valloric/YouCompleteMe'
" finally doing some typescript
" Plug 'leafgarland/typescript-vim'
Plug 'leafgarland/typescript-vim'
" Dart support!
Plug 'dart-lang/dart-vim-plugin'
" Let's get some templates going
Plug 'aperezdc/vim-template'
" rainbow braces/etc
Plug 'luochen1990/rainbow'
" proper PHP syntax
Plug 'StanAngeloff/php.vim'
" PHP??!?
" Plug 'tpope/vim-dispatch' "| Optional
" Plug 'tpope/vim-projectionist' "|
" Plug 'noahfrederick/vim-composer' "|
" Plug 'noahfrederick/vim-laravel'
" Plug 'Shougo/vimproc.vim', {'do' : 'make'}
" Plug 'Shougo/unite.vim'
" Plug 'm2mdas/phpcomplete-extended'
" Plug 'm2mdas/phpcomplete-extended-laravel'
"
"
" lets try carbon code sharing
Plug 'kristijanhusak/vim-carbon-now-sh'
" lest try prettier for js
Plug 'prettier/vim-prettier', { 'do': 'yarn install' }
" https://github.com/heavenshell/vim-jsdoc
Plug 'heavenshell/vim-jsdoc'
let g:prettier#config#semi = 'false'
let g:prettier#config#trailing_comma = 'all'
call plug#end()
filetype plugin indent on
set t_Co=256
set foldmethod=marker
set shiftwidth=2
set tabstop=2
set softtabstop=2
set laststatus=2
set expandtab
set hlsearch
"set backspace=2
set backspace=indent,eol,start
" set autoindent
" set smartindent
set mouse=a
set ttymouse=xterm2
syntax enable
" :map <C-C> :CoffeeWatch vert <Enter> :setl scrollbind <Enter> <C-w> <C-w> :setl scrollbind
function! s:RemoveGeneratedBy()
" If there was an error compiling, there's no comment to remove.
if v:shell_error
return
endif
" Save cursor position.
let pos = getpos('.')
" Remove first line.
set modifiable
1 delete _
set nomodifiable
" Restore cursor position.
call setpos('.', pos)
endfunction
augroup CoffeeBufUpdate
autocmd User CoffeeCompile,CoffeeWatch call s:RemoveGeneratedBy()
augroup END
" remove scrollbars
set guioptions-=r
set guioptions-=L
set guifont=Roboto\ Mono\ for\ Powerline:h18
" airline tweaks
let g:airline_powerline_fonts = 1
let g:airline#extensions#whitespace#checks = [ 'indent', 'mixed-indent-file' ]
let g:airline_theme='onedark'
set statusline+=%#warningmsg#
set statusline+=%*
" Available checkers: html/jshint html/tidy html/validator html/w3 javascript/jshint
let local_eslint = finddir('node_modules', '.;') . '/.bin/eslint'
if matchstr(local_eslint, "^\/\\w") == ''
let local_eslint = getcwd() . "/" . local_eslint
endif
" nerdtree
map <C-n> :NERDTreeToggle<CR>
" easymotion - lest just do overwin since its crazy awesome
map <Leader> <Plug>(easymotion-prefix)
nmap <Leader>f <Plug>(easymotion-overwin-f)
nmap <Leader>w <Plug>(easymotion-overwin-w)
map <Leader>l <Plug>(easymotion-overwin-line)
nmap <Leader>l <Plug>(easymotion-overwin-line)
" ctrlp ignores
set wildignore+=*/tmp/*,*.so,*.swp,*.zip,*.jpg,*.png,*.gif,*.mp4
set wildignore+=node_modules/**,vendor/**,dist/**
" nativescript
set wildignore+=hooks/**,platforms/**
let g:ctrlp_custom_ignore = {
\ 'dir': 'node_modules$\|\.git$\|vendor$\|storage$\|dist$',
\ 'file': '\.DS_Store'
\ }
" background
set background=dark
" crosshair cursor config
"set cursorline " enable the horizontal line
"set cursorcolumn " enable the vertical line
"highlight CursorLine term=underline ctermbg=237 guibg=#000000
"highlight CursorColumn term=underline ctermbg=237 guibg=#000000
"highlight Cursor guifg=white guibg=black
"highlight iCursor guifg=white guibg=steelblue
"set guicursor=n-v-c:block-Cursor
"set guicursor+=i:ver100-iCursor
"set guicursor+=n-v-c:blinkon0
"set guicursor+=i:blinkwait10
" git emojis for got gutter w/ vim-emoji
"
let g:gitgutter_sign_added = emoji#for('small_blue_diamond')
let g:gitgutter_sign_modified = emoji#for('small_orange_diamond')
let g:gitgutter_sign_removed = emoji#for('small_red_triangle')
let g:gitgutter_sign_modified_removed = emoji#for('collision')
let g:typescript_compiler_binary = 'tsc'
let g:typescript_compiler_options = ''
autocmd FileType typescript :set makeprg=tsc
autocmd QuickFixCmdPost [^l]* nested cwindow
autocmd QuickFixCmdPost l* nested lwindow
" git emoji completion
"
"let g:ycm_semantic_triggers = {'text': [":"]}
"set completefunc=emoji#complete
"set omnifunc=emoji#complete
"
autocmd FileType vue syntax sync fromstart
"
"function! StylusFold()
" setl foldmethod=indent
" setl foldlevelstart=1
" setl foldnestmax=2
" setl foldminlines=5
" setl fen
"endfunction
"au FileType stylus call StylusFold()
"
" set indentkeys-={,}
" setlocal indentkeys=o,O,*<Return>,},],0),!^F
"set nosmartindent
"set cindent
"filetype plugin indent on
"set cinkeys-=0#
"set indentkeys-=0#
"autocmd FileType * set cindent "some file types override it
let g:username = "kevin olson"
let g:email = "[email protected]"
let g:license = "APACHE"
" autocmd FileType php setlocal omnifunc=phpcomplete_extended#CompletePHP
let g:phpcomplete_index_composer_command = "composer"
" illumuniate customization
hi illuminatedWord cterm=underline gui=underline
" turnon rainbow braces
let g:rainbow_active = 1 "0 if you want to enable it later via :RainbowToggle
let $FZF_DEFAULT_COMMAND = 'ag -g ""'
" This is the default extra key bindings
let g:fzf_action = {
\ 'ctrl-t': 'tab split',
\ 'ctrl-p': 'split',
\ 'ctrl-v': 'vsplit' }
noremap <C-p> :Files<Cr>
noremap <C-o> :Ag<Cr>
nnoremap <silent> <c-s> :NV<CR>
let g:ale_completion_enabled = 1
let g:airline#extensions#ale#enabled = 1
let g:ale_linters = {'javascript': ['eslint', 'standard']}
" autocmd FileType vue setlocal indentkeys=o,O
" colorscheme options
" " alduin
"
colorscheme onedark
" JSDOC
let g:jsdoc_allow_input_prompt = 1
let g:jsdoc_input_description = 1
let g:jsdoc_enable_es6 = 1
command! -register JsDoc call jsdoc#insert()
nmap <silent> <C-l> <Plug>(jsdoc)
let g:nv_search_paths = ['./']
let g:nv_use_short_pathnames = 1
let g:nv_ignore_pattern = ['vendor/**', 'node_modules/**', 'dist/**']
autocmd BufRead,BufNewFile *.vue setlocal filetype=vue