Is there any way or tools to fold function in vim, like Visual Studio or Eclipse?
Vim has excellent folding support. There is good documentation in the vim help system. Just open vim and do
:help usr_28.txt
After reading that you can also read
:help folding
for some more information.