13 lines
253 B
VimL
13 lines
253 B
VimL
if !exists('*opdavies#save_and_exec')
|
|
function! opdavies#save_and_exec() abort
|
|
if &filetype == 'vim'
|
|
:silent! write
|
|
:source %
|
|
elseif &filetype == 'lua'
|
|
:silent! write
|
|
:luafile %
|
|
endif
|
|
return
|
|
endfunction
|
|
endif
|