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.
" 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 <firstname.lastname@example.org> " 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 finish endif " 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("") == "") finish endif " 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 finish endif " 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. intro
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/&/\&/g " change & to & :%s/</</g " change < to < :%s/>/>/g " change > to > :%s/\%xA0/ /g " change literal no-break space to ordinary space
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)