-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.vim
221 lines (174 loc) · 4.94 KB
/
init.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
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Initialize Vundle
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set nocompatible
filetype off
" set the runtime path to include Vundle and initialize
set rtp+=~/.config/nvim/bundle/Vundle.vim
call vundle#begin('~/.config/nvim/bundle')
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Setup Plugins
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Plugin 'VundleVim/Vundle.vim'
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" plugin list
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" python
Plugin 'nvie/vim-flake8'
Plugin 'hynek/vim-python-pep8-indent'
Plugin 'dowan/vim-pydocstring'
Plugin 'tell-k/vim-autopep8'
Plugin 'ambv/black'
" js
Plugin 'posva/vim-vue'
Plugin 'pangloss/vim-javascript'
Plugin 'mxw/vim-jsx'
"elixir
""Plugin 'elixir-editors/vim-elixir'
Plugin 'slashmili/alchemist.vim'
Plugin 'elixir-editors/vim-elixir'
""Plugin 'elixir-lang/vim-elixir'
""Plugin 'thinca/vim-ref'
""Plugin 'awetzel/elixir.nvim'
"elm
Plugin 'ElmCast/elm-vim'
"purescript
Plugin 'raichoo/purescript-vim'
" go
Plugin 'fatih/vim-go'
" rust
Plugin 'rust-lang/rust.vim'
" integration
""Plugin 'christoomey/vim-tmux-navigator'
Plugin 'airblade/vim-gitgutter'
Plugin 'kien/rainbow_parentheses.vim'
""Plugin 'w0rp/ale'
" interface
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'metakirby5/codi.vim'
Plugin 'terryma/vim-multiple-cursors'
Plugin 'scrooloose/nerdtree'
Plugin 'majutsushi/tagbar'
Plugin 'ntpeters/vim-better-whitespace'
""Plugin 'Yggdroot/LeaderF'
Plugin 'chriskempson/base16-vim'
Plugin 'zirrostig/vim-schlepp'
Plugin 'morhetz/gruvbox'
Plugin 'gorodinskiy/vim-coloresque'
" completion
Plugin 'valloric/youcompleteme'
Plugin 'tpope/vim-surround'
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Finalize Vundle
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
call vundle#end()
filetype plugin indent on
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Configuration
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Line Numbering
set number
" Textwidth
set tw=120
" Don't wrap text
set nowrap
" Use <F11> to toggle between 'paste' and 'nopaste'
set pastetoggle=<F11>
"""""""""""""""""""""""""""""""""""""""""
" Coloring Config
"""""""""""""""""""""""""""""""""""""""""
" Turn on syntax coloring
syntax on
set background=dark
" Use this colorscheme
"colorscheme vitamins
"colorscheme darcula
"colorscheme molokai
"colorscheme inkpot
"colorscheme ThemerVim
colorscheme gruvbox
" Better command-line completion
set wildmenu
" Show partial commands in the last line of the screen
set showcmd
"""""""""""""""""""""""""""""""""""""""""
" Smart tabbing and cases
"""""""""""""""""""""""""""""""""""""""""
set smartindent
set autoindent
set smartcase " capital letters = case sensitive
set tabstop=4
set shiftwidth=4
set mouse=a
set encoding=utf-8
set expandtab
autocmd FileType vue set tabstop=2|set shiftwidth=2|set expandtab
autocmd FileType js set tabstop=2|set shiftwidth=2|set expandtab
"""""""""""""""""""""""""""""""""""""""""
" plugin conf
"""""""""""""""""""""""""""""""""""""""""
" vim airline
"
" w0rp/ale
let g:ale_set_loclist = 0
let g:ale_set_quickfix = 1
let g:ale_open_list = 1
let g:ale_keep_list_window_open = 1
"flake 8
let g:flake8_show_in_gutter=1
map <F7> :PyFlake
"rainbow parenthese
au VimEnter * RainbowParenthesesToggle
au Syntax * RainbowParenthesesLoadRound
au Syntax * RainbowParenthesesLoadSquare
au Syntax * RainbowParenthesesLoadBraces
let g:rbpt_max = 16
let g:rbpt_loadcmd_toggle = 0
"tagbar
nmap <F3> :TagbarToggle<CR>
" nerd tree
map <F2> :NERDTreeToggle<CR>
" pydocstring
map <slient> <F4> <Plug>(pydocstring)
" you complete me
let g:ycm_autoclose_preview_window_after_completion = 1
let g:ycm_python_binary_path = 'python'
" LeaderF
let g:Lf_ShortcutF = '<C-p>'
" vim-schlepp
vmap <C-C> <nop>
vmap <M-C> <nop>
xmap <unique> <C-M-C> <Plug>SchleppUp
xmap <unique> <C-M-T> <Plug>SchleppDown
xmap <unique> <C-M-H> <Plug>SchleppLeft
xmap <unique> <C-M-N> <Plug>SchleppRight
"close parenthese etc
inoremap { {}<Left>
inoremap ( ()<Left>
inoremap ' ''<Left>
inoremap [ []<Left>
inoremap " ""<Left>
inoremap ` ``<Left>
inoremap < <><Left>
set whichwrap=<,>
set colorcolumn=80
command WW w | :%s/\s\+$//e | :call Autopep8() | :call Flake8()
if has("autocmd")
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
\| exe "normal! g'\"" | endif
endif
" change clipboard
set clipboard=unnamedplus
" navigate in splits
nnoremap <M-t> <C-W><C-J>
nnoremap <M-c> <C-W><C-K>
nnoremap <M-n> <C-W><C-L>
nnoremap <M-h> <C-W><C-H>
let g:airline_powerline_fonts=1
tnoremap <Esc> <C-\><C-n>
" multicursor
let g:multi_cursor_select_all_word_key = '<A-r>'
"black
let g:black_linelength = 79
autocmd BufWritePre *.py execute ':Black'