vim编译执行正在编辑的文件
function! Setup_ExecNDisplay()
" 保存文件
execute "w"
execute "silent ! rm %:p:r.js"
execute "silent ! tsc %:p"
execute "silent ! node %:p:r.js 2>&1 | tee tmp.out"
execute "split tmp.out"
" execute "redraw!"
" set autoread
endfunction
:nmap <F8> :call Setup_ExecNDisplay()<CR>