I have been using vim for two years, and I use "pathogen" for plugins manage. I am seeking a way to reset all vim's settings (including plugins, .vimrc file) without close vim. Is there any idea?
PS: In some cases, reload vimrc doesnot work exactly the same as reopen vim, so I want to reload the whole state exactly like reopen vim.
From
:h set
It is not clear why would you avoid restarting Vim.
If the problem is to lose the current state of tabpages, windows and buffers it would be preferable to create a session to save what matters and the reload everything else.
Building on Peter Rincker suggestion on the comments, there is a great plugin called session.vim, which makes managing sessions very easy. It also creates the Restart command:
The
:Restart
command worked very well here, so I've never tested the other plugin for the "lightweight approach". But you could try it if completely restarting Vim is not an option.