let &t_te.="\e[0 q"
" make
-let mycomp="msvc"
-
-if mycomp == "msvc"
- compiler msvc
+function! s:Msvc(path)
let &errorformat="%f(%l) : %t%*\\D%n: %m,%*[^\"]\"%f\"%*\\D%l: %m,%f(%l) : %m,%*[^ ] %f %l: %m,%f:%l:%c:%m,%f(%l):%m,%f|%l| %m"
- set makeprg=cmake
-elseif mycomp == "doxygen"
+ let &makeprg='cd ' . a:path . '; cmake '
+ let b:asyncrun_root = '~/projects/applayer'
+ exe 'AsyncRun -cwd=<root> mkdir -p ' . fnameescape(a:path)
+endfunction
+command! -bang -nargs=1 -complete=file Msvc call s:Msvc(<f-args>)
+
+function! s:Doxygen()
set errorformat+=%f:%l:\ %m
set makeprg=doxygen
-elseif mycomp == "iar"
+endfunction
+command! -bang -nargs=0 -complete=file Doxygen call s:Doxygen(<f-args>)
+
+function! s:Iar(path)
set errorformat=%f(%l)\ :\ %m
set makeprg=vim-iarbuild.cmd
-endif
+endfunction
+command! -bang -nargs=0 -complete=file Iar call s:Iar(<f-args>)
+
" grep
" file:line:coloumn:message
let GtagsCscope_Absolute_Path = 1
let GtagsCscope_Keep_Alive = 1
let GtagsCscope_Auto_Load = 1
-"cscope add GTAGS
+let GtagsCscope_Quiet = 1
" Unimpaired
packadd! vim-unimpaired
packadd! vim-airline
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#formatter = 'unique_tail_improved'
+let g:airline_section_error = airline#section#create_right(['%{g:asyncrun_status}'])
" Editorconfig
"packadd! editorconfig-vim
let g:asyncrun_open = 8
let g:asyncrun_status = "stopped"
let g:asyncrun_auto = "make"
-let g:airline_section_error = airline#section#create_right(['%{g:asyncrun_status}'])
-command! -bang -nargs=* -complete=file Make AsyncRun -program=make @ <args>
-"augroup asyncrun
-" autocmd QuickFixCmdPost * call asyncrun#quickfix_toggle(8, 1)
-"augroup END
+let g:asyncrun_rootmarks = ['.git']
+command! -bang -nargs=* -complete=file Make AsyncRun -cwd=<root> -program=make @ <args>
+command! -bang -nargs=* -complete=file Grep AsyncRun -cwd=<root> -program=grep @ <args>
" Error markers
packadd errormarker.vim
tnoremap <C-k> <C-\><C-n><C-w>k
tnoremap <C-l> <C-\><C-n><C-w>l
-" My functions
-function! SetCmakeRoot(path)
- let &makeprg="cmake ". a:path
-endfunction
" Autocommands
if has('autocmd')
augroup quickfix
autocmd QuickFixCmdPost [^l]* nested cwindow
autocmd QuickFixCmdPost l* nested lwindow
+" autocmd QuickFixCmdPost * call asyncrun#quickfix_toggle(8, 1)
augroup END
endif