Vim Tips Wiki


< User:Tonymec

Revision as of 20:40, August 4, 2009 by Tonymec (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
1,616pages on
this wiki

This is a "global plugin" which I use to try to make Vim's "splash screen" appear at the end of startup even in circumstances when Vim usually doesn't display it.

The codeEdit

" Custom global plugin to display the Vim splash screen
" even when started with one or more editfiles.
" Name:			zzsplash.vim
" Version:		0.1
" Maintainer:		Tony Mechelynck <>
" Last Change:		Tue 04 Aug 2009
" Installation instructions: Just drop it in the after/plugin subdirectory of
" the directory named last in the 'runtimepath' option.

" This plugin intentionally has a name starting in "zz" so the VimEnter
" autocommand which it creates (below) is run as late as possible at the end
" of startup.

" The :intro command did not exist prior to version 5.
if version < 500
" If there is no loaded buffer, we can let Vim do it.
" But the function we need was only defined in version 5.1
" (or under another name starting at 5.2, but the older name
" was retained).
if (version >= 501) && (buffer_name("") == "")
" The VimEnter event was introduced in version 5.1
" Only define an autocommand if it is available
if has("autocmd") && (version >= 501)
  augroup zzsplash
    au VimEnter * intro
  augroup END
" come here only if the current Vim was compiled with -eval
" or if it does not possess the VimEnter event.
" In that case we haven't done anything yet.


If you copy the above section to (e.g.) $VIM/vimfiles/after/plugin/zzsplash.vim, beware of the following:

  • If the <pre> and </pre> tags were copied at the start and end of the text, remove them;
  • The following a posteriori edits are necessary to "interpret" HTML entities left in the text when copying from the wiki page:
:%s/&amp;/\&/g                   " change &amp; to &
:%s/&lt;/</g                     " change &lt;  to <
:%s/&gt;/>/g                     " change &gt;  to >
:%s/\%xA0/ /g                    " change literal no-break space to ordinary space

See alsoEdit


Please add comments and questions about the above plugin here, not on the talk page, sign them by ~~~~ and separate unrelated entries by ----. — Tonymec 14:15, 3 August 2009 (UTC)

Around Wikia's network

Random Wiki