Skip to content

Instantly share code, notes, and snippets.

@coderofsalvation
Created March 27, 2016 11:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coderofsalvation/0aabf454888b8e5da213 to your computer and use it in GitHub Desktop.
Save coderofsalvation/0aabf454888b8e5da213 to your computer and use it in GitHub Desktop.
put this in your vimrc
" please install ConqueShell (https://github.com/lrvick/Conque-Shell)
function! DebugJs()
let cmd="node --debug-brk "
if( expand('%:e') == "coffee")
let cmd="coffee --nodejs --debug-brk "
endif
exec "silent ConqueTermVSplit bash -ic \"(" . cmd . @% . " &) ; sleep 1s && node-vim-inspector\""
endfunction
" launch debug on ctrl-d
nnoremap <C-d> :call DebugJs()<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment