-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathjavascript.vim
More file actions
16 lines (13 loc) · 595 Bytes
/
javascript.vim
File metadata and controls
16 lines (13 loc) · 595 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
" Contents should be identical for javascript, typescript - not creating
" symlinks to make it compatible for potential Windows users.
function! s:DebugStringFun()
let l:debug_str = 'console.log("' . g:DebugstringPrefixStr() . g:debugStringCounter . '");'
:return l:debug_str
endfunc
function! s:DebugVarFun(desc, var)
let l:debug_str = 'console.log(`' . a:desc . '`, ' . a:var . ')'
return l:debug_str
endfunc
command! -buffer -nargs=0 AddDebugString put=s:DebugStringFun()
command! -buffer -nargs=1 AddDebugStringExpr
\ put=s:DebugVarFun(<args> . ': ', <args>)