function! fgcommand#Stop() if exists('$VIM_FG_CMD') execute 'silent ! mkdir -p '.shellescape(fnamemodify($VIM_FG_CMD, ':h')) " execute "silent ! printf '\\%c \\%d\\n' 34 ".getpid().' >'.shellescape($VIM_FG_CMD) tabnew 0put =printf('%cpid: %d', 34, getpid()) execute 'w! '.fnameescape($VIM_FG_CMD) bdel endif stop if exists('$VIM_FG_CMD') && filereadable($VIM_FG_CMD) execute 'source '.$VIM_FG_CMD execute 'silent ! rm '.shellescape($VIM_FG_CMD) redraw! endif endfunction