vim/autoload/ft/compileeruby.vim

10 lines
176 B
VimL

function! ft#compileeruby#CompileEruby(reload) abort
silent execute 'update | edit'
execute '!erb -T - % > %:r.vim'
if a:reload
source $MYVIMRC
endif
endfunction