Vim Tips Wiki
Register
Advertisement

New tips August 2008

This page is an archive listing tips created in August 2008. Please do not edit this page because discussion has finished. If you have any comments, edit the appropriate tip page.

Alternatively, comments can be posted on the mailing list.

Proposed new tip Link Current consensus
Check and set alternate value for set options discuss Merged to VimTip37
Converting variables to camelCase discuss Keep
Detect window creation with WinEnter discuss Keep
Display output of shell commands in new window discuss Keep
Edit a file or jump to it if already open discuss Keep
Indenting for Qt C++ discuss Keep
Recreate tempfile directory discuss Keep
Redirect K command or perl files to perldoc (K-lookup manual page) discuss Merged to VimTip461
Using VimBall with make discuss Keep
Verbose Regular Expressions for Vim discuss Delete

Check and set alternate value for set options[]

Merged to VimTip37. JohnBeckett 00:55, 5 April 2009 (UTC)


Perhaps merge to 37 Managing boolean options? --JohnBeckett 03:05, 13 January 2009 (UTC)


I don't think so. VimTip37 is a nice concise tip about boolean options. Adding things beyond that scope would only detract from the tip. I would put a "see also" in both tips for the other one, however.

This tip should probably be renamed (though I don't have any immediate suggestions) and kept. It isn't the most useful thing in the world, but it isn't bad. If we find a better tip to merge this into, I'd be all for that. --Fritzophrenic 19:55, 14 January 2009 (UTC)


The problem is that each tip is quite short, and already contains a little bit more than its title suggests (37 refers to setting a nonboolean option to its default, and the new tip refers to toggling the number option, which is the example shown in 37). Any good editor who encountered one of these tips would itch to add further information (thus compounding the duplication).

How about renaming 37 to "Managing set options" (and keep original title as redirect), and putting a heading "Boolean options" above the current tip, then a new section with the information from the new tip (i.e. merge them)? Please let me know what you think of this idea. I'm happy either way, so long as you realise what I was thinking about. --JohnBeckett 22:42, 14 January 2009 (UTC)


Okay, I like that idea. Basically two different tips on one page. We may want to clean up the example on the new tip though...=~ for the comparison and -= and += rather than simply = would probably be better. This would certainly be better in general, but I never mess with the 'mouse' option so perhaps I'm wrong in this specific case. --Fritzophrenic 20:36, 1 February 2009 (UTC)

Converting variables to camelCase[]

Keep Pretty weak, but I have expanded the wording so it is understandable for passers by. The candidates for merging (VimTip1016 and VimTip1527) are not really suitable. JohnBeckett 05:11, 5 April 2009 (UTC)

Detect window creation with WinEnter[]

This works fine, I use it for a few things in my .vimrc. Not too common of a problem, but a useful tip nevertheless. --Fritzophrenic 22:25, 12 January 2009 (UTC)

Keep. --JohnBeckett 03:05, 13 January 2009 (UTC)

Display output of shell commands in new window[]

Keep (have renamed; was originally "Display shell commands' output on Vim window"). JohnBeckett 00:55, 5 April 2009 (UTC)

I think this tip rocks and should be kept!!! LightKnight 07:22, 8 September 2008 (UTC)
This was discussed on the GIT mail list. Some improvements to the original script have been made. Refer to http://marc.info/?t=122073004900001 for more information.
It looks good to me. Merge in any improvement from the link and keep, after a rename to remove punctuation ("Display output of shell commands in new window"?). --Fritzophrenic 22:25, 12 January 2009 (UTC)
Agree (rename as above and keep). I quickly looked through the git mailing list link, and my guess is that all enhancements have been included here. --JohnBeckett 03:05, 13 January 2009 (UTC)

Edit a file or jump to it if already open[]

I did not know about the :drop command when I wrote this tip. I don't think it does anything not offered by :drop and :tab drop. Do we want to delete it or completely rewrite it to point out :drop and :tab drop? I would lean toward deleting it. --Fritzophrenic 18:45, 30 December 2008 (UTC)

I've rethought...we should rewrite it to demonstrate the :drop command. :drop is hardly an obvious thing to search the help for, and the problem is common enough that we really need something that people can find if they search for it. --Fritzophrenic 22:25, 12 January 2009 (UTC)
Keep. No tips discuss :drop. --JohnBeckett 03:05, 13 January 2009 (UTC)

Indenting for Qt C++[]

Keep Have put a todo in tip. We don't have anything similar for Qt C++, so this can be the tip for all related information. JohnBeckett 09:05, 5 April 2009 (UTC)


This tip doesn't work very well. It seems to work on some code, but doesn't on other code. IMO, it clearly needs more work to become publishable.


Luckily, indentation is something easy to fix by hand if the indent script isn't perfect. Also, just because a tip doesn't work in all cases doesn't mean we shouldn't keep it. I say we keep it, with a note in the comments that it "doesn't work" on all code (though, what does it do that is unexpected? What cases does it fail in? Just stating that it "doesn't work" is fairly useless). If the quality is very bad (which it doesn't look like, becase "it seems to work on some code," then we could consider removing it or applying a "dodgy" template. From what I know at the moment, however, I say keep. --Fritzophrenic 16:34, 14 January 2009 (UTC)

Keep. I'm reluctant to keep a tip which obviously needs to be fixed (it says to put a permanent change to indentexpr in your vimrc), but we have to move on.
I may have just changed my mind. I notice that it was the tip author who wrote the first comment above ("This tip doesn't work very well...").
Fritzophrenic: What do you think in view of the author's opinion? --JohnBeckett 22:42, 14 January 2009 (UTC)

Recreate tempfile directory[]

Keep (have renamed; was originally "Recreate Tempfile Directory"). JohnBeckett 09:05, 5 April 2009 (UTC)

Keep, but rename for our naming conventions for the case of words (e.g. Recreate tempfile directory). I don't know how common this problem is, but I see no reason to remove the tip. No doubt someone will find it useful. --Fritzophrenic 16:30, 14 January 2009 (UTC)
Keep. While I can't imagine working on a system where you need to recreate directories because something has deleted them (what other things are broken!?), the tip has some interest. Yes, I'll rename it. --JohnBeckett 22:42, 14 January 2009 (UTC)
It might be "the normal way of Unix": nothing broken, but a cron-daily or cron-weekly job "cleaning" the /tmp/ directory by removing anything older than X days. Doesn't sound unlikely to me -- and if you have a Vim session that has been running for more than those same X days without accessing any "temporary" file, and you suddenly try to... well, if Vim doesn't spontaneously recreate a tempfile directory that was swept away from under it, then you've got it. --Tonymec 01:43, September 11, 2009 (UTC)

Redirect K command or perl files to perldoc (K-lookup manual page)[]

Merged to 461 Open a Perl module from its module name (and added todo that need to rename 461, and merge in 614 Perldoc function and module keyboard mappings, and clean up). JohnBeckett 05:11, 5 April 2009 (UTC)

Using VimBall with make[]

Keep (have renamed; was originally "Using VimBall with 'Make'"). JohnBeckett 00:55, 5 April 2009 (UTC)

I like it! -- Chip Campbell

Verbose Regular Expressions for Vim[]

I don't see much of a point to this one. It may as well be called "Comment your Vim script so you know what your regexes do". It is good advice, but is it worth having a tip for? Personally, I think not. Recommendation: delete --Fritzophrenic 22:27, 12 January 2009 (UTC)


Advertisement