hermitte wrote: > Why not being even more crazy? We could add a "Categories=" > option to {{vimtip}} This way the template can take care of > sorting all the categories the way we want. And nobody is > disturbed by category lines in the text of the tip.
I have edited these templates so we can now put categories inside the template: Template:TipImported Template:TipNew Template:TipProposed Example usage is at these pages: http://vim.wikia.com/wiki/Run_Vim_command_on_current_C/C%2B%2B/Java_function http://vim.wikia.com/wiki/Automatically_create_and_update_cscope_database http://vim.wikia.com/wiki/Continue_omnicompletion_for_python_modules Don't bother modifying tips (by all means, try it, but don't go to any trouble). I will convert all the existing tips to the new system using a bot (somehow ... details to be decided). As discussed, this will mean: 1. There won't be any [[Category:xxx]] lines at the bottom of a tip - lines that newbies find mysterious, and which cause trouble when a comment is added. 2. Category lines will be in a specific place (in the tip template at the top), so we won't have to look for them. And they won't be in the middle of a tip (which can again confuse new editors). Syntax is pretty simple. A tip may have: {{TipImported |id=123 ... |rating=53/17 }} You can insert up to six categories like this: {{TipImported |id=123 ... |rating=53/17 |category1=Folding |category2=Python |category4= }} Note that category4 is blank, and category3, category5 and category6 are missing. That does not cause problems. This tip would be in categories Folding and Python (and VimTip). Please put the categories just before the "}}" as shown above (the "}}" should be on a line by itself). I recommend putting categories in alphabetical order (that saves wondering what order to use, and makes comparing categories in different tips a tiny bit easier). I couldn't see how to have "categories=Folding|Python" inside the tip template. I thought about having another template, so you would put: {{Categories|Folding|Python}} {{TipImported |id=123 ... }} But in the end I decided that "category1" etc was simpler. For one thing, I intend having the bot add one or two empty category lines, to make editing easier (like the "category4" example above). One thing I'm not sure about is whether we could set the sort order for a category. We're not doing that, so I decided not to worry about it. If wanted, template {{!}} might help, or if really desperate, you could fallback to having a separate [[Category:Folding|Sort key]] line. John _______________________________________________ Vim-l mailing list Vim-l@wikia.com http://lists.wikia.com/mailman/listinfo/vim-l