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 you have read our privacy policy.

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