Vim Tips Wiki

JohnBeckett/Tip templates project

< User:JohnBeckett

Revision as of 10:06, January 18, 2008 by JohnBeckett (Talk | contribs)

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


Originally, each imported tip started with a header providing arguments to the {{Tip}} template.

I have completed changing the imported tips to use a new {{TipImported}} template. A script was used to translate local files from the old template to the new. In addition, the local files were manually edited for a general clean-up, before being uploaded.

Each new tip (those created on this wiki) will use a new {{TipNew}} template. New tips will be reviewed monthly – see new tips. Those tips which we wish to keep will be manually allocated a tip number (id), and the TipNew header will be inserted. Therefore the old {{Tip}} template is no longer required.

Manual editingEdit

The script to convert the template from Tip to TipImported uses local files downloaded from the wiki. I have also manually edited each file, and have tried to perform these steps:

  • Delete trailing spaces from all lines.
  • Join individual lines in one paragraph into one long line.
  • Remove redundant blank lines.
  • Omit email addresses and references to unhelpful web sites.
  • Change all '--AT--' to '@' (when not used to obfuscate an email address).
  • Restore broken Unicode characters that I've noticed (usually in author's name). I've got more of these to do later.
  • Insert <pre>...</pre> around script blocks.
  • Insert <tt>...</tt> around some text intended to be typed.
  • Use Vim to reformat scripts with two spaces per indent.
  • Move any [[Category]] lines to end of tip, and arrange in alphabetical order.
  • Change == Example heading == to ==Example heading==.
  • Use {{help}} for help references and {{script}} for scripts.
  • Fix any typos noticed.
  • Where necessary, reword text to clarify meaning or to change from "this is my tip :-)" style to a more uniform "wiki" style. Sometimes I did a lot of rewording, but usually just enough to reach reasonable English.
  • Severely clean comments to keep only the latest version where several attempts at expressing an idea were made, and to omit unhelpful material.
  • Fix some extreme Vim misunderstandings (sometimes simply by adding "TODO Fix...").

With a few exceptions, I have not had time to examine the tip content, and many of the tips still need a lot of work to update them for Vim 7, and to eliminate misguided advice.


The new templates are:

The tips from 1 to 1504 were imported from Each of those tips now uses TipImported (around 1220 actual tips, while 280 are missing because they were spam, or have been removed after merging or other misadventure).

New tips will be added, starting at tip 1505.


  • VimTip1 (an imported tip using TipImported)
  • VimTip1505 (a new tip using TipNew) (won't exist until end of January 2008)

TipImported changesEdit

The main changes are:

  • The tip body is no longer a template argument.
  • Previous and Next tip arguments provide tip navigation.

The effects of these changes are:

  • Using pipe characters or double braces will not break a tip.
  • Tip navigation will skip the 280 missing/removed tips.

Example of the current Tip template header:

|title=The obsolete title
|created=April 1, 2002 12:34
|author=Author Name
Tip body.

After the change, the header is:

|created=April 1, 2002
|author=Author Name
Tip body.

The change deletes the following:

|title=The obsolete title

The change inserts the following:


The created time is omitted:

|created=April 1, 2002

In addition, the script cleans the tip:

  • Trailing whitespace is deleted from each line.
  • The HTML entity &#35; is replaced with #.
  • The HTML comment 'parsed by' is omitted.

The current Tip template includes an optional deprecated argument. That has been removed for simplicity. When a tip should be flagged deprecated, just insert the {{Deprecated|reason}} template.


Using pipe characters or double braces will not break a tip. That applies to tips now, and when they are edited in the future.

Tip navigation (Previous/Next) will skip the 280 missing/removed tips.

The top of the tip is displayed more compactly, and the title is not displayed twice.

There is not an extra heading that causes the TOC to appear prematurely, and when the TOC is displayed, there is not a pointless first entry in the TOC linking to the title.

The new templates are simpler than the current Tip template, so there would be a slightly smaller overhead on the wiki server when it interprets the tip and navigation templates, and there would be less maintenance trouble for us.

Around Wikia's network

Random Wiki