2021-01-21 22:14:18 +01:00
|
|
|
set number
|
|
|
|
set colorcolumn=80
|
|
|
|
set background=dark
|
2021-01-22 22:33:56 +01:00
|
|
|
set cursorline
|
2021-01-21 22:14:18 +01:00
|
|
|
syntax on
|
|
|
|
|
|
|
|
" python
|
2021-12-10 17:56:46 +01:00
|
|
|
au BufNewFile,BufRead *.py,*.go set tabstop=4 softtabstop=4 shiftwidth=4
|
|
|
|
\ expandtab autoindent fileformat=unix
|
|
|
|
au BufNewFile,BufRead *.yaml,*.tf set tabstop=2 softtabstop=2 shiftwidth=2
|
|
|
|
\ expandtab autoindent fileformat=unix
|
|
|
|
au BufNewFile,BufRead *.html,*.css set tabstop=2 softtabstop=2 shiftwidth=2
|
2021-08-26 14:08:11 +02:00
|
|
|
\ expandtab autoindent colorcolumn=0
|
2021-01-21 22:14:18 +01:00
|
|
|
au BufNewFile,BufRead *.launch set filetype=xml
|
|
|
|
|
|
|
|
" vim-plug
|
|
|
|
" :PlugInstall to install new one
|
|
|
|
call plug#begin('~/.vim/plugged')
|
|
|
|
Plug 'dense-analysis/ale'
|
|
|
|
Plug 'Valloric/YouCompleteMe'
|
|
|
|
" enhanced search
|
|
|
|
Plug 'junegunn/vim-slash'
|
|
|
|
Plug 'preservim/nerdtree'
|
|
|
|
Plug 'vim-airline/vim-airline'
|
|
|
|
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
|
|
|
|
Plug 'junegunn/fzf.vim'
|
|
|
|
Plug 'luochen1990/rainbow'
|
2021-08-27 00:21:13 +02:00
|
|
|
Plug 'psf/black'
|
2021-12-10 17:56:46 +01:00
|
|
|
Plug 'jvirtanen/vim-hcl' " HCL files used by terraform
|
2021-08-28 00:47:43 +02:00
|
|
|
" show git diff in sign column
|
|
|
|
Plug 'airblade/vim-gitgutter'
|
2021-01-21 22:14:18 +01:00
|
|
|
" Themes
|
2021-08-27 01:26:50 +02:00
|
|
|
Plug 'sainnhe/sonokai'
|
2021-01-21 22:14:18 +01:00
|
|
|
" Language specific
|
2021-08-27 02:26:32 +02:00
|
|
|
Plug 'vim-python/python-syntax'
|
2021-01-21 22:14:18 +01:00
|
|
|
call plug#end()
|
2021-08-27 01:26:50 +02:00
|
|
|
|
|
|
|
" Theme
|
|
|
|
if has('termguicolors')
|
|
|
|
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
|
|
|
|
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
|
|
|
|
set termguicolors
|
|
|
|
endif
|
2021-08-31 15:59:59 +02:00
|
|
|
let g:sonokai_style = 'atlantis'
|
2021-08-27 01:26:50 +02:00
|
|
|
let g:sonokai_disable_italic_comment = 1
|
|
|
|
colorscheme sonokai
|
|
|
|
let g:airline_theme = 'sonokai'
|
2021-01-21 22:14:18 +01:00
|
|
|
|
|
|
|
" Ale
|
2021-12-22 14:29:50 +01:00
|
|
|
let g:ale_linters = {'python': ['pylint', 'mypy'],}
|
|
|
|
let g:ale_fixers = {'python': ['black', 'isort']}
|
2021-12-17 18:14:07 +01:00
|
|
|
let g:ale_python_pylint_options = '--disable=C0111'
|
2021-12-22 14:29:50 +01:00
|
|
|
let g:ale_python_mypy_options = '--ignore-missing-imports --disallow-untyped-defs --disallow-incomplete-defs'
|
2021-08-27 00:21:13 +02:00
|
|
|
|
2021-08-27 01:26:50 +02:00
|
|
|
" Black
|
2021-08-27 00:21:13 +02:00
|
|
|
let g:black_linelength = 80
|
2021-01-21 22:14:18 +01:00
|
|
|
|
2021-08-27 01:26:50 +02:00
|
|
|
" ycm
|
|
|
|
let g:ycm_autoclose_preview_window_after_insertion = 1
|
|
|
|
let g:ycm_autoclose_preview_window_after_completion = 1
|
|
|
|
|
2021-01-21 22:14:18 +01:00
|
|
|
" NERDTREE
|
|
|
|
" open nerdtree when no file is specified on startup
|
|
|
|
autocmd StdinReadPre * let s:std_in=1
|
|
|
|
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
|
|
|
|
" toggle nerdtree keyboard shortcut
|
|
|
|
map <C-t> :NERDTreeToggle<CR>
|
2021-08-27 00:21:13 +02:00
|
|
|
nnoremap <F9> :Black<CR>
|
2021-01-21 22:14:18 +01:00
|
|
|
|
|
|
|
" RAINBOW_PARENTHESES
|
|
|
|
au FileType c,cpp,py call rainbow#load()
|
|
|
|
|
|
|
|
" python syntax
|
|
|
|
let g:python_highlight_all = 1
|
|
|
|
let g:python_highlight_func_calls = 0
|
|
|
|
|
|
|
|
" enable rainbow brackets
|
|
|
|
let g:rainbow_active = 1
|