diff options
-rw-r--r-- | vimrc-full | 140 |
1 files changed, 70 insertions, 70 deletions
@@ -167,44 +167,32 @@ set laststatus=2 | " required by AirLine, | |||
167 | set background=light | | 167 | set background=light | |
168 | 168 | ||
169 | Plug 'itchyny/lightline.vim' | 169 | Plug 'itchyny/lightline.vim' |
170 | " let g:lightline = { | 170 | Plug 'daviesjamie/vim-base16-lightline' |
171 | " \ 'separator': { 'left': "\ue0b0", 'right': "\ue0b2" }, | ||
172 | " \ 'subseparator': { 'left': "\ue0b1", 'right': "\ue0b3" }, | ||
173 | " \ 'tabline': { | ||
174 | " \ 'left': [ ['tabs'] ], | ||
175 | " \ 'right': [ [ 'close' ] ] | ||
176 | " \ } | ||
177 | " \ } | ||
178 | Plug 'taohex/lightline-buffer' | 171 | Plug 'taohex/lightline-buffer' |
179 | " use lightline-buffer in lightline | 172 | |
180 | let g:lightline = { | 173 | " lightline-buffer ui settings |
181 | \ 'colorscheme': 'PaperColor_light', | 174 | " replace these symbols with ascii characters if your environment does not support unicode |
182 | \ 'active': { | 175 | let g:lightline_buffer_logo = ' ' |
183 | \ 'left': [ [ 'mode', 'paste' ], | 176 | let g:lightline_buffer_readonly_icon = '' |
184 | \ [ 'gitbranch', 'readonly' ] ], | 177 | let g:lightline_buffer_modified_icon = '✭' |
185 | \ 'right': [ [ 'lineinfo' ], | 178 | let g:lightline_buffer_git_icon = ' ' |
186 | \ [ 'percent' ], | 179 | let g:lightline_buffer_ellipsis_icon = '..' |
187 | \ [ 'fileformat', 'fileencoding', 'filetype', 'charvaluehex' ] ], | 180 | let g:lightline_buffer_expand_left_icon = '◀ ' |
188 | \ }, | 181 | let g:lightline_buffer_expand_right_icon = ' ▶' |
189 | \ 'tabline': { | 182 | let g:lightline_buffer_active_buffer_left_icon = '' |
190 | \ 'left': [ [ 'bufferinfo' ], [ 'bufferbefore', 'buffercurrent', 'bufferafter' ], ], | 183 | let g:lightline_buffer_active_buffer_right_icon = '' |
191 | \ 'right': [ [ 'close' ], ], | 184 | let g:lightline_buffer_separator_icon = ' ' |
192 | \ }, | 185 | |
193 | \ 'component_expand': { | 186 | " lightline-buffer function settings |
194 | \ 'buffercurrent': 'lightline#buffer#buffercurrent2', | 187 | let g:lightline_buffer_show_bufnr = 1 |
195 | \ }, | 188 | let g:lightline_buffer_rotate = 0 |
196 | \ 'component_type': { | 189 | let g:lightline_buffer_fname_mod = ':t' |
197 | \ 'buffercurrent': 'tabsel', | 190 | let g:lightline_buffer_excludes = ['vimfiler'] |
198 | \ }, | 191 | let g:lightline_buffer_maxflen = 30 |
199 | \ 'component_function': { | 192 | let g:lightline_buffer_maxfextlen = 3 |
200 | \ 'bufferbefore': 'lightline#buffer#bufferbefore', | 193 | let g:lightline_buffer_minflen = 16 |
201 | \ 'bufferafter': 'lightline#buffer#bufferafter', | 194 | let g:lightline_buffer_minfextlen = 3 |
202 | \ 'bufferinfo': 'lightline#buffer#bufferinfo', | 195 | let g:lightline_buffer_reservelen = 20 |
203 | \ 'filetype': 'MyFiletype', | ||
204 | \ 'fileformat': 'MyFileformat', | ||
205 | \ 'gitbranch': 'fugitive#head', | ||
206 | \ }, | ||
207 | \ } | ||
208 | 196 | ||
209 | function! MyFiletype() | 197 | function! MyFiletype() |
210 | return winwidth(0) > 70 ? (strlen(&filetype) ? &filetype . ' ' . WebDevIconsGetFileTypeSymbol() : 'no ft') : '' | 198 | return winwidth(0) > 70 ? (strlen(&filetype) ? &filetype . ' ' . WebDevIconsGetFileTypeSymbol() : 'no ft') : '' |
@@ -214,33 +202,45 @@ function! MyFileformat() | |||
214 | return winwidth(0) > 70 ? (&fileformat . ' ' . WebDevIconsGetFileFormatSymbol()) : '' | 202 | return winwidth(0) > 70 ? (&fileformat . ' ' . WebDevIconsGetFileFormatSymbol()) : '' |
215 | endfunction | 203 | endfunction |
216 | 204 | ||
205 | function! MyBranchname() | ||
206 | return winwidth(0) > 70 ? fugitive#statusline() : '' | ||
207 | endfunction | ||
208 | |||
209 | let g:lightline = { | ||
210 | \ 'colorscheme': 'wombat', | ||
211 | \ 'separator': { 'left': "\ue0b0", 'right': "\ue0b2" }, | ||
212 | \ 'subseparator': { 'left': "\ue0b1", 'right': "\ue0b3" }, | ||
213 | \ 'active': { | ||
214 | \ 'left': [ [ 'mode', 'paste' ], | ||
215 | \ [ 'gitbranch', 'readonly' ] ], | ||
216 | \ 'right': [ [ 'lineinfo' ], | ||
217 | \ [ 'percent' ], | ||
218 | \ [ 'fileformat', 'fileencoding', 'filetype', 'charvaluehex' ] ], | ||
219 | \ }, | ||
220 | \ 'tabline': { | ||
221 | \ 'left': [ [ 'bufferinfo' ], [ 'bufferbefore', 'buffercurrent', 'bufferafter' ], ], | ||
222 | \ 'right': [ [ 'close' ], ], | ||
223 | \ }, | ||
224 | \ 'component_expand': { | ||
225 | \ 'buffercurrent': 'lightline#buffer#buffercurrent2', | ||
226 | \ }, | ||
227 | \ 'component_type': { | ||
228 | \ 'buffercurrent': 'tabsel', | ||
229 | \ }, | ||
230 | \ 'component_function': { | ||
231 | \ 'bufferbefore': 'lightline#buffer#bufferbefore', | ||
232 | \ 'bufferafter': 'lightline#buffer#bufferafter', | ||
233 | \ 'bufferinfo': 'lightline#buffer#bufferinfo', | ||
234 | \ 'filetype': 'MyFiletype', | ||
235 | \ 'fileformat': 'MyFileformat', | ||
236 | \ 'gitbranch': 'MyBranchname', | ||
237 | \ }, | ||
238 | \ } | ||
217 | 239 | ||
218 | 240 | ||
219 | 241 | ||
220 | " lightline-buffer ui settings | ||
221 | " replace these symbols with ascii characters if your environment does not support unicode | ||
222 | let g:lightline_buffer_logo = ' ' | ||
223 | let g:lightline_buffer_readonly_icon = '' | ||
224 | let g:lightline_buffer_modified_icon = '✭' | ||
225 | let g:lightline_buffer_git_icon = ' ' | ||
226 | let g:lightline_buffer_ellipsis_icon = '..' | ||
227 | let g:lightline_buffer_expand_left_icon = '◀ ' | ||
228 | let g:lightline_buffer_expand_right_icon = ' ▶' | ||
229 | let g:lightline_buffer_active_buffer_left_icon = '' | ||
230 | let g:lightline_buffer_active_buffer_right_icon = '' | ||
231 | let g:lightline_buffer_separator_icon = ' ' | ||
232 | 242 | ||
233 | " lightline-buffer function settings | ||
234 | let g:lightline_buffer_show_bufnr = 1 | ||
235 | let g:lightline_buffer_rotate = 0 | ||
236 | let g:lightline_buffer_fname_mod = ':t' | ||
237 | let g:lightline_buffer_excludes = ['vimfiler'] | ||
238 | 243 | ||
239 | let g:lightline_buffer_maxflen = 30 | ||
240 | let g:lightline_buffer_maxfextlen = 3 | ||
241 | let g:lightline_buffer_minflen = 16 | ||
242 | let g:lightline_buffer_minfextlen = 3 | ||
243 | let g:lightline_buffer_reservelen = 20 | ||
244 | 244 | ||
245 | 245 | ||
246 | 246 | ||
@@ -253,7 +253,7 @@ let g:lightline_buffer_reservelen = 20 | |||
253 | " let g:airline_powerline_fonts = 1 | | 253 | " let g:airline_powerline_fonts = 1 | |
254 | " let g:airline_skip_empty_sections = 1 | | 254 | " let g:airline_skip_empty_sections = 1 | |
255 | " let g:airline_extensions = [] | | 255 | " let g:airline_extensions = [] | |
256 | " | 256 | " |
257 | " let g:airline#extensions#tabline#enabled = 1 | | 257 | " let g:airline#extensions#tabline#enabled = 1 | |
258 | " let g:airline#extensions#tabline#left_alt_sep = '' | | 258 | " let g:airline#extensions#tabline#left_alt_sep = '' | |
259 | " let g:airline#extensions#tabline#left_sep = '' | | 259 | " let g:airline#extensions#tabline#left_sep = '' | |
@@ -265,19 +265,19 @@ let g:lightline_buffer_reservelen = 20 | |||
265 | " let g:airline#extensions#tabline#show_buffers = 1 | | 265 | " let g:airline#extensions#tabline#show_buffers = 1 | |
266 | " let g:airline#extensions#tabline#show_tabs = 0 | | 266 | " let g:airline#extensions#tabline#show_tabs = 0 | |
267 | " let g:airline#extensions#tabline#ignore_bufadd_pat = '\c\vgundo|undotree|vimfiler|tagbar|nerd_tree|preview|^$' | 267 | " let g:airline#extensions#tabline#ignore_bufadd_pat = '\c\vgundo|undotree|vimfiler|tagbar|nerd_tree|preview|^$' |
268 | " | 268 | " |
269 | " let g:airline_extensions#branch#enabled = 1 | | 269 | " let g:airline_extensions#branch#enabled = 1 | |
270 | " let g:airline_extensions#whitespace#enabled = 0 | " airlines whitespace check is slow :/ | 270 | " let g:airline_extensions#whitespace#enabled = 0 | " airlines whitespace check is slow :/ |
271 | " let b:airline_whitespace_checks = ['indent', 'trailing', 'long', 'mixed-indent-file'] | 271 | " let b:airline_whitespace_checks = ['indent', 'trailing', 'long', 'mixed-indent-file'] |
272 | " | 272 | " |
273 | " if has('python') | 273 | " if has('python') |
274 | " let g:airline_extensions#syntastic#enabled = 1 | | 274 | " let g:airline_extensions#syntastic#enabled = 1 | |
275 | " let g:airline_extensions#ycm#enabled = 1 | | 275 | " let g:airline_extensions#ycm#enabled = 1 | |
276 | " endif | 276 | " endif |
277 | " | 277 | " |
278 | " let g:airline#extensions#tagbar#flags = 'f' | " even though the airline extension is off this controls :h tagbar-extend | 278 | " let g:airline#extensions#tagbar#flags = 'f' | " even though the airline extension is off this controls :h tagbar-extend |
279 | " let g:airline#extensions#tagbar#enabled = 0 | | 279 | " let g:airline#extensions#tagbar#enabled = 0 | |
280 | " | 280 | " |
281 | " " AIRLINE_Theme: | 281 | " " AIRLINE_Theme: |
282 | " Plug 'vim-airline/vim-airline-themes' | " airline themes to match any light and dark terminal using :AirlineTheme | 282 | " Plug 'vim-airline/vim-airline-themes' | " airline themes to match any light and dark terminal using :AirlineTheme |
283 | " let base16colorspace=256 | | 283 | " let base16colorspace=256 | |
@@ -329,7 +329,7 @@ if has("python") | |||
329 | let g:syntastic_check_on_open = 1 | 329 | let g:syntastic_check_on_open = 1 |
330 | let g:syntastic_check_on_wq = 0 | 330 | let g:syntastic_check_on_wq = 0 |
331 | " let g:syntastic_quiet_messages = {"type":"style"} | 331 | " let g:syntastic_quiet_messages = {"type":"style"} |
332 | " | 332 | " |
333 | " E221: multiple spaces before Operator | 333 | " E221: multiple spaces before Operator |
334 | let g:syntastic_python_flake8_args = '--max-complexity=10 --max-line-length=120 --exclude venv --doctests --exit-zero --ignore=E221' | 334 | let g:syntastic_python_flake8_args = '--max-complexity=10 --max-line-length=120 --exclude venv --doctests --exit-zero --ignore=E221' |
335 | " filter ( = do not display) style/formatting errors and warnings | 335 | " filter ( = do not display) style/formatting errors and warnings |
@@ -388,7 +388,7 @@ function! ExtendColorTheme() | |||
388 | " highlight Normal ctermbg=NONE ctermfg=black | 388 | " highlight Normal ctermbg=NONE ctermfg=black |
389 | 389 | ||
390 | highlight! CursorLineNr cterm=inverse | " ctermbg=black ctermfg=NONE | 390 | highlight! CursorLineNr cterm=inverse | " ctermbg=black ctermfg=NONE |
391 | highlight! Pmenu ctermbg=LightYellow ctermfg=blue | 391 | highlight! Pmenu ctermbg=LightYellow ctermfg=blue |
392 | highlight! PmenuSel ctermbg=blue ctermfg=LightYellow cterm=bold | 392 | highlight! PmenuSel ctermbg=blue ctermfg=LightYellow cterm=bold |
393 | 393 | ||
394 | highlight! link PmenuSbar Pmenu | 394 | highlight! link PmenuSbar Pmenu |
@@ -519,7 +519,7 @@ if !has('nvim') | " settings which have been removed from neovim | |||
519 | set ttyscroll=100 | " improves speed for terminal vim, incomp. with nvim | 519 | set ttyscroll=100 | " improves speed for terminal vim, incomp. with nvim |
520 | set ttyfast | " improves speed for terminal vim (incomp. with nvim) | 520 | set ttyfast | " improves speed for terminal vim (incomp. with nvim) |
521 | " set termguicolors | " When on, uses highlight-guifg and highlight-guibg attributes in the terminal (=24bit color) incomp. with nvim | 521 | " set termguicolors | " When on, uses highlight-guifg and highlight-guibg attributes in the terminal (=24bit color) incomp. with nvim |
522 | " | 522 | " |
523 | let g:loaded_ruby_provider = 1 " disable ruby support | 523 | let g:loaded_ruby_provider = 1 " disable ruby support |
524 | let g:loaded_python_provider = 1 " disable pthon3 | 524 | let g:loaded_python_provider = 1 " disable pthon3 |
525 | endif | 525 | endif |
@@ -661,7 +661,7 @@ if has("autocmd") | |||
661 | let @q = ":cex [] | bufdo vimgrepadd /foo/g % | cw" | 661 | let @q = ":cex [] | bufdo vimgrepadd /foo/g % | cw" |
662 | 662 | ||
663 | " change to the current working directory (p like pwd) | 663 | " change to the current working directory (p like pwd) |
664 | let @p = ":lcd %:p:h" | 664 | let @p = ":lcd %:p:h" |
665 | 665 | ||
666 | let @l = ":let g:signify_vcs_cmds={'git': 'git diff --no-color --no-ext-diff -U0 HEAD^ -- %f'}|:SignifyRefresh" | 666 | let @l = ":let g:signify_vcs_cmds={'git': 'git diff --no-color --no-ext-diff -U0 HEAD^ -- %f'}|:SignifyRefresh" |
667 | 667 | ||
@@ -710,8 +710,8 @@ nnoremap <leader>r :syntax sync fromstart | |||
710 | " INSERT_MODE_MAPPINGS: | 710 | " INSERT_MODE_MAPPINGS: |
711 | " default copy&paste insert key binding (just in insert mode, so it doesn't conflict | 711 | " default copy&paste insert key binding (just in insert mode, so it doesn't conflict |
712 | " with visual block mode)- would have been nice, but collides with c-w for digraphs | 712 | " with visual block mode)- would have been nice, but collides with c-w for digraphs |
713 | " inoremap <C-V> <C-R>+ | 713 | " inoremap <C-V> <C-R>+ |
714 | " | 714 | " |
715 | inoremap <C-S> <C-O>:w<CR> | 715 | inoremap <C-S> <C-O>:w<CR> |
716 | 716 | ||
717 | " NEOVIM_SPECIFIC: | 717 | " NEOVIM_SPECIFIC: |