History
Forum Edit this page Discussion

Forum:Template for duplicates

From Vim Tips Wiki

Jump to: navigation, search
Forums: Index > Help desk > Template for duplicates


[edit] Want template to flag duplicate tips

A template to flag duplicate or similar tips in a clear way would be nice. For example, VimTip514 and "Automatically_add_ifndef_..._to_a_C_header_file" [now deleted because merged to 514] cross-reference themselves in the comments, but it would be better to do it using a template (before actually merging them). The same could be done for VimTip1454, VimTip1296, and maybe VimTip945. The examples are countless...

Maybe someone good at writing templates could create a "SimilarWith" or "Duplicate" one?

Ipkiss 11:53, 21 July 2007 (UTC)

BTW, I don't know if such kind of magic can be done, but it would be nice that the cross-references are automatically transitive. For example, if Tip 1 references explicitely Tip 2, and Tip 2 references Tip 3, Tip 1 would then reference Tip 3. Since it it s symmetric relation, it would be even better to have Tip 3 reference Tip 1 and Tip 2. OK, I may be dreaming :) Ipkiss 12:43, 21 July 2007 (UTC)


Suppose it was possible to write a nice template so when you look at tip X you see a list of links to similar tips Y and Z. Would it be worthwhile?

I think you're noticing that often tips X, Y and Z are pretty weak, and should be merged. My aim is to delete as much junk as possible so we end up with a reasonable number of useful tips.

In particular, I don't want people to spend time polishing redundant tips. I didn't check all your examples, but the first is crying out for severe pruning (merge any decent ideas into one tip, and delete the others).

I've just finished implementing some editing guidelines that should help explain what I'm going to recommend (I haven't actually used the guidelines myself yet).

Go to VimTip1 and click the "general review" link in the Review box at the top. You will see info on merging tips, and a link to "Deleting a tip". What do you think?

--JohnBeckett 14:37, 21 July 2007 (UTC)


There are 2 big parts about merging tips:

  • detection of the duplication
  • actual merging

My point is that one doesn't necessarily want to do both at the same time. As said in the Comments_guidelines: The longest journey begins with a single step...

Personally, I prefer to do similar actions together. For example, there are so many uncategorized tips that I prefer categorizing them by bunches, barely looking at what they do, without more clean-up. Then, in a later step, I can go in a category and clean the tips one by one, doing merging if needed. So if in the first phase I notice some duplication, I prefer to note it in the tip and move on.

The detection of the duplication is already useful by itself, because it warns other people not to spend too much time cleaning the tip without looking at the similar ones. It could also allow grouping such tips in a NeedsMerging category.

But if it's too much work to write the template, I can live with this and add the comments manually.


BTW, there should probably be a section in the guidelines listing the various useful templates (Script, in particular).

Ipkiss 15:43, 21 July 2007 (UTC)


OK - I see what you mean. It's useful to tag 'todo' work in a batch fashion, particularly if that warns others that the duplicates need to be fixed/merged.

Bear in mind that a month ago I was a wiki newcomer, but I think that templates are pretty crude. They can do simple arithmetic, and tests for string equality, but that's all - no variables, no logic. Their only clever feature is the ability to have named parameters with a default value.

Say tips 1 and 5 are duplicates. We could manually put {{Duplicate|5}} in tip 1, and {{Duplicate|1}} in tip 5.

You could allow more parameters, say {{Duplicate|5|50|100}} in tip 1.

What would you want Template:Duplicate to do?

  1. Add Category:TodoMerge to the tip.
  2. Include links to the duplicates.
  3. Display a fairly prominent message that the duplicates need to be fixed or merged.

Do you think a box at the top of the tip is warranted? Or a box where the Duplicate template is used, or just a simple couple of lines of text? Any suggestion for the wording?

Re transitive referencing: I'm pretty sure it's not feasible.

--JohnBeckett 02:00, 22 July 2007 (UTC)


I would like the template to do all what you listed. It doesn't need to be a box though, as long as it is "visible enough". But a box wouldn't hurt in my opinion, as a user may want to have a look at the duplicates as well.

For the wording, what about something as simple as "This tip is very similar to the following tip(s): Link1, Link2. They need merging."?

Ipkiss 10:18, 22 July 2007 (UTC)


Done - I've completed Template:Duplicate - see Vim_Tips_Wiki:Merge_guidelines

--JohnBeckett 22:43, 29 July 2007 (UTC)

[edit] Maybe use vim-l mailing list

Have you seen the vim-l mailing list? It's fairly pathetic in terms of participation at the moment, but this kind of discussion might be better on a list (more readily followed). I don't care, but I'm mentioning it in case you want to join. If you do, bear in mind that the only address obfuscation used is to replace "@" with " at ". Apparently that works, but it doesn't give me much confidence. Click the 'Community portal' link on any page to go to vim-l.

--JohnBeckett 02:00, 22 July 2007 (UTC)


I discovered the mailing-list short after writing the messages in this forum. If I have new topics to open, I will probably post there.

Ipkiss 10:00, 22 July 2007 (UTC)

Hubs Highlights International Sites Wikia messages
Entertainment
Gaming
Cartoons & Comics
Science Fiction
Hobbies
Sports
See all...
Grand Theft Auto
Pushing Daisies
Legend of Zelda Wiki
Terminator Wiki
Everquest II Wiki
Astronomy Wiki
German
Spanish
Chinese
Japanese
More...
Wikia is hiring for several open positions


Vote for featured Wikia!

Send this article to a friend
"Template for duplicates"
 
 
Hi!

I thought you'd like this page from Wikia!

http://vim.wikia.com

Come check it out!
Send confirmation