Vim Tips Wiki
Advertisement

New tips 2013 PreviousNext

For each proposed new tip:

  • Is it worth keeping as a separate tip?
  • Should it be merged into an existing tip? Which?
  • If it should be kept, is it ready for release? Which points need fixing? Should it be renamed?

Please edit this page (not the talk page) in the appropriate section below the following table.

Proposed new tip Link Current consensus
Act on text objects with custom functions discuss -
Automatic session restore in git directories discuss -
Fast buffer navigation by buffer numbers discuss -
Fix .vimrc discuss -
Folding for diff files discuss -
Follow Help Tags Using Ctags discuss -
Graphics and Drawing in vimscript discuss -
Python script utf8 encoding discuss -
Ubuntu 13.04, Vim, Gvim and Commnand-T discuss -
Use "set report=0" to always display "lines Xed" on message line discuss -
Use (and maintain) a single set of configuration files discuss -
Vim vlc controller and lyric synchronizer discuss -
Write multiple copies of the currently edited file discuss -

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

General comments (not for a specific tip)[]

Since these pages have existed for a long time, we shold not delete any of the titles except if we decide to delete the tip. Some of the titles need to be fixed or perhaps the tip needs to be merged, but we would keep the old title as a redirect. JohnBeckett (talk) 09:27, February 1, 2014 (UTC)

Act on text objects with custom functions[]

  • August 11, 2013
  • Keep: Interesting and has explanation. I haven't tried it but looks like good to release without change. JohnBeckett (talk) 09:27, February 1, 2014 (UTC)

Automatic session restore in git directories[]

  • February 5, 2013
  • Keep: Looks ok without change. JohnBeckett (talk) 09:27, February 1, 2014 (UTC)

Fast buffer navigation by buffer numbers[]

  • February 5, 2013
  • Investigate related tips below. The info is in 135 but it is lost there.
JohnBeckett (talk) 09:27, February 1, 2014 (UTC)

Fix .vimrc[]

  • July 16, 2013
  • No idea what to do with this as the title is totally misleading, but I can't think of a better one. I do not use Cygwin but would speculate that reading the docs would be more useful. What is "setup.exe"? Perhaps merge with something in Category:Cygwin? JohnBeckett (talk) 09:27, February 1, 2014 (UTC)

Folding for diff files[]

  • June 24, 2013
  • Is this useful? What does it do? Folding has basic info. I suppose the tip could be kept as-is since anything useful about folding for diff files can be added here in the future. JohnBeckett (talk) 09:27, February 1, 2014 (UTC)

Follow Help Tags Using Ctags[]

  • January 19, 2013
  • Probably keep as-is although a little more explanation would be useful (isn't this more an emulation of help tags?). The "The problem" section has links to the two related tips. JohnBeckett (talk) 09:27, February 1, 2014 (UTC)

Graphics and Drawing in vimscript[]

  • July 31, 2013
  • I can't see the point of this. JohnBeckett (talk) 09:27, February 1, 2014 (UTC)

Python script utf8 encoding[]

  • March 17, 2013
  • Keep as is, although the "see also" link might be improved because it seems to land in the middle of a thread where not much is shown. JohnBeckett (talk) 09:27, February 1, 2014 (UTC)

Ubuntu 13.04, Vim, Gvim and Commnand-T[]

  • August 3, 2013
  • Delete? As the comments hint, a lot of the problems seem just the normal hassle that people have. Something went wrong, no one knows why, but the explanations are missing something. At any rate, it is too specific a problem that is unlikely to be used much. JohnBeckett (talk) 09:27, February 1, 2014 (UTC)

Use "set report=0" to always display "lines Xed" on message line[]

  • October 22, 2013
  • Keep because I don't think we have a tip mentioning 'report'. The title is useless because a person needing this would have no idea to search for "set report=0". The tip needs considerable work, but it is a start. JohnBeckett (talk) 09:27, February 1, 2014 (UTC)

Use (and maintain) a single set of configuration files[]

  • July 18, 2013
  • I'm not quite understanding this. It seems to be for people who have Vim installed in different things, but where each thing is able to always access the one set of files. The tip stops before it says anything useful, but I can't find any other tip that has an explanation of has() and exists() so could be persuaded to keep this. How about rename to "Using a single set of configuration files" and hope it gets fixed in the future? JohnBeckett (talk) 09:27, February 1, 2014 (UTC)
  • Hi, sorry for replying so late (I completely forgot I had proposed this tip). Yes, it is meant for people who use e.g. several virtual machines, or Windows and Cygwin, etc. I agree with changing the title to "Using...", since the advice I was giving was not to avoid duplicating configuration files (which people should already aim at), but how to do that in Vim. Why do you say the tip says nothing useful and must be "fixed"? Gennaro.prota (talk) 14:09, 6 March 2022 (UTC)
  • I'm still here! This is now Using a single set of configuration files. I had not thought of virtual machines where this would be useful although VMs that I have used have been fully isolated so you would need to use file sharing to access files on the host computer. This wiki has very few editors so please remove the template at the top and do whatever else you want with the tip. You might like to link to File format. JohnBeckett (talk) 08:49, 7 March 2022 (UTC)
  • It's nice to hear that you are still here :-). Yes, I renamed the article yesterday. Although I later noticed that most tips here use the imperative mood in their title, not the gerundive. That might be the reason why I had used imperative, too. I was tempted to undo the rename, but imperative doesn't seem correct, and I didn't find any guideline about that. Thanks for your suggestions. I'll add an introductory paragraph along the lines of "If you use Vim in several virtual machines... etc.", to make things clearer. And a mention of EditorConfig and File format. —Gennaro Prota•Talk 10:43, 7 March 2022 (UTC)

    P.S.: I removed the template at the top, but I'm wondering if I should add {{TipNew}}, instead. If so, how is the tip ID determined? Thanks. —Gennaro Prota•Talk 11:39, 7 March 2022 (UTC)
  • The history is that originally tips were at vim.org but that crude system did not allow corrections/updates/improvements so everything, junk included, was copied to here (actually wikia.com as it was at the time) a few years ago. Several people did a lot of work to clean up the 1500+ tips but it was too much to achieve because many of them were obsolete or at least out dated and would require hours to fix. I did a tremendous amount of mechanical fixing because we had to convert from the html at vim.org to wiki syntax here. There are a small number of people who watch edits here and sometimes revert problems or make a minor improvement, but essentially this wiki is defunct. I monitor it to avoid having it deteriorate further. I used to run a bot (User:JohnBot) to do mechanical fixes and I would use it to add script numbers once new tips were accepted as worth keeping. However I haven't done that for years. The tip numbers are pretty useless and they were originally retained because that's how vim.org worked, and it was convenient to tell people to look, for example, at tip 1 to learn about searching. Also, readers could click Previous/Next links at the top to navigate although that was not much help. Now I think we should just operate as a wiki with page titles and no tip numbers. I suggest you put whatever you like at the top of your tip. JohnBeckett (talk) 02:10, 8 March 2022 (UTC)
  • Aha. Well, it's sad that someone did all that conversion work when whoever maintained vim.org could have given access to their repository, if they used one (as I hope), or moved their files to SourceForge or whatever was available at the time. One could say that not all Vim users are able to use a version control system, thus that a wiki is "more convenient", but most Vim users are probably programmers or would quickly learn to use one anyway. In a sense, not all is lost, because there's probably a sufficient number of tips. And, were there more users, the number would easily grow out of control, which is counterproductive: too much information is akin to no information. In fact, it already seems that there's too much material, here. The way I expect a project like this to be really useful is to give a few initial fishes for you to eat but only during the time you need to learn fishing yourself. —Gennaro Prota•Talk 16:30, 10 March 2022 (UTC)

This wiki was created in June 2007 by scraping the html for each tip from www.vim.org/tips, processing it with various scripts, and uploading wikitext to here (vim.wikia.com as it was then). That wikitext was often broken and was manually edited to proper syntax. The original versions are still visible in the history of each page. For example, the original version of Searching is [1]. That is quite clean. If you look at the wikitext by editing the page, you will see that the tip is a parameter to a template. However a lot of Vim tips use punctuation like = and | which broke the template syntax meaning that what you saw when looking at the tip was junk. More history is at Vim Tips Wiki:Imported tips and User:Bastl/Notes on the import.

We had full access to vim.org which was at sourceforge.org at the time. Vim's leader is wikipedia:Bram Moolenaar and he made a small number of us managers of vim.org and I might still have a backup of the php code and mysql database from that site somewhere. It was easier to scrape the html than extract stuff from the database.

There were a very small number of non-game sites apart from Vim. One, I think, concerned psychology. Wikia wasn't quite sure what direction they were going in when starting and they wanted Vim as an example of their variety. The other non-fandom wikis might have become totally defunct or they might have moved to other platforms to escape the Fandom yuck factor. JohnBeckett (talk) 03:45, 11 March 2022 (UTC)

Hehe. Thanks for the info. BTW, if you like, you might contribute to the Wikipedia article about Fandom (or the one about Vim, or any other, of course). —Gennaro Prota•Talk 08:44, 14 March 2022 (UTC)
Thanks for the idea but I'm not interested in Fandom and I'm not sure I want to take on Vim at Wikipedia. JohnBeckett (talk) 06:57, 15 March 2022 (UTC)
:-) I don't care about Fandom, either. By the way, I'm not a Vim "fan": I use it because it has features that I need to be productive and avoid tedious and error-prone tasks, and I know no other editor that does (I suspect Emacs has them as well, but since I learned Vim first, and it was "enough", I didn't bother learning Emacs, as well). Every now and then, I have a look at some other editor, e.g. Visual Studio Code, but they seem to lack the most basic stuff for professional software development, such as the possibility to filter lines or initialize files automatically, so I just forget about them. —Gennaro Prota•Talk 10:43, 18 March 2022 (UTC)

Vim vlc controller and lyric synchronizer[]

  • August 23, 2013
  • It's cute enough to keep and my comment about the "mosh" names is no longer applicable. Normally I wouldn't like all that script for what is essentially not a Vim issue, but maybe keep? JohnBeckett (talk) 09:27, February 1, 2014 (UTC)

Write multiple copies of the currently edited file[]

  • November 21, 2013
  • I kind of understand the idea, but why have two files if they are always identical? Caution would prevent me from using this tip as I wouldn't want a blunder to wipe out both files, and I'd like to do :update a few times when in a long editing session without writing to both files. What to do? JohnBeckett (talk) 09:27, February 1, 2014 (UTC)



Advertisement