aboutsummaryrefslogtreecommitdiff
path: root/autoload/scripts.vim
blob: 5c695d3747d0399d605f120160e1cd5979db0051 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
if !exists('*scripts#save_and_exec')
  function! scripts#save_and_exec() abort
    if &filetype == 'vim'
      :silent! write
      :source %
    elseif &filetype == 'lua'
      :silent! write
      :luafile %
    endif

    return
  endfunction
endif