mirror of
1
0
Fork 0

🚑 Fix cpp and c files run

This commit is contained in:
SUPERustam 2021-08-10 14:50:31 +03:00
parent d93dda4770
commit 96bb75d663
1 changed files with 3 additions and 5 deletions

View File

@ -207,18 +207,16 @@ vmap <F5> <Esc>:call CompileRun()<CR>
func! CompileRun() func! CompileRun()
exec "w" exec "w"
if &filetype == 'c' if &filetype == 'c'
exec "!gcc % -o %<" exec "!gcc % && ./a.out<"
exec "!time ./%<"
elseif &filetype == 'cpp' elseif &filetype == 'cpp'
exec "!g++ % -o %<" exec "!g++ % && ./a.out"
exec "!time ./%<"
elseif &filetype == 'java' elseif &filetype == 'java'
exec "!javac %" exec "!javac %"
exec "!time java %" exec "!time java %"
elseif &filetype == 'sh' elseif &filetype == 'sh'
exec "!time bash %" exec "!time bash %"
elseif &filetype == 'python' elseif &filetype == 'python'
exec "!time python3 %" exec "!time python %"
elseif &filetype == 'html' elseif &filetype == 'html'
exec "!google-chrome % &" exec "!google-chrome % &"
elseif &filetype == 'go' elseif &filetype == 'go'