58 lines
1.5 KiB
VimL

set number
set colorcolumn=80
set background=dark
set cursorline
syntax on
colorscheme monokai
" python
au BufNewFile,BufRead *.py,*.go set tabstop=4 softtabstop=4 shiftwidth=4
\ textwidth=79 expandtab autoindent fileformat=unix
au BufNewFile,BufRead *.yaml set tabstop=2 softtabstop=2 shiftwidth=2
\ textwidth=79 expandtab autoindent fileformat=unix
au BufNewFile,BufRead *.html,*.css set tabstop=2 softtabstop=2 shiftwidth=2
\ expandtab autoindent colorcolumn=0
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'
" Themes
Plug 'crusoexia/vim-monokai'
" Language specific
Plug 'vim-python/python-syntax'
call plug#end()
" Preconditions for plugins
" ale: apt install pylint flake8
" Ale
let g:ale_linters = {
\ 'python': ['flake8', 'pylint'],
\}
" 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>
" 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