Vim Tips Wiki

New tips July 2008

This page is an archive listing tips created in July 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
Automatic type along completion (typeahead) discuss Deleted
Bind the tab key for omni complete (requires supertab.vim) discuss Merged to VimTip1486
Command line file name completion discuss Keep
Copy or change search hit discuss Keep
Errorformat for gfortran discuss Merged to VimTip1575
Pim discuss Deleted
Restore the cursor position after undoing text change made by a script discuss Keep
Start vGim as help brouwser discuss Merged to VimTip265
Syntax heredoc highlighting for dosini discuss Merged to VimTip1514
Using elinks with netrw discuss Keep

Please add your comment (sign with ~~~~) below the appropriate heading. Use ---- between comments.

General comments (not for a specific tip)[]

Automatic type along completion (typeahead)[]

It looks like there is a script linked from the tip that accomplishes the same thing. Since the utility of the tip is in doubt, I suggest featuring the script on our scripts page and removing the tip unless someone speaks up for it. --Fritzophrenic 03:33, 27 August 2008 (UTC)

Delete I have added the plugin to featured scripts. Realistically, I don't think this tip will be fixed, so unless someone supports it I think it should be removed. As I mentioned in comments in the tip, the original author of the script (Andreas Politz) said on vim_use that it should not be posted as a working solution. --JohnBeckett 10:13, 4 September 2008 (UTC)

Bind the tab key for omni complete (requires supertab.vim)[]

If we already have a tip on omnicompletion or mapping tab to omnicomplete, we could link the script mentioned from it. If we don't have such a tip, perhaps we should. This one isn't it though, and should probably be removed. Maybe we should feature the script, but I'm not so sure. It seem a pretty simple one. --Fritzophrenic 03:33, 27 August 2008 (UTC)

Merge to 1486 Tip 1486 is Change the pink omnicomplete popup to a readable color and that short tip mentions SuperTab and offers a change to the Pmenu highlight. I suggest renaming 1486 to perhaps "Omni completion popup" and hope that more general info will be added, followed by suggestion re Pmenu and using SuperTab. Think about whether the comment at the bottom of VimTip305 should be removed (seems to duplicate this proposed new tip). --JohnBeckett 10:13, 4 September 2008 (UTC)

Command line file name completion[]

Keep. Has been renamed to title above (was originally Command line filename autocompletion "undo": remove last path component).

Needs a little rewording perhaps, but good enough, and very useful. Should explain how it is better than using <Up> and <Down> in the wildmenu. Quick testing in an older Vim (v7.1.293) indicates to me that <up> or <down> exits the wildmenu, so you can't really do it multiple times very easily. --Fritzophrenic 03:33, 27 August 2008 (UTC)

Keep Should be cleaned as per my comments in tip, but that can be done later. Rename to perhaps "Command line file name completion" to allow tip to be expanded with different content in the future. Related tips follow (I suppose a merge is out of the question?). --JohnBeckett 10:13, 4 September 2008 (UTC)

Copy or change search hit[]

Needs a good amount of rework, but okay to keep. Needs better explanation up front that this will create a text object of sorts. Then an example of what precisely the text object will select. Link it to other text-object tips, and the text object section of the mapping keys in Vim tutorial. --Fritzophrenic 03:33, 27 August 2008 (UTC)

The tip is about a shortcut for a motion. How about another title "end of match motion". Anwo 21:24, 28 August 2008 (UTC)

I'll get around to cleaning this up so we can more easily review its worth. I don't really want to rename it because the point of the tip is to satisfy those of us who cry with frustration when wanting to copy or change a search hit (so I think another title would make it too hard for those people to find). I don't cry about this much, but it is frustrating to see some complex string highlighted by a search, and then wonder how best to process it (often 'cw' or 'yw' works, but sometimes it doesn't, and I hate the distraction of thinking about it). --JohnBeckett 10:13, 4 September 2008 (UTC)

The whole key to this tip is very simple: it basically executes "//e" to bring the cursor to the end of the search hit. This simple fact should be mentioned at the very top of the tip before it goes into the gory details of creating a text object to allow it to be used easily. With this key change, the tip is well worth keeping and anyone can clean it up. --Fritzophrenic 22:16, 12 January 2009 (UTC)

Errorformat for gfortran[]

Merge with Errorformats, and let their fates be combined? --Fritzophrenic 03:33, 27 August 2008 (UTC)

Merge to 1575 (the Errorformats June new tip mentioned by Fritzophrenic). --JohnBeckett 10:13, 4 September 2008 (UTC)


This tip is fairly useless without elaboration. Delete unless someone adds something to it very soon. It doesn't even link to a plugin that it suggests can be found. --Fritzophrenic 03:33, 27 August 2008 (UTC)

Delete unless tip is greatly expanded soon. --JohnBeckett 10:13, 4 September 2008 (UTC)

Restore the cursor position after undoing text change made by a script[]

Clever idea, but what about scripts you have no control over? What about just using marks? There are much better ways to do this. Improve and keep, or remove. Perhaps the author would be interested in improving the tip if we point out better methods? --Fritzophrenic 03:33, 27 August 2008 (UTC)

Keep As Fritzophrenic points out, the title is a bit ambitious: tip is really a suggestion for writing your own script. However, I think that in the absence of a better alternative, we should keep the title as is for now. I wonder if there is any functionality in Vim to handle this rather than the klunky insertion and deletion of a character (like the different stuff in Recover from accidental Ctrl-U). Using a mark in the script of course would clobber the mark. Perhaps in the future this tip could hold other info on working with undo in a script (is there anything more?). --JohnBeckett 10:13, 4 September 2008 (UTC)

Start vGim as help brouwser[]

First of all, rename tip to correct spelling. Fix up as suggested in the comments, then keep. It's fairly useful for now. When we make a command-line tip or category, this would be a good tip for it. It demonstrates the -c switch rather well with a simple example. --Fritzophrenic 03:33, 27 August 2008 (UTC)

Merge to VimTip265 Tip 265 overcomes some difficulties I have with the proposed new tip. My problems:

  • Is the text in the first para "(see :help help for creating your own help text)" correct?
  • The text about using :hide in the second para should be replaced with a quick statement to use :only.
  • What is the point of the tip? Why would I want to have an alias to show help on a fixed keyword?
  • If the intention is that you would pass a parameter to the alias, shouldn't a tip actually show that?

These tips attempt to deal with making your own help text:

These tips relate to using 'vim -c' (tip 265 covers the material best):

--JohnBeckett 05:55, 3 October 2008 (UTC)

Syntax heredoc highlighting for dosini[]

Keep for now, but don't assign a tip ID yet. If dosini (whatever it is) actually does support heredoc, this should be submitted on vim_dev and to the syntax maintainer as a patch, rather than as a tip here. If the maintainer indicates that he/she will not apply the patch, the tip can remain. --Fritzophrenic 03:33, 27 August 2008 (UTC)

Defer as per Fritzophrenic. Note that we have a related Dosini folding tip. I wonder if merging is appropriate? --JohnBeckett 10:13, 4 September 2008 (UTC)

At the very least, it needs a rename. The tip is not about using heredoc in dosini (i.e. "DOS init") files, but about using heredoc-style parameter settings in dosini files. I have posted to vim_use for advice on this tip, as I know nothing about this syntax:

--Fritzophrenic 20:23, 1 February 2009 (UTC)

Google shows that this tip came from here, and that no one else uses the terms "dosini" and "heredoc". Windows does not support heredoc ini files. Many other systems have similar files; I suppose that many of them support heredoc, but I think replacing "A lot of INI parsers" with "Some INI parsers" would be reasonable. Google shows that "ini" and "heredoc" commonly apply to php.ini.

Why not just add this material to the Dosini folding tip, and rename the new tip to "Heredoc syntax highlighting" and make it a redirect to 1514? If you don't like that, just keep this tip. --JohnBeckett 23:10, 1 February 2009 (UTC)

I have merged the proposed new tip into Dosini folding. I propose rename "Dosini folding" to "Dosini files" (and will keep the "Dosini folding" and "Syntax heredoc highlighting for dosini" titles as redirects). Let me know if any objections. JohnBeckett 10:38, 25 March 2009 (UTC)

Using elinks with netrw[]

Keep? Put in Category:Integration somewhere. --Fritzophrenic 03:33, 27 August 2008 (UTC)

Think about merging. This proposed new tip would be fine as-is, except that we have lots of tips on similar topics. Most of the others attempt to open a URL in a browser, and so are not the same, but there is something in Preview HTML files quickly that looks similar (I haven't taken the time to read it yet). --JohnBeckett 10:13, 4 September 2008 (UTC)

This one seems solid enough, and we have enough of a backlog, that I'd just keep it for now. Put a todo in the tip to consider merging to another "open in browser" tip, and put in a "see also" section. --Fritzophrenic 04:44, 18 January 2009 (UTC)