yaohunzhanyue / collcetion

6 stars 0 forks source link

Define commands in vimrc #9

Open yaohunzhanyue opened 4 years ago

yaohunzhanyue commented 4 years ago
command! -nargs=* -complete=file EE :call EE(<f-args>)

function! EE(...)
  if filereadable(expand(a:1))
    exec 'edit ' . a:1
  endif
endfunction

:EE file will open a file (like the built-in command ":edit file)