You could profile the load time for your vimrc file as follows: vim --cmd 'profile start vimrc.profile' --cmd 'profile! file ~/.vimrc' To profile a function in the vimrc file, you would have to call it. For example, if there was a function called Zzzz(), you could profile that function by running: vim --cmd 'profile start vimrc.profile' --cmd 'profile! file ~/.vimrc' -c 'call Zzzz()' Remember: the