Vim Tips Wiki

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.


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 number

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 delete

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:

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

Insert to-do notes

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 template

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