Split command and function to plugin and autoload parts to enable delay-loading
This commit is contained in:
parent
619265f363
commit
b18fb2ab5e
@ -1,4 +1,4 @@
|
||||
function! SplitOpenFile(filename)
|
||||
function splitopen#SplitOpenFile(filename)
|
||||
execute("tabedit " . a:filename)
|
||||
let l:file_extension = tolower(fnamemodify(a:filename, ":e"))
|
||||
if l:file_extension == "cpp"
|
||||
@ -9,5 +9,3 @@ function! SplitOpenFile(filename)
|
||||
execute("wincmd h")
|
||||
endif
|
||||
endfunction
|
||||
|
||||
command! -nargs=1 SplitOpen :call SplitOpenFile("<args>")
|
1
plugin/splitopen.vim
Normal file
1
plugin/splitopen.vim
Normal file
@ -0,0 +1 @@
|
||||
command -nargs=1 SplitOpen :call splitopen#SplitOpenFile("<args>")
|
Reference in New Issue
Block a user