-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.vimrc.after
executable file
·184 lines (154 loc) · 4.36 KB
/
.vimrc.after
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
" if (has("nvim"))
" let $NVIM_TUI_ENABLE_TRUE_COLOR=1
" endif
" if (has("termguicolors"))
" set termguicolors
" endif
set background=dark
let g:onedark_terminal_italics=1
syntax on
colorscheme onedark
" let g:oceanic_next_terminal_bold = 1
" let g:oceanic_next_terminal_italic = 1
" colorscheme OceanicNext
" let g:airline_theme = 'oceanicnext'
" Highlight the cursor's current line
set cursorline
" <Ctrl-l> redraws the screen and removes any search highlighting.
nnoremap <silent> <C-l> :nohl<CR><C-l>
highlight BadWhitespace ctermbg=red guibg=red
" Highlight the 80, and 119+ column for python
let colorcolumn=120
set spelllang=en_us
set spellfile=$DOTFILES/vim/dictionary.en.utf-8.add
set relativenumber
set number
" Highlight codetags
augroup codetags
autocmd!
autocmd Syntax * call matchadd('Todo', '\W\zs\(TODO\|FIXME\|XXX\|???\|!!!\|BUG\|HACK\|NOTE\|INFO\|IDEA\):')
augroup END
" Python stuff
augroup python
autocmd!
autocmd FileType python let &l:colorcolumn="80,".join(range(120,999),",")
autocmd FileType python setlocal omnifunc=pythoncomplete#Complete
autocmd FileType python setlocal sts=4 sw=4 ts=4 tw=79
autocmd BufWritePre *.py normal m`:%s/\s\+$//e``
autocmd BufRead,BufNewFile *.py match BadWhitespace /^\t\+/
autocmd BufRead,BufNewFile *.py match BadWhitespace /\s\+$/
highlight BadWhitespace ctermbg=red guibg=red
augroup END
let g:syntastic_python_checkers = ['flake8']
let g:syntastic_python_flake8_args = '--ignore=E403,E128,F403'
let g:ale_python_flake8_args = '--ignore=E403,E128,F403'
augroup gitcommit
autocmd!
autocmd FileType gitcommit setlocal colorcolumn=73
augroup END
augroup text_settings
autocmd!
autocmd BufNewFile,BufRead *.md,*.txt,*.scratch setlocal spell wrap
augroup END
augroup docker_settings
autocmd!
autocmd BufNewFile,BufRead .dockerignore setlocal filetype=conf
augroup END
augroup crontab_settings
autocmd!
autocmd FileType crontab setlocal backupcopy=yes
augroup END
set wildignore+=*.pyc,*.zip,*.gz,*.tar
set wildignore+=*.jpg,*.jpeg,*.gif,*.png,*.ico,*.psd,*.swf
set wildignore+=*.pdf,*.doc,*.docx
set wildignore+=.gitkeep
" Change the indent defaults
set shiftwidth=2
set tabstop=2
set softtabstop=2
" Command tabbing
set wildmode=longest,list,full
set wildmenu
" Syntax
au BufNewFile,BufRead *.scss setlocal filetype=scss
au BufNewFile,BufRead *.html setlocal filetype=htmldjango
au BufNewFile,BufRead /etc/nginx/*,*/nginx/*.conf setlocal filetype=nginx
au BufnewFile,BufRead xorg.conf* setlocal filetype=xf86conf
" Omnicomplete
" au FileType python set omnifunc=pythoncomplete#Complete
au FileType javascript set omnifunc=javascriptcomplete#CompleteJS
au FileType html set omnifunc=htmlcomplete#CompleteTags
au FileType css set omnifunc=csscomplete#CompleteCSS
" Indent Guides
let g:indent_guides_start_level = 2
let g:indent_guides_guide_size = 2
let g:indent_guides_enable_on_vim_startup = 1
" Use silver-searcher (ag) instead of ack-grep
let g:ackprg = 'ag --nogroup --nocolor --column'
" Don't hide quotes in JSON
let g:vim_json_syntax_conceal = 0
" Startify options
let g:startify_change_to_dir = 1
let g:startify_bookmarks = [
\ '~/Workspace/howgood/research',
\ '~/Workspace/howgood',
\ '~/Workspace'
\ ]
" Gutentags
let g:gutentags_enabled = 1
let g:gutentags_cache_dir = expand("~/.vim/_temp/tags")
let g:gutentags_file_list_command = {
\ 'markers': {
\ '.git': 'git ls-files',
\ },
\ }
let g:gutentags_ctags_exclude = [
\ '.tmp',
\ '.git',
\ '.svn',
\ '.hg',
\ 'bundle',
\ 'min',
\ 'vendor',
\ '\*.min.\*',
\ '\*.map',
\ '\*.swp',
\ '\*.bak',
\ '\*.pyc',
\ '\*.class',
\ '\*.sln',
\ '\*.Master',
\ '\*.csproj',
\ '\*.csproj.user',
\ '\*.cache',
\ '\*.dll',
\ '\*.pdb',
\ 'tags',
\ 'cscope.\*',
\ '\*.tar.\*'
\ ]
" JSX
let g:jsx_ext_required = 0
" Gist.vim
let g:gist_clip_command = 'pbcopy'
let g:gist_detect_filetype = 1
let g:gist_post_private = 1
" ale
let g:ale_sign_error = '⨉'
let g:ale_sign_warning = '⚠'
let g:ale_echo_msg_format = '%linter% ❯ %s'
let g:ale_linters = {
\ 'javascript': ['eslint', 'jshint', 'flow'],
\ 'json': ['jsonlint'],
\ 'python': ['flake8'],
\ 'sh': ['shellcheck']
\ }
let g:ale_python_flake8_executable = 'python3'
let g:ale_python_flake8_args = '-m flake8'
" Rainbow Parentheses – github.com/junegunn/rainbow_parentheses.vim
RainbowParentheses
let g:rainbow#pairs = [
\ ['(', ')'],
\ ['[', ']'],
\ ['{', '}']
\ ]