Vim Tips Wiki
(Add to Category:Policy)
(More precise example of how to add categories to a tip)
Line 32: Line 32:
   
 
A tip can be in more than one category. For example, a tip on folding Python programs should be in [[:Category:Folding]] and [[:Category:Python]]. However, multiple categories should not be predecessors of each other. So don't put a tip in category Folding '''and''' category Usage.
 
A tip can be in more than one category. For example, a tip on folding Python programs should be in [[:Category:Folding]] and [[:Category:Python]]. However, multiple categories should not be predecessors of each other. So don't put a tip in category Folding '''and''' category Usage.
  +
  +
We put categories at the bottom of each tip, after a horizontal rule, at the end of the Comments section (preferably in alphabetical order). For example:
  +
<pre>
  +
==Comments==
  +
Any comments go here.
  +
  +
----
  +
[[Category:Folding]]
  +
[[Category:Python]]
  +
</pre>
   
 
[[Category:Policy]]
 
[[Category:Policy]]

Revision as of 05:07, 18 March 2008

Vim Tip Guidelines
Quick reference
General guidelines
Titles and renaming a tip
Comments
Categories
Discussion page
Merging similar tips
Deleting a tip
Templates
Formatting code blocks
Entities and other magic
Script comments

In short

  • Add categories to the bottom of a tip (or a category) by using a [[Category:SomeCategory]] line.
  • Each tip is in one or more categories.
  • Each category is in exactly one parent category.
  • Create new categories carefully.

Examples and explanations

For example, there may be categories:

VimTip
Usage
Folding

The purpose of the folding category is to allow readers to easily find all tips that relate to using folding in Vim.

If a tip concerns folding, it should be in the Folding category (which has the Usage category as its parent). It should not also be in the Usage category, because that would be redundant. An exception is the VimTip category, which is meant to collect all tips.

See all categories for a list of all the categories, including some that deal with the rest of the wiki. Categories for Vim tips start at Category:VimTip.

Here is an ajax based category tree (requires javascript) using Template:vimcats

VimTip(7 C, 1,148 P)
Building Vim(11 P)
Integration(5 C, 46 P)
LanguageSpecific(16 C, 17 P)
Options(23 P)
Plugin(1 C, 17 P)
Usage(20 C, 69 P)

To track the review process, there is a statistics page for each category: Just append /stats to the URL, or follow the link below the headline. See Category:Folding and Category:Folding/stats.

Think twice before you add a new category. A category should contain a reasonable number of tips. It makes little sense to add a category just for one tip.

Example

  1. You may edit a tip on folding and find the wikitext: [[Category:Usage]]
  2. That means that the tip is in the Usage category (which will be shown at the bottom of the tip page). In that case, you should change the category by replacing "Usage" with "Folding", so it reads: [[Category:Folding]]
  3. If the tip is not in the Usage category, you would simply add the above line to the tip (at the bottom).

A tip can be in more than one category. For example, a tip on folding Python programs should be in Category:Folding and Category:Python. However, multiple categories should not be predecessors of each other. So don't put a tip in category Folding and category Usage.

We put categories at the bottom of each tip, after a horizontal rule, at the end of the Comments section (preferably in alphabetical order). For example:

==Comments==
Any comments go here.

----
[[Category:Folding]]
[[Category:Python]]