So I was looking for ways to get some object oriented stuff in vimcript when I found this page
So for instance:
function gnat#Make () dict
...
return
endfunction gnat#Make
endfu[nction]
without the function name) Thanks!
The #
is for autoload scripts. Try :h autoload
for more info.
I don't think that "explicit" function ending is allowed, as written in the vim help:
:endf[unction] The end of a function definition. Must be on a line
by its own, without other commands.
But it appears that when you try to put something after :endf
, even if it's not the name of the function, no error occurs.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.