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>
posted @ 2020-10-30 00:10  jiftle  阅读(287)  评论(0编辑  收藏  举报