Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Here is my set-up. There is a ~/.vimrc that sources several files.

I make changes to one of these. And I do :so ~/.vimrc, the changes in the underlying files are not reflected. I need to quit and restart vim.

Is there any way I can achieve this? Let me rephrase, knowing vim. How do I get the changes to reflect without restarting vim?

share|improve this question

try with this command by adding it to .vimrc

autocmd! bufwritepost .vimrc source %


share|improve this answer
This will reflect any changes made to ~/.vimrc. But if I make any changes to a file sourced in ~/.vimrc, they are not reflected – deshmukh Aug 21 '13 at 15:39

In vim use :so % so that the current file being edited is sourced.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.