justing.net

Using ALE

I found ALE to be easier to configure than Syntastic. In particular:

let g:ale_fixers = {
            \ '*': ['remove_trailing_lines', 'trim_whitespace'],
            \ 'python': ['yapf', 'remove_trailing_lines', 'trim_whitespace'],
            \}
let g:ale_linters = {
            \ 'python': ['pylint'],
            \}
nmap <F10> :ALEFix<CR>
let g:ale_fix_on_save = 1
let g:ale_sign_column_always = 1
let g:airline#extensions#ale#enabled = 1
let g:ale_echo_msg_error_str = 'E'
let g:ale_echo_msg_warning_str = 'W'
let g:ale_echo_msg_format = '[%linter%] %s [%severity%]'
let g:ale_python_pylint_executable = 'pylint3'

" Some YouCompleteMe settings.
let g:ycm_python_interpreter_path = '/usr/bin/python3'
let g:ycm_python_binary_path = '/usr/bin/python3'

Remember to also add the airline plugins

Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'