From DKerns at westell.com Wed Mar 18 18:28:30 2009 From: DKerns at westell.com (David T. Kerns) Date: Wed, 18 Mar 2009 13:28:30 -0500 Subject: [Vim-l] smart parsing preprocessor #if for comment highlighting Message-ID: <6C038E686DC4D648A881B4634A58E59D26518BFA30@EXMB1.corp.westell.com> I looked through archive (2007-August - 2009-February) but didn't find this question/topic addressed: I really like the way vim highlights the code #if 0 this is colored as a comment #else this is not #endif however, the converse is not true #if 1 this has no special highlighting #else this also has no special highlighting #endif It seems pretty straight forward that the phrase "this also has no special highlighting" could safely be highlighted as a comment. Along these lines, what would REALLY be nice is if vim could be "handed" a project file with definitions like: OPTION3=true FEATURE29=false MYDEBUG=true and then highlight the following code as appropriate (pre-processed code as a comment) #if defined(OPTION3) && defined(FEATURE29) this is commented #else this is not #endif #ifndef MYDEBUG this is a comment #endif Is any of this possible today? *************************************************************************************** This e-mail and its attachments are a private communication sent from Westell Technologies, Inc., a telecommunications company. Its contents may contain confidential and proprietary information that is protected. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the information contained in or attached to this message is strictly prohibited. If you have received this e-mail in error, please notify the sender by replying to this message, and then delete it from your system. Thank you. From johnb.beckett at gmail.com Thu Mar 19 00:52:45 2009 From: johnb.beckett at gmail.com (John Beckett) Date: Thu, 19 Mar 2009 11:52:45 +1100 Subject: [Vim-l] smart parsing preprocessor #if for comment highlighting In-Reply-To: <6C038E686DC4D648A881B4634A58E59D26518BFA30@EXMB1.corp.westell.com> References: <6C038E686DC4D648A881B4634A58E59D26518BFA30@EXMB1.corp.westell.com> Message-ID: David T. Kerns wrote: > I really like the way vim highlights the code > > #if 0 > this is colored as a comment > #else > this is not > #endif > > however, the converse is not true > > #if 1 > this has no special highlighting > #else > this also has no special highlighting > #endif I suspect "#if 0" is treated as a special case because it is commonly used and is easy to parse. Using "#if 1" is not so common, and "#if MYOPTION" couldn't reasonably be parsed. This mailing list is for discussing the Vim Tips wiki (how to use it, what might be done to improve it). For example, soon I will be announcing that I intend to delete the tips proposed for deletion, and I'll give a weeks notice here to let people decide if they want to save a tip. On the following page you will find info about the mailing list for asking questions about Vim (you would get a more definitive answer there): http://vim.wikia.com/wiki/Vim_Tips_Wiki:Community_Portal When using a mailing list, it's best to use a mail account that does NOT add a disclaimer. Your disclaimer is not particularly long, but sending a disclaimer to a list of 2000 people (the Vim list) is not desirable. John From johnb.beckett at gmail.com Thu Mar 19 01:13:02 2009 From: johnb.beckett at gmail.com (John Beckett) Date: Thu, 19 Mar 2009 12:13:02 +1100 Subject: [Vim-l] Auto welcome Message-ID: <41FA915A6CAE403BB9A4C59D7D1FA881@quartz> Any thoughts on the new auto-welcome system Wikia has introduced? We can configure the text it uses, and we can disable it (I'm a bit suspicious of anything cutsey, and my inclination is to disable it, but maybe I'm too curmudgeonly). One minute after a new user (registered or just an IP address) edits a page, their user page is automatically created (if a registered user), and a message is put on their talk page. Example: http://vim.wikia.com/wiki/User_talk:83.83.187.191 These four settings configure how it works: http://vim.wikia.com/wiki/MediaWiki:Welcome-message-user http://vim.wikia.com/wiki/MediaWiki:Welcome-message-anon http://vim.wikia.com/wiki/MediaWiki:Welcome-user-page http://vim.wikia.com/wiki/MediaWiki:Welcome-user Welcome-message-user: Text put on new user's Talk page. Welcome-message-anon: Same, for IP addresses (not registered). Welcome-user-page: Text put on new user's User page. Welcome-user: configuration; one of following: "@latest" = message signed by admin who did most-recent edit Username = message signed by this user "@disabled" = no welcome messages Details (also two other new "features"): http://www.wikia.com/wiki/Forum:New_features_coming_on_Wednesday John From fritzophrenic at gmail.com Thu Mar 19 17:07:36 2009 From: fritzophrenic at gmail.com (Benjamin Fritz) Date: Thu, 19 Mar 2009 12:07:36 -0500 Subject: [Vim-l] Auto welcome In-Reply-To: <41FA915A6CAE403BB9A4C59D7D1FA881@quartz> References: <41FA915A6CAE403BB9A4C59D7D1FA881@quartz> Message-ID: On Wed, Mar 18, 2009 at 8:13 PM, John Beckett wrote: > Any thoughts on the new auto-welcome system Wikia has introduced? We can > configure the text it uses, and we can disable it (I'm a bit suspicious > of anything cutsey, and my inclination is to disable it, but maybe I'm > too curmudgeonly). > I have some thoughts. My first thought was, "why did it automatiacally use my name for the welcome post"? I'm ok with that, though you're a bit more active than I am, John. I wouldn't be adverse to including a few regulars on the welcome message though. It looks like we need to have SOMEONE sign the message, so the default @latest should work for that, but we could link to an "active contributors" page or something in the text. Secondly, I like the idea in general. We pretty much do it anyway, with our templated welcome text. I think we should automatically apply this existing text to any new _registered_ users. I do think, however, that creating user pages for annonymous users is just plain stupid. We should disable this particular message. > Details (also two other new "features"): > http://www.wikia.com/wiki/Forum:New_features_coming_on_Wednesday I also think we should disable the "category select", at least until we can revamp our tip templates. Otherwise it will get confusing where to put the categories. From fritzophrenic at gmail.com Thu Mar 19 19:25:01 2009 From: fritzophrenic at gmail.com (Benjamin Fritz) Date: Thu, 19 Mar 2009 14:25:01 -0500 Subject: [Vim-l] Auto welcome In-Reply-To: References: <41FA915A6CAE403BB9A4C59D7D1FA881@quartz> Message-ID: On Thu, Mar 19, 2009 at 12:07 PM, Benjamin Fritz wrote: > > Secondly, I like the idea in general. We pretty much do it anyway, > with our templated welcome text. I think we should automatically apply > this existing text to any new _registered_ users. > > I do think, however, that creating user pages for annonymous users is > just plain stupid. We should disable this particular message. > It doesn't look like it is actually possible to disable the message for unregistered users only. I have asked for clarification on that forum page, we'll see what happens. I REALLY don't want a new page on the wiki for each and every IP address used to edit annonymously, nor do I want a welcome page created for me if I accidentally forget to log in, nor do I think any annonymous user is going to notice a welcome page created for their IP address. From johnb.beckett at gmail.com Thu Mar 19 21:00:32 2009 From: johnb.beckett at gmail.com (John Beckett) Date: Fri, 20 Mar 2009 08:00:32 +1100 Subject: [Vim-l] Auto welcome In-Reply-To: References: <41FA915A6CAE403BB9A4C59D7D1FA881@quartz> Message-ID: Benjamin Fritz wrote: > Secondly, I like the idea in general. We pretty much do it > anyway, with our templated welcome text. Hmmm. I'll look at putting the text of {{subst:welc}} on the new auto welcome. We may as well run with it for a while, but it will cause trouble. I'm sure you've noticed a new registered user who created a tip with a long copyright/disclaimer. That user got a gushing auto welcome signed by me. However, I would have done a manual welcome with a hint that there was going to be a need to sort out the issue, because as far as I'm concerned, I don't want a new tip with ANY copyright/disclaimer. I don't even want an author line, although if a script is truly remarkable I'll wear it. We have many excellent scripts with no need for an author or copyright. Yes, the new "add category" button is another problem and I would like a way to turn it off for the whole wiki. However, I already do a bunch of manual editing on each accepted new tip, so fiddling with dumb categories is not a big deal. We'll see if people adding categories to existing tips is a problem. John From fritzophrenic at gmail.com Tue Mar 24 02:51:29 2009 From: fritzophrenic at gmail.com (Benjamin Fritz) Date: Mon, 23 Mar 2009 21:51:29 -0500 Subject: [Vim-l] Auto welcome In-Reply-To: References: <41FA915A6CAE403BB9A4C59D7D1FA881@quartz> Message-ID: On Thu, Mar 19, 2009 at 4:00 PM, John Beckett wrote: > Hmmm. I'll look at putting the text of {{subst:welc}} on the new auto > welcome. We may as well run with it for a while, but it will cause > trouble. I'm sure you've noticed a new registered user who created a tip > with a long copyright/disclaimer. That user got a gushing auto welcome > signed by me. However, I would have done a manual welcome with a hint > that there was going to be a need to sort out the issue, because as far > as I'm concerned, I don't want a new tip with ANY copyright/disclaimer. > I don't even want an author line, although if a script is truly > remarkable I'll wear it. We have many excellent scripts with no need for > an author or copyright. > I agree, and yes, I noticed. I've tried to update the auto-greeting with our existing welcome text and a note that we'll probably be dropping a message soon with any concerns or suggestions. We'll see soon (hopefully) whether it looks ok or not. I originally intended to also automatically put in a flag for deletion on the annonymous user greetings. I think it would be ok to have that greeting enabled as long as we delete it right away (within a few days of creation). But, I don't know how to do this without also flagging the greeting page itself for deletion. My post to the forum page requesting info about disabling just one message or the other was answered with "we're working on that feature," so perhaps it isn't worth the trouble. > Yes, the new "add category" button is another problem and I would like a > way to turn it off for the whole wiki. However, I already do a bunch of > manual editing on each accepted new tip, so fiddling with dumb > categories is not a big deal. We'll see if people adding categories to > existing tips is a problem. > I guess, since it is probably fairly easy to correct the format, that encouraging people to add categories to tips can only be a Good Thing. I'd leave it enabled and just decide what to do with our tip templates later. From johnb.beckett at gmail.com Tue Mar 24 04:02:25 2009 From: johnb.beckett at gmail.com (John Beckett) Date: Tue, 24 Mar 2009 15:02:25 +1100 Subject: [Vim-l] Auto welcome In-Reply-To: References: <41FA915A6CAE403BB9A4C59D7D1FA881@quartz> Message-ID: Benjamin Fritz wrote: > I agree, and yes, I noticed. I've tried to update the > auto-greeting with our existing welcome text and a note that > we'll probably be dropping a message soon with any concerns > or suggestions. That was a nice comment you added to the tip. Now we've got a case where a user created a talk page for a tip (to say "good"), and the user got a welcome! I tweaked the welcome message so it will show Hi, welcome to the Vim Tips wiki! instead of Hi, welcome to Vim Tips Wiki! Is there a reason for the ':' in the message: Thanks for your edit to the [[:$1]] page Re the anonymous user greetings, I think it would look a bit strange for a user to find any sort of welcome on a page with a "delete" box. However, the forum page has been updated with a new setting: MediaWiki:Welcome-enabled default: "page-user message-anon message-user" page-user creates user page for logged-in contributors message-anon adds welcome messages for anon users message-user adds welcome messages for logged-in users So we could change it to "page-user message-user" so anonymous users are NOT welcomed. I'm happy to let it run for a couple of weeks and decide later. John From beesley at gmail.com Tue Mar 24 04:11:45 2009 From: beesley at gmail.com (Angela) Date: Tue, 24 Mar 2009 15:11:45 +1100 Subject: [Vim-l] Auto welcome In-Reply-To: References: <41FA915A6CAE403BB9A4C59D7D1FA881@quartz> Message-ID: <8b722b800903232111u74d5fa9dwddf50a8edeceb67e@mail.gmail.com> The welcome tool has some new options which you can read about on http://vim.wikia.com/index.php?oldid=22402 The colon in [[:$1]] is used so that when someone's edit is to an image or category page, it will show a link to that page instead of actually displaying the image or placing the page into that category. Angela From johnb.beckett at gmail.com Tue Mar 24 06:45:10 2009 From: johnb.beckett at gmail.com (John Beckett) Date: Tue, 24 Mar 2009 17:45:10 +1100 Subject: [Vim-l] Auto welcome In-Reply-To: <8b722b800903232111u74d5fa9dwddf50a8edeceb67e@mail.gmail.com> References: <41FA915A6CAE403BB9A4C59D7D1FA881@quartz> <8b722b800903232111u74d5fa9dwddf50a8edeceb67e@mail.gmail.com> Message-ID: Angela wrote: > The welcome tool has some new options which you can read about on > http://vim.wikia.com/index.php?oldid=22402 > > The colon in [[:$1]] is used so that when someone's edit is > to an image or category page, it will show a link to that > page instead of actually displaying the image or placing the > page into that category. Thanks Angela. Interestingly, the creation of the User:Wikia and User_talk:Wikia pages does not appear in Recent Changes, so I didn't notice that there was some documentation on the talk page. RC does show your edit to update the info on the user page. John From fritzophrenic at gmail.com Tue Mar 24 13:54:17 2009 From: fritzophrenic at gmail.com (Benjamin Fritz) Date: Tue, 24 Mar 2009 08:54:17 -0500 Subject: [Vim-l] Auto welcome In-Reply-To: <8b722b800903232111u74d5fa9dwddf50a8edeceb67e@mail.gmail.com> References: <41FA915A6CAE403BB9A4C59D7D1FA881@quartz> <8b722b800903232111u74d5fa9dwddf50a8edeceb67e@mail.gmail.com> Message-ID: On Mon, Mar 23, 2009 at 11:11 PM, Angela wrote: > The welcome tool has some new options which you can read about on > http://vim.wikia.com/index.php?oldid=22402 > Thanks, I saw those this morning (before I checked this thread actually). I've gone ahead and removed the automated greeting for annonymous users (I doubt most people log in using the same IP more than a few times, so I don't think it will result in anything but extra work for us). I also noticed the new @sysop option in MediaWiki:Welcome-user. I'm leaning toward using it, but I'm not QUITE sure what it does. To clarify, with @latest, Wikia janitors, etc. would potentially be the one to leave the greeting, but with @sysop, only (supposedly) active members of our own wiki would ever sign the welcome message? > The colon in [[:$1]] is used so that when someone's edit is to an > image or category page, it will show a link to that page instead of > actually displaying the image or placing the page into that category. > Good to know, thanks. I would have missed that! -- Ben From fritzophrenic at gmail.com Tue Mar 24 13:58:47 2009 From: fritzophrenic at gmail.com (Benjamin Fritz) Date: Tue, 24 Mar 2009 08:58:47 -0500 Subject: [Vim-l] Auto welcome In-Reply-To: References: <41FA915A6CAE403BB9A4C59D7D1FA881@quartz> Message-ID: On Mon, Mar 23, 2009 at 11:02 PM, John Beckett wrote: > Now we've got a case where > a user created a talk page for a tip (to say "good"), and the user got a > welcome! > I actually think this is a good thing. We'll give a nice welcome even to contributors we may have mostly ignored in the past, and we can always (as you did) respond appropriately to issues we may have. > I tweaked the welcome message so it will show > ?Hi, welcome to the Vim Tips wiki! > instead of > ?Hi, welcome to Vim Tips Wiki! > Good change. I've tweaked it again to add the username: Hi JohnDoe, welcome to the Vim Tips wiki! > Re the anonymous user greetings, I think it would look a bit strange for > a user to find any sort of welcome on a page with a "delete" box. You have a point. I did think of that, and was trying to add the delete template to the *bottom* with a nice long reason for deletion, but realized that doing this would also flag the settings page itself for deletion. I've gone ahead and disabled annonymous greetings, so this is a moot point for now unless we decide to re-enable them later. From beesley at gmail.com Tue Mar 24 15:00:28 2009 From: beesley at gmail.com (Angela) Date: Wed, 25 Mar 2009 02:00:28 +1100 Subject: [Vim-l] Auto welcome In-Reply-To: References: <41FA915A6CAE403BB9A4C59D7D1FA881@quartz> <8b722b800903232111u74d5fa9dwddf50a8edeceb67e@mail.gmail.com> Message-ID: <8b722b800903240800te01fb8cy34751258e62aa449@mail.gmail.com> > I also noticed the new @sysop option in MediaWiki:Welcome-user. I'm > leaning toward using it, but I'm not QUITE sure what it does. To > clarify, with @latest, Wikia janitors, etc. would potentially be the > one to leave the greeting, but with @sysop, only (supposedly) active > members of our own wiki would ever sign the welcome message? We don't currently have any janitors. If you use @latest and a staff member has edited the wiki more recently that an admin, the welcome would be signed by the staff member. If you use @sysop, the message will always be signed by an admin and never by a staff member. I'd recommend @sysop for an active wiki like this one. Angela