I would like to call my Vim function once when vimrc is sourced.
I could put some global variables in my vimrc file and set them to be 0 or 1 etc.. In fact, that is what I'm doing for many functions. However, there are many global variables flying around in my vimrc file and it is painful to keep track of them.
let g:Myfun_var1 = '0' func! Myfun g:Myfun_var1 = '1' endfunc
I'm wondering whether there is way to achieve the result without using any global variables inside my function
By the way, I don't want to put my function in autoload folder
~/.vim/autoload. (I try to keep all functions in my vimrc file.)