-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
208 lines (179 loc) · 5.69 KB
/
vimrc
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
" ===============
" Vundle part
" ===============
set nocompatible " be iMproved, required
filetype off " required
" 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'
Plugin 'easymotion/vim-easymotion'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'flazz/vim-colorschemes'
Plugin 'liuchengxu/space-vim-theme'
Plugin 'cormacrelf/vim-colors-github'
Plugin 'lervag/vimtex'
Plugin 'w0rp/ale'
Plugin 'sirver/ultisnips'
Plugin 'honza/vim-snippets'
Plugin 'scrooloose/nerdcommenter'
Plugin 'scrooloose/nerdtree'
Plugin 'edkolev/tmuxline.vim'
Plugin 'shougo/deoplete.nvim'
Plugin 'shougo/deoplete-clangx'
Plugin 'zchee/deoplete-jedi'
Plugin 'klen/python-mode'
Plugin 'fatih/vim-go'
Plugin 'suan/vim-instant-markdown', {'rtp': 'after'}
Plugin 'tpope/vim-fugitive'
Plugin 'christoomey/vim-tmux-navigator'
Plugin 'junegunn/fzf.vim'
Plugin 'tpope/vim-surround'
Plugin 'tpope/vim-repeat'
Plugin 'godlygeek/tabular'
Plugin 'plasticboy/vim-markdown'
Plugin 'majutsushi/tagbar'
Plugin 'tek256/simple-dark'
Plugin 'jceb/vim-orgmode'
Plugin 'AjxLab/laserwave.vim'
" 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
"put your none plugin stuff after this line
" ==========
" basics
" ==========
" coloring
set termguicolors
" <leader> for certain plugins like EasyMotion
let mapleader = ","
let maplocalleader = ","
" syntax highlighting
syntax enable
" numbering / relative numbering for fast movement
set nu
set relativenumber
" indentation
set autoindent
" fuzzy searching
set ignorecase
set smartcase
" 'Q' in normal mode enters Ex mode. You almost never want this.
nmap Q <Nop>
" access system clipboard (through pbcopy/pbpaste)
noremap <Leader>y "*y
noremap <Leader>p "*p
noremap <Leader>Y "+p
noremap <Leader>P "+p
" ===================
" various plugins
" ===================
" colorscheme / statusline
"colorscheme simple-dark
"colorscheme arcadia
"colorscheme quantum
"colorscheme molokai
"colorscheme wombat
colorscheme Tomorrow-Night
"let g:airline_theme='hybrid'
"let g:airline_theme='powerlineish'
"let g:airline_theme='hybrid'
"let g:airline_theme='base16_grayscale'
"let g:airline_theme='molokai'
"let g:airline_theme='wombat'
let g:airline_theme='tomorrow'
"let g:airline_theme='base16_grayscale'
"let g:airline_powerline_fonts = 1
let g:airline_powerline_fonts = 0
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#ale#enabled = 1
let g:tmuxline_powerline_separators = 0
" so you don't have to reach for <Esc>
inoremap <C-[> <Esc>
" NerdTree
map <C-n> :NERDTreeToggle<CR>
" vimtex
let g:vimtex_latexmk_options='-pdf -pdflatex="xelatex -synctex=1 \%S \%O" -verbose -file-line-error -interaction=nonstopmode'
let g:tex_flavor='latex'
let g:vimtex_view_method='skim'
"let g:vimtex_view_method='zathura'
let g:vimtex_quickfix_mode=0
set conceallevel=1
let g:tex_conceal="abdgm"
let g:vimtex_complete_enabled=1
let g:vimtex_compiler_progname='nvr'
"" UltiSnips
let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsJumpForwardTrigger="<tab>"
let g:UltiSnipsJumpBackwardTrigger="<s-tab>"
let g:ultisnips_python_style='google' " docstring style
"" deoplete
let g:deoplete#enable_at_startup = 1
call deoplete#custom#var('omni', 'input_patterns', {
\ 'tex': g:vimtex#re#deoplete
\})
call deoplete#custom#option('max_list', 15)
let g:pymode_lint=0
let g:pymode_run=1
call deoplete#custom#option('omni_patterns', { 'go': '[^. *\t]\.\w*' })
" ale
let g:ale_linters = {
\ 'go': ['gopls'],
\ 'python': ['flake8'],
\}
" flake8 config
let g:syntastic_python_flake8_config_file='.flake8'
" jump between errors
nmap <silent> <Leader>k <Plug>(ale_previous_wrap)
nmap <silent> <Leader>j <Plug>(ale_next_wrap)
" I suppose the completion plugins are pretty much connected
" so some of them might get mixed
" instant markdown
filetype plugin on
let g:instant_markdown_allow_unsafe_content = 1
let g:instant_markdown_mathjax = 1
let g:instant_markdown_autostart = 0
" vim-markdown
"let g:vim_markdown_folding_level = 2
let g:vim_markdown_folding_disabled = 1
au BufNewFile,BufRead *.md set conceallevel=2
let g:tex_conceal = ""
let g:vim_markdown_math = 1
" this shuts the popup showing function hints after completion
" the popup actually useful when writing C (when things get long)
"autocmd InsertLeave,CompleteDone * if pumvisible() == 0 | pclose | endif
" python pep-8
au BufNewFile,BufRead *.py set tabstop=4
au BufNewFile,BufRead *.py set softtabstop=4
au BufNewFile,BufRead *.py set shiftwidth=4
au BufNewFile,BufRead *.py set textwidth=79
au BufNewFile,BufRead *.py set expandtab
au BufNewFile,BufRead *.py set autoindent
au BufNewFile,BufRead *.py set smartindent
au BufNewFile,BufRead *.py set fileformat=unix
" c/c++ settings
au BufNewFile,BufRead *.c,*.cpp set tabstop=4
au BufNewFile,BufRead *.c,*.cpp set softtabstop=4
au BufNewFile,BufRead *.c,*.cpp set shiftwidth=4
au BufNewFile,BufRead *.c,*.cpp set expandtab
au BufNewFile,BufRead *.c,*.cpp set autoindent
au BufNewFile,BufRead *.c,*.cpp set smartindent
au BufNewFile,BufRead *.c,*.cpp set fileformat=unix
" vim-tmux-navigator
" Disable tmux navigator when zooming the Vim pane
let g:tmux_navigator_disable_when_zoomed = 1
" fzf plugin
set rtp+=/usr/local/opt/fzf
" file search
nnoremap <silent> <C-f> :Files<CR>
" in-file search
nnoremap <silent> <Leader>f :Rg<CR>
" tagbar binding
" if tagbar's not working, do brew install ctags-exuberant
nmap <C-t> :TagbarToggle<CR>