Wikia

Vim Tips Wiki

Changes: Template:Duplicate

Edit

Back to page

(remove wide margin from old layout)
(Change <tt> to <code>, perhaps also minor tweak.)
 
Line 17: Line 17:
 
==Usage==
 
==Usage==
 
You may notice that two or more tips cover similar material.<br>
 
You may notice that two or more tips cover similar material.<br>
One way to handle that would be to put<tt><nowiki> See [[</nowiki></tt>''Name of other tip''<tt><nowiki>]] </nowiki></tt>on each page.
+
One way to handle that would be to put<code><nowiki> See [[</nowiki></code>''Name of other tip''<code><nowiki>]] </nowiki></code>on each page.
   
 
However, there will be many cases where similar tips should be merged. If you are not ready to perform that step, you can use this template to record that the merge is needed. That will notify readers of the existence of similar tips, and will add the tip to [[:Category:Duplicate]] so the to-be-merged tips can be located.
 
However, there will be many cases where similar tips should be merged. If you are not ready to perform that step, you can use this template to record that the merge is needed. That will notify readers of the existence of similar tips, and will add the tip to [[:Category:Duplicate]] so the to-be-merged tips can be located.
   
Suppose that tips 1 and 5 are duplicates. Put <tt><nowiki>{{Duplicate|5}}</nowiki></tt> at the top of tip 1, and <tt><nowiki>{{Duplicate|1}}</nowiki></tt> at the top of tip 5.
+
Suppose that tips 1 and 5 are duplicates. Put <code><nowiki>{{Duplicate|5}}</nowiki></code> at the top of tip 1, and <code><nowiki>{{Duplicate|1}}</nowiki></code> at the top of tip 5.
   
Up to five tips can be entered in this template. For example, if tips 1 and 5 and 50 and 100 are duplicates, you would enter <tt><nowiki>{{Duplicate|5|50|100}}</nowiki></tt> in tip 1, and something similar in the other tips.
+
Up to five tips can be entered in this template. For example, if tips 1 and 5 and 50 and 100 are duplicates, you would enter <code><nowiki>{{Duplicate|5|50|100}}</nowiki></code> in tip 1, and something similar in the other tips.
   
 
==New tips that have no id number==
 
==New tips that have no id number==
Line 33: Line 33:
 
Copy the wikitext from the unwanted tip into the wanted tip. You could merge the two tips together, or you could put a heading before the merged-in text with a note, like this:
 
Copy the wikitext from the unwanted tip into the wanted tip. You could merge the two tips together, or you could put a heading before the merged-in text with a note, like this:
   
<tt><nowiki>==Alternative procedure==</nowiki></tt><br>
+
<code><nowiki>==Alternative procedure==</nowiki></code><br>
<tt><nowiki>''TODO: Merge the following text into the tip.''</nowiki></tt>
+
<code><nowiki>''TODO: Merge the following text into the tip.''</nowiki></code>
   
 
Then you could put the following at the top of the unwanted tip:
 
Then you could put the following at the top of the unwanted tip:
   
<tt><nowiki>{{delete}}</nowiki></tt><br>
+
<code><nowiki>{{delete}}</nowiki></code><br>
<tt><nowiki>'''This tip has been merged into [[Name of wanted tip]].'''</nowiki></tt>
+
<code><nowiki>'''This tip has been merged into [[Name of wanted tip]].'''</nowiki></code>
   
 
===Insert to-do notes===
 
===Insert to-do notes===
 
You could put text like the following at the top of the unwanted tip.
 
You could put text like the following at the top of the unwanted tip.
   
<tt><nowiki>'''TODO This tip should be merged into [[Name of wanted tip]].'''</nowiki></tt>
+
<code><nowiki>'''TODO This tip should be merged into [[Name of wanted tip]].'''</nowiki></code>
   
 
On the wanted tip, you could insert a comment (before any existing comments), like this:
 
On the wanted tip, you could insert a comment (before any existing comments), like this:
   
<tt><nowiki>'''TODO This tip should include material from [[Name of unwanted tip]].'''</nowiki></tt>
+
<code><nowiki>'''TODO This tip should include material from [[Name of unwanted tip]].'''</nowiki></code>
   
 
===Simulate the template===
 
===Simulate the template===
Insert text similar to the template text at the beginning of the tips. Manually add <tt><nowiki>[[Category:Duplicate]]</nowiki></tt> to each tip.
+
Insert text similar to the template text at the beginning of the tips. Manually add <code><nowiki>[[Category:Duplicate]]</nowiki></code> to each tip.
   
 
</noinclude>
 
</noinclude>

Latest revision as of 08:29, July 15, 2012

Duplicate tip

This tip is very similar to the following:

  • [[VimTip{{{1}}}]]

These tips need to be merged – see the merge guidelines.

Use this template on a tip that needs to be merged with other tips.

UsageEdit

You may notice that two or more tips cover similar material.
One way to handle that would be to put See [[Name of other tip]] on each page.

However, there will be many cases where similar tips should be merged. If you are not ready to perform that step, you can use this template to record that the merge is needed. That will notify readers of the existence of similar tips, and will add the tip to Category:Duplicate so the to-be-merged tips can be located.

Suppose that tips 1 and 5 are duplicates. Put {{Duplicate|5}} at the top of tip 1, and {{Duplicate|1}} at the top of tip 5.

Up to five tips can be entered in this template. For example, if tips 1 and 5 and 50 and 100 are duplicates, you would enter {{Duplicate|5|50|100}} in tip 1, and something similar in the other tips.

New tips that have no id numberEdit

The Duplicate template currently works only with old tips which have id numbers. A lot of work is required to clean up the old tips, and until that is reasonably under control, we don't want to take much time considering new tips.

Therefore, if Duplicate is needed on a new tip, please consider an alternative workaround. Some suggestions follow.

Merge and deleteEdit

Copy the wikitext from the unwanted tip into the wanted tip. You could merge the two tips together, or you could put a heading before the merged-in text with a note, like this:

==Alternative procedure==
''TODO: Merge the following text into the tip.''

Then you could put the following at the top of the unwanted tip:

{{delete}}
'''This tip has been merged into [[Name of wanted tip]].'''

Insert to-do notesEdit

You could put text like the following at the top of the unwanted tip.

'''TODO This tip should be merged into [[Name of wanted tip]].'''

On the wanted tip, you could insert a comment (before any existing comments), like this:

'''TODO This tip should include material from [[Name of unwanted tip]].'''

Simulate the templateEdit

Insert text similar to the template text at the beginning of the tips. Manually add [[Category:Duplicate]] to each tip.


Around Wikia's network

Random Wiki