Can this be done by editing the .vimrc file?
What I need is that after closing all tabs, a new tab is there like notepad++ does.
Vi and Vim Stack Exchange is a question and answer site for people using the vi and Vim families of text editors. It only takes a minute to sign up.Sign up to join this community
You seem to be looking for MacVim Preferences, and they are under the MenuBar entitled "MacVim".
MacVim -> Preferences -> General
There you'll find settings for what to do on startup, and after the last MacVim window closes. You can decide to automatically open a blank window on startup, and also for when "the last window closes" you can check "Leave MacVim Running".
There doesn't seem to be a setting to automatically open a new blank window when the last MacVim window closes, but you can easily hit ⌘+N.