You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
1.2 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

set mouse=
execute pathogen#infect()
syntax on
filetype plugin indent on
let g:ycm_global_ycm_extra_conf = "/home/micke/.vim/bundle/YouCompleteMe/.ycm_extra_conf.py"
set autoread
map <C-K> :py3f /usr/share/vim/addons/syntax/clang-format.py<cr>
imap <C-K> <c-o>:py3f /usr/share/vim/addons/syntax/clang-format.py<cr>
function! Formatonsave()
let l:formatdiff = 1
py3f /usr/share/vim/addons/syntax/clang-format.py
endfunction
autocmd BufWritePre *.h,*.cc,*.cpp call Formatonsave()
" Uncomment the following to have Vim jump to the last position when
" reopening a file
if has("autocmd")
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif
let g:ale_python_pylint_options = '--extension-pkg-allow-list=wx'
" Check Python files with flake8 and pylint.
let g:ale_linters = {'python': ['mypy', 'flake8']}
" Fix Python files with black and isort.
let g:ale_fixers = {'python': ['yapf', 'isort']}
let g:ale_sign_error = '❌'
let g:ale_sign_warning = '⚠️'
" Start NERDTree and put the cursor back in the other window.
autocmd VimEnter * NERDTree | wincmd p
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
nnoremap <CA-l> :ALEFix<CR>