Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

Is it possible to edit the Vim MOTD?

VIM - Vi IMproved

version 7.3.390
by Bram Moolenaar et al.
Vim is open source and freely distributable

Sponsor Vim development!
type :help sponsor<Enter> for information

type :q<Enter> to exit
type :help<Enter> or <F1> for on-line help
type :help macvim<Enter> for MacVim help

I figure I've got all this down already and I'd like to personalize it.

share|improve this question
up vote 1 down vote accepted

I was just browsing through the Vim source code, and found that indeed, the above text is hard-coded into the version.c file. You'll need to download the latest version of the source code, either from the Google Code repository linked above, or from your latest distribution's package repository.

Once you have the source code, go through the file outlined above to find the strings you want to replace. There are several different cases in the file, but you should be able to simply find-and-replace most of it (just be careful not to modify the semantics of the source code, or you might have compilation issues!). In particular, the message is printed in the intro_message function.

After the changes have been made, you should be able to just call make and then make install (from the base source code directory, the one with the Makefile) - and that should be it!

As an alternative method, depending on your OS/other limitations (signed binaries, etc...), you could use a hex editor on the binary to find-and-replace the strings you wanted directly in the compiled application. However, you need to use caution, as you can only write over what's already there. This implies that you cannot remove and add characters; you can, however, just use spaces to ignore some stuff...

share|improve this answer
Awesome, thanks for the info. I'm assuming this means that if OS X updates Vim, I'll be redownloading and recompiling? – Josh Whittington Oct 16 '12 at 23:55
Yes; I also updated the answer with another method, which may be easier depending on your needs (and could be automated to be quick; although one could argue that the prior method [compiling from source] is just as fast, and if you're crafty, you could just clone the official Mercurial repo from the link in the answer. Then, just update your Vim manually, but constantly download and merge in changes - makes it essentially automated, and you could craft up a pull-merge-build script really easily). – Breakthrough Oct 17 '12 at 0:06
Absolutely wonderful; editing a few lines from version.c, then running make and make install worked perfectly, though now Powerline is confused as all hell ;) Thanks again, I'm going to enjoy playing around with this. I hope others find this as useful as I did (though I seem to be the only person to have Googled for this...) – Josh Whittington Oct 17 '12 at 0:18
Oops, nevermind about Powerline. (Couldn't edit the comment) – Josh Whittington Oct 17 '12 at 0:23

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.