Add jai compiler support to vimrc
This commit is contained in:
parent
648e9bcce5
commit
06f155f3f7
22
vimrc
22
vimrc
|
@ -121,6 +121,8 @@ let g:campo_custom_search_args = ""
|
|||
" CTAGS
|
||||
""""""""""""""
|
||||
|
||||
" I use the ctags executable from https://github.com/universal-ctags/ctags-win32/releases
|
||||
|
||||
" If != 0 then ctag generation will always happen on a file save, otherwise
|
||||
" it'll only be triggered if the file being saved has an extension in the
|
||||
" g:campo_extensions_that_run_ctags list.
|
||||
|
@ -1064,7 +1066,7 @@ augroup END
|
|||
hi def link MyNotes Notes
|
||||
|
||||
augroup vimrc_notices
|
||||
au!
|
||||
autocmd!
|
||||
autocmd Syntax * syn match MyNotices /\v<(WARNING|IMPORTANT):/
|
||||
\ containedin=.*Comment,vimCommentTitle
|
||||
augroup END
|
||||
|
@ -1138,9 +1140,23 @@ function! ExecuteRunScript()
|
|||
exec "AsyncRun! -post=call\\ StopRunTask() ./run %"
|
||||
endfunction
|
||||
|
||||
function! Build()
|
||||
let l:extension = tolower(expand('%:e'))
|
||||
if l:extension == "jai"
|
||||
exec "AsyncRun! -save=2 jai %"
|
||||
else
|
||||
exec "AsyncRun! -save=2 ./build* %"
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! SilentBuild()
|
||||
AsyncStop
|
||||
exec "AsyncRun! -save=2 -post=call\\ HideAsyncResults() ./build* %"
|
||||
let l:extension = tolower(expand('%:e'))
|
||||
if l:extension == "jai"
|
||||
exec "AsyncRun! -save=2 -post=call\\ HideAsyncResults() jai %"
|
||||
else
|
||||
exec "AsyncRun! -save=2 -post=call\\ HideAsyncResults() ./build* %"
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" Show results window the moment the async job starts
|
||||
|
@ -1157,7 +1173,7 @@ nnoremap <leader>bc :call ToggleBuildResults()<cr>
|
|||
noremap <F10> :call HideBuildResultsAndClearErrors()<cr>
|
||||
|
||||
" Execute build script
|
||||
nnoremap <leader>b :AsyncRun! -save=2 ./build* %<cr>
|
||||
nnoremap <leader>b :call Build()<cr>
|
||||
nnoremap <F8> :call SilentBuild()<cr>
|
||||
|
||||
" Execute run script
|
||||
|
|
Loading…
Reference in New Issue
Block a user