@@ -20,7 +20,7 @@ Plugin 'itchyny/lightline.vim'
2020" git integration
2121Plugin ' tpope/vim-fugitive'
2222" syntax check
23- Plugin ' vim-syntastic/syntastic '
23+ Plugin ' dense-analysis/ale '
2424" auto generates surround pairs
2525Plugin ' jiangmiao/auto-pairs'
2626
@@ -51,10 +51,7 @@ set shiftwidth=4 " shift lines by 4 spaces for indent
5151set showmatch " show the matching part of the pair for [] {} & ()
5252set softtabstop = 4 " for easier backspacing the soft tabs
5353set tabstop = 4 " set tabs to have 4 spaces
54- set tws = 20 x0 " set terminal windows size
55-
56- highlight cursorcolumn cterm= NONE ctermbg= darkgrey ctermfg= white
57- \ guibg= darkgrey guifg= white
54+ set tws = 15 x0 " set terminal windows size
5855
5956" split layout
6057set splitbelow
@@ -72,13 +69,25 @@ set foldlevel=99
7269" enable folding with spacebar
7370nnoremap <space> za
7471
72+ " highlight unneccessary whitespaces
73+ highlight BadWhitespace ctermbg= yellow guibg= yellow
74+ au BufRead ,BufNewFile *.py,*.pyw,*.c,*.h match
75+ \ BadWhitespace /\s\+$/
76+
77+ " hide colorcolumn in non-editor windows
78+ au FileType fugitive,help,qf setlocal nonumber colorcolumn =
79+ au BufEnter * if &ft == ' ' | setlocal nonumber colorcolumn = | endif
80+
81+ " enable all Python syntax highlighting features
82+ let python_highlight_all= 1
83+
7584" plugin settings - NERDTree
7685map <C-\> :NERDTreeToggle<CR>
7786" open NERDTree automatically when vim starts up with no file specified
7887autocmd StdinReadPre * let s: std_in= 1
7988autocmd VimEnter * if argc () == 0 && ! exists (" s:std_in" ) | NERDTree | endif
8089" close vim if the only window left open is NERDTree
81- autocmd bufenter * if (winnr (" $" ) == 1 && exists (" b:NERDTree" )
90+ autocmd BufEnter * if (winnr (" $" ) == 1 && exists (" b:NERDTree" )
8291 \ && b: NERDTree .isTabTree ()) | q | endif
8392let NERDTreeShowHidden= 1 " show hidden file by default
8493let NERDTreeIgnore= [' .git$[[dir]]' , ' .swp' , ' .DS_Store' ]
@@ -103,22 +112,8 @@ endif
103112let g: ycm_semantic_triggers= { ' python' : [ ' re!\w{1}' ] }
104113let g: ycm_autoclose_preview_window_after_completion= 1
105114
106- " plugin settings - syntasatic
107- set statusline += % #warningmsg #
108- set statusline += % {SyntasticStatuslineFlag ()}
109- set statusline += %*
110-
111- let g: syntastic_always_populate_loc_list= 1
112- let g: syntastic_auto_loc_list= 1
113- let g: syntastic_check_on_open= 1
114- let g: syntastic_check_on_wq= 0
115- let g: syntastic_python_checkers= [' pylint' ]
116-
117- " enable all Python syntax highlighting features
118- let python_highlight_all= 1
119-
120- " highlight unneccessary whitespaces
121- highlight BadWhitespace ctermbg= yellow guibg= yellow
122- au BufRead ,BufNewFile *.py,*.pyw,*.c,*.h match
123- \ BadWhitespace /\s\+$/
124-
115+ " plugin settings - ale
116+ let g: ale_linters= { ' python' : [' pylint' ] }
117+ let g: ale_fixers= { ' python' : [' yapf' ] }
118+ let g: ale_open_list= 1
119+ let g: ale_linters_explicit= 1
0 commit comments