I know that to source my current file I need to do this:

 :so ~/.vimrc

But is it possible to source the current file without mentioning its name?

1 Answer 1


:so %

% refers the current buffer's filename. This works not just for :source, but for all of the commandline; see :help cmdline-special.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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