Lazy
This commit is contained in:
@@ -22,7 +22,7 @@ function! Build()
|
||||
let l:filetype = &filetype
|
||||
|
||||
if l:filetype == 'c' || l:filetype == 'cpp' || l:filetype == 'h' || l:filetype == 'hpp'
|
||||
execute 'make'
|
||||
execute '!make'
|
||||
elseif l:filetype == 'py' || l:filetype == 'python'
|
||||
execute '!python3 %'
|
||||
elseif l:filetype == 'tex'
|
||||
@@ -30,11 +30,13 @@ function! Build()
|
||||
elseif l:filetype == 'rs'
|
||||
execute 'cargo run'
|
||||
elseif l:filetype == 'S'
|
||||
execute 'make'
|
||||
execute '!make'
|
||||
elseif l:filetype == 'verilog'
|
||||
execute 'verilator --binary %'
|
||||
execute '!verilator --binary %'
|
||||
elseif l:filetype == 'rust'
|
||||
execute 'cargo run'
|
||||
execute '!cargo run'
|
||||
elseif l:filetype == 'markdown'
|
||||
execute '!okular %&'
|
||||
else
|
||||
echo "Unsupported file type: " . l:filetype
|
||||
endif
|
||||
@@ -43,4 +45,3 @@ endfunction
|
||||
nnoremap <C-b> :call Build()<CR>
|
||||
nnoremap <M-w> :bdelete<CR>
|
||||
nnoremap <C-y> :b#<CR>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user