Newer
Older
:set expandtab
:set tabstop=4
:retab
:set shiftwidth=4
let g:ale_cpp_clang_options = '-std=c++14 -Wall -I .'
let g:ale_cpp_gcc_options = '-std=c++14 -Wall -I .'
let g:ale_cpp_cppcheck_options = '--std=c++14 --enable=style -I .'
let g:ale_cpp_clangtidy_options = '-I . -x c++'
let g:ale_cpp_cpplint_options = '-I .'
"\ 'cpp': ['g++', 'cppcheck', 'cpplint', 'clang', 'clangtidy'],
let g:ale_linters = {
\ 'cpp': [ 'g++', 'cppcheck', 'cpplint', 'clang'],
\}
"let g:ale_cpp_clang_options = '-I '.expand('<sfile>:p:h')
"let g:ale_cpp_gcc_options = '-I '.expand('<sfile>:p:h')
"let g:ale_cpp_cppcheck_options = '-I '.expand('<sfile>:p:h')
"let g:ale_cpp_clangtidy_options = '-I '.expand('<sfile>:p:h')
"let g:ale_cpp_cpplint_options = '-I '.expand('<sfile>:p:h')
function! Formatonsave()
let l:formatdiff = 1
pyf /usr/lib/llvm/8/share/clang/clang-format.py
endfunction
autocmd BufWritePre *.h,*.cc,*.cpp call Formatonsave()
"echo expand("%:pwd")
"echo expand('<sfile>:p:h')