1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00

Add more settings for cpp

This commit is contained in:
jdhao 2021-03-23 23:15:00 +08:00
parent b18a643145
commit 2636f8575e
2 changed files with 6 additions and 0 deletions

View File

@ -1,5 +1,10 @@
set commentstring=//\ %s set commentstring=//\ %s
set tabstop=2 " number of visual spaces per TAB
set softtabstop=2 " number of spaces in tab when editing
set shiftwidth=2 " number of spaces to use for autoindent
set expandtab " expand tab to spaces so that tabs are spaces
nnoremap <silent> <buffer> <F9> :call <SID>compile_run_cpp()<CR> nnoremap <silent> <buffer> <F9> :call <SID>compile_run_cpp()<CR>
function! s:compile_run_cpp() abort function! s:compile_run_cpp() abort

View File

@ -675,6 +675,7 @@ let g:XkbSwitchEnabled = 1
" linters for different filetypes " linters for different filetypes
let g:ale_linters = { let g:ale_linters = {
\ 'vim': ['vint'], \ 'vim': ['vint'],
\ 'cpp': ['cppcheck'],
\ } \ }
" Only run linters in the g:ale_linters dictionary " Only run linters in the g:ale_linters dictionary