Change the phrase on the blank page of VIM

Viewed 61

I have done a customization of vim and I would like to share it with my colleagues. some changes have been made to the command system and I would like to show them on the initial homepage (in case you open vim without selecting a file). I wanna change the

             VIM - Vi IMproved
              version 7.4.629
           by Bram Moolenaar et al.
      Modified by <bugzilla@redhat.com>
  Vim is open source and freely distributable
       Help poor children in Uganda!
type  :help iccf<Enter>       for information
type  :q<Enter>               to exit
type  :help<Enter>  or  <F1>  for on-line help
type  :help version7<Enter>   for version info

can someone kindly help me? I can't find any information about this text.

2 Answers

That text, described under :h :intro, can only be changed by changing the source except for the "Modified by" bit that can be changed with the --with-modified-by configure argument or the MODIFIED_BY define. Whatever you do to change the intro message must be done at build time, as its content is not settable/gettable at runtime.

As mentioned in the comments, you might be able to show some information to your colleagues at startup with an autocommand on VimEnter if Vim was started without a filename:

function! DoSomethingIfNoArgs()
    if argc() == 0
        echomsg 'look ma, no file'
    endif
endfunction
autocmd VimEnter * call DoSomethingIfNoArgs()

But, since the intro message is off-limits at runtime, you would still have to decide how to show that info:

  • :echo a list of features,
  • show the content of a file in a preview window,
  • use a popup window,
  • play an audio clip,
  • something else?

which is another topic entirely.

There are plug-ins such as vim-startify and dashboard-nvim which allow you to replace the default Vim intro with some text that you can define yourself. With the added benefit that they can also present a menu showing recently edited files, or recently defined marks, popular places to start, etc. that might give you some useful actions to consider, when opening Vim without loading a file right away...

Related