From: Jannik Zander <59698@grundfos.com> Date: Fri, 13 Jul 2018 15:26:01 +0000 (+0200) Subject: Add asyncrun to vim X-Git-Url: https://git.zndr.dk/?a=commitdiff_plain;h=6525e9db07e35ea0047967ca30804ca1ea5554dd;p=dotfiles.git Add asyncrun to vim --- diff --git a/.bash_aliases b/.bash_aliases index 75bac9a..13381ce 100644 --- a/.bash_aliases +++ b/.bash_aliases @@ -34,6 +34,7 @@ alias rd='rmdir' alias h='history' alias e='ranger-cd' alias o='rifle' +alias c='clear' alias open='xdg-open &>/dev/null' alias info='info --vi-keys' alias ag='ag --path-to-ignore=$HOME/.ignore --skip-vcs-ignores' diff --git a/.gitmodules b/.gitmodules index 9d7f377..f354094 100644 --- a/.gitmodules +++ b/.gitmodules @@ -46,3 +46,6 @@ [submodule ".vim/pack/github/opt/matchit"] path = .vim/pack/github/opt/matchit url = https://github.com/tmhedberg/matchit.git +[submodule ".vim/pack/github/opt/asyncrun.vim"] + path = .vim/pack/github/opt/asyncrun.vim + url = https://github.com/skywind3000/asyncrun.vim.git diff --git a/.vim/pack/github/opt/asyncrun.vim b/.vim/pack/github/opt/asyncrun.vim new file mode 160000 index 0000000..a81b997 --- /dev/null +++ b/.vim/pack/github/opt/asyncrun.vim @@ -0,0 +1 @@ +Subproject commit a81b9972337c61a28786e71ca87e84fa6a756ec7 diff --git a/.vim/vimrc b/.vim/vimrc index 92928f8..6d9fc3c 100644 --- a/.vim/vimrc +++ b/.vim/vimrc @@ -99,7 +99,7 @@ highlight linenr ctermfg=grey " fonts set list if has('multi_byte') && &encoding ==# 'utf-8' - let &listchars = 'tab:▸ ,extends:❯,precedes:❮,nbsp:±' + let &listchars = 'tab:▸ ,extends:❯,precedes:❮,nbsp:±' else let &listchars = 'tab:> ,extends:>,precedes:<,nbsp:.' endif @@ -109,6 +109,11 @@ let &t_SI.="\e[5 q" let &t_EI.="\e[1 q" let &t_te.="\e[0 q" +" make +set makeprg=cmake +" filename(line): error|warning|fatal error C0000: message +set errorformat=\ %#%f(%l):\ %#%t%[A-z]%#\ %[A-Z\ ]%#%n:\ %m + " grep set grepprg=ag\ --vimgrep\ --skip-vcs-ignores\ --path-to-ignore\ ~/.ignore\ --cpp\ --cc set grepformat^=%f:%l:%c:%m " file:line:coloumn:message @@ -122,7 +127,7 @@ let g:netrw_sort_sequence = '[\/]$,*' " Packages " ALE -packadd! ale +"packadd! ale " Tagbar packadd! tagbar @@ -148,30 +153,40 @@ let g:airline#extensions#tabline#enabled = 1 let g:airline#extensions#tabline#formatter = 'unique_tail_improved' " Editorconfig -packadd! editorconfig-vim -let g:editorconfig_exclude_patterns = ['fugitive://.*', 'scp://.*'] -let g:editorconfig_verbose = 1 -let g:editorconfig_core_mode = "python_builtin" +"packadd! editorconfig-vim +"let g:editorconfig_exclude_patterns = ['fugitive://.*', 'scp://.*'] +"let g:editorconfig_verbose = 1 +"let g:editorconfig_core_mode = "python_builtin" " CtrlP -packadd! ctrlp.vim -let g:ctrlp_map = 'p' -let g:ctrlp_cmd = 'CtrlP' -let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard'] +"packadd! ctrlp.vim +"let g:ctrlp_map = 'p' +"let g:ctrlp_cmd = 'CtrlP' +"let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard'] "let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""' -nnoremap p :CtrlP -nnoremap b :CtrlPBuffer -nnoremap m :CtrlPMRU +"nnoremap p :CtrlP +"nnoremap b :CtrlPBuffer +"nnoremap m :CtrlPMRU " matchit packadd! matchit " termdebug -packadd! termdebug +"packadd! termdebug " shellmenu -packadd! shellmenu +"packadd! shellmenu + +" Async shell commands +packadd asyncrun.vim +let g:asyncrun_open = 8 +let g:asyncrun_status = "stopped" +let g:airline_section_error = airline#section#create_right(['%{g:asyncrun_status}']) +command! -bang -nargs=* -complete=file Make AsyncRun -program=make @ +augroup asyncrun + autocmd QuickFixCmdPost * call asyncrun#quickfix_toggle(8, 1) +augroup END " Normal mode Mappings nnoremap ; : @@ -203,31 +218,33 @@ tnoremap l " Autocommands if has('autocmd') " Put these in an autocmd groups, so that we can delete them easily. - augroup filetypes - au! - au bufnewfile,buffilepre,bufread *.md set filetype=markdown - au bufnewfile,buffilepre,bufread *.gradle set filetype=groovy - au bufnewfile,buffilepre,bufread *.json set filetype=json - au bufnewfile,buffilepre,bufread *.yml set filetype=yaml + augroup filetypes + autocmd! + autocmd bufnewfile,buffilepre,bufread *.md set filetype=markdown + autocmd bufnewfile,buffilepre,bufread *.gradle set filetype=groovy + autocmd bufnewfile,buffilepre,bufread *.json set filetype=json + autocmd bufnewfile,buffilepre,bufread *.yml set filetype=yaml augroup END augroup saveall - au! - au focuslost * wall + autocmd! + autocmd focuslost * wall augroup END augroup numbers - au! - au bufenter,focusgained,insertleave * set relativenumber - au bufleave,focuslost,insertenter * set norelativenumber + autocmd! + autocmd bufenter,focusgained,insertleave * set relativenumber + autocmd bufleave,focuslost,insertenter * set norelativenumber augroup END augroup vimrc - au! - au bufwritepost ~/.vim/gvimrc source % - au bufwritepost ~/.vim/vimrc source % - au bufwritepost ~/.vim/vimrc.local source % + autocmd! + autocmd bufwritepost ~/.vim/gvimrc source % + autocmd bufwritepost ~/.vim/vimrc source % + autocmd bufwritepost ~/.vim/vimrc.local source % augroup END + + endif " local settings