-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 401c5ac
Showing
3 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
______ _ _ _ | ||
| _ \ | | | (_) | ||
| | | |___ _ __ ___ | | | |_ _ __ ___ | ||
| | | / _ \ '_ \ / _ \ | | | | | '_ ` _ \ | ||
| |/ / __/ | | | (_) | \ \_/ / | | | | | | | ||
|___/ \___|_| |_|\___/ \___/|_|_| |_| |_| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
" Author: TeoDev1611 | ||
" Version: 0.1.0 | ||
" Mantainer: TeoDev1611 | ||
" Deno Vim | ||
|
||
" Config Variables | ||
let g:deno_fmt = 'deno fmt ' | ||
let g:deno_cache = 'deno cache ' | ||
let g:deno_run = 'deno run -A ' | ||
let g:deno_doc = 'deno doc --json ' | ||
" Util variables | ||
let s:current_time = strftime('%c') | ||
let s:path = expand('<sfile>:p') | ||
|
||
if !executable("deno") | ||
echoerr "Deno executable not found" | ||
finish | ||
endif | ||
|
||
" Fmt Runner | ||
function DenoFmt() | ||
execute "!" . g:deno_fmt | ||
echo "Succesfuly formated with: " . g:deno_fmt | ||
echomsg "Fmt runned at" . s:current_time . "with: " . g:deno_fmt "path: " . s:path | ||
endfunction | ||
|
||
" Cache runner | ||
function DenoCache() | ||
execute "!". g:deno_cache . s:path | ||
echo "Cached succesfuly with: " . g:deno_cache | ||
echomsg "Cache runned at" . s:current_time . "with: " . g:deno_cache "path: " . s:path | ||
endfunction | ||
|
||
" Run current file | ||
function DenoRun() | ||
execute "!". g:deno_run . s:path | ||
echo "Script runned succesfuly with: " . g:deno_run | ||
echomsg "Script runned at" . s:current_time . "with: " . g:deno_run "path: " . s:path | ||
endfunction | ||
|
||
" Deno Doc arg | ||
function DenoDoc(file) | ||
execute "!". g:deno_doc . file | ||
echo "Documentation runned with: ". g:deno_doc | ||
echomsg "Script runned at" . s:current_time . "with: " . g:deno_doc "path: " . s:path | ||
endfunction | ||
|
||
" Register the commands | ||
command! -nargs=0 DenoFmt call DenoFmt() | ||
command! -nargs=0 DenoCache call DenoCache() | ||
command! -nargs=0 DenoRun call DenoRun() | ||
command! -nargs=1 DenoDoc call DenoDoc(<args>) |