Skip to content

Commit a8cd220

Browse files
committed
Enhancements based on actual usage
- Replaced `syntastic` with `ale` as `syntastic` affects the performance on save load badly. - Changed `cursorcolumn` colour.
1 parent 1e1f98b commit a8cd220

File tree

1 file changed

+19
-24
lines changed

1 file changed

+19
-24
lines changed

.vimrc

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Plugin 'itchyny/lightline.vim'
2020
" git integration
2121
Plugin 'tpope/vim-fugitive'
2222
" syntax check
23-
Plugin 'vim-syntastic/syntastic'
23+
Plugin 'dense-analysis/ale'
2424
" auto generates surround pairs
2525
Plugin 'jiangmiao/auto-pairs'
2626

@@ -53,9 +53,6 @@ set softtabstop=4 " for easier backspacing the soft tabs
5353
set tabstop=4 " set tabs to have 4 spaces
5454
set tws=20x0 " set terminal windows size
5555

56-
highlight cursorcolumn cterm=NONE ctermbg=darkgrey ctermfg=white
57-
\ guibg=darkgrey guifg=white
58-
5956
" split layout
6057
set splitbelow
6158
set splitright
@@ -72,13 +69,25 @@ set foldlevel=99
7269
" enable folding with spacebar
7370
nnoremap <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
7685
map <C-\> :NERDTreeToggle<CR>
7786
" open NERDTree automatically when vim starts up with no file specified
7887
autocmd StdinReadPre * let s:std_in=1
7988
autocmd 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
8392
let NERDTreeShowHidden=1 " show hidden file by default
8493
let NERDTreeIgnore=['.git$[[dir]]', '.swp', '.DS_Store']
@@ -103,22 +112,8 @@ endif
103112
let g:ycm_semantic_triggers={ 'python': [ 're!\w{1}' ] }
104113
let 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

Comments
 (0)