Willkommen, bienvenue, welcome, welkom

Welcome to the Vim tips wiki! We hope you can make continuing contributions of articles and/or discussion and other improvements.

If you are new to Wikia or wikis in general, be sure to visit the "Community portal" for an outline of some of the main parts of the site and a link to pages that tell you how to edit.

Do keep an eye on the "recent changes" page, where all edits and their authors (anonymous or signed-in) are listed. Bookmark it, maybe. (And help delete spam - unpleasant but a fact of life.)

If you want to get involved, check out Project:Policy and if you like, join the mailing list.





For the future, if you ever want to fix something like you did for VimTip470 (in this diff), there is an extra parameter that I added at some stage. For example, VimTip5 contains this wikitext:

{{Removed|5|info=Tip 5 has been merged to [[VimTip1]]|prev=4|next=6}}

So, you could insert the 'info=...' with a redirect, if you wanted. Or, just do the redirect which is almost certainly what I would do for any newly removed tip. I'm just mentioning the 'info=...' parameter FYI. JohnBeckett 23:24, June 4, 2010 (UTC)

New tips catchup

With a reasonably small amount of effort we could get up to date with the new tips. April and May are already finished, so a few decisions on Jan/Feb/Mar will do the job. When you have some time, could you provide input at 201001? Then I'll have a go at the next month, and in a week or two we should catch up. Thanks. JohnBeckett 10:17, June 16, 2010 (UTC)

Help request for misc. Vim features


I'm really glad to see the documentation on vi, but it seems painfully hard to find answers to a few questions I had on vi

  1. Regarding folding, how can I tag lines so that I know where the folds are located in a document. If I create a whole bunch of folds, I'd like to maybe see some prefix character in the sidebar showing where those folds are. I recall doing this once, so I'm pretty sure it's possible
  2. Working with multiple files in vi has been a bit difficult. I think I can use :bn and :bp to go between them right? Is it possible to see all the files that I've opened with vi?
  3. Macros sometimes exhibit peculiar behavior. I record a macro, but then when I repeat it, if it's a sufficiently complex macro, it does something totally unexpected at times. I think the last time I ran into this, I was trying to search for text that had a quote in it, so maybe when the macro recorded what I was typing, it interpreted the quote as referring to a buffer instead of being part of the string I was searching?
  4. I really want to make full use of vi. Is there some page with some neat tricks you can do in vi that will save you time and typing?


sorry...i don't think that was the right place to put the comment. Please forward my questions above to the right person/location? Thanks, I greatly appreciate it!

Normally, you're right, and you should direct your questions elsewhere. See Vim_Tips_Wiki:Community_Portal#Asking_questions for some suggestions. I highly recommend the vim_use mailing list mentioned on that page.

However, your particular questions are not too hard to answer, at least to some extent.

  1. It sounds like you want to turn on the fold column. Just set it to some number, like :set foldcolumn=4. See :help 'foldcolumn'.
  2. See Buffers for a buffer switching introduction. Also see the links to further tips at the end of that page. For your specific question, the :ls command does what you ask. Also, did you know Vim can open multiple buffers at the same time in split windows, or even tab pages?
  3. I'm not sure what you mean. Macros do exactly what you told them, and then terminate on an error. I'd suggest going to vim_use for this one, and be sure to give a specific problem to solve, and not a generic "does something unexpected". Sometimes user mappings can interfere with macros. You can see if these are your problem by running Vim without your user configuration: vim -N -u NONE -i NONE
  4. I'd suggest the tips in Category:Getting started, and also browsing the :help files. One thing in particular that has saved me a lot of time, is Vim's "text object" feature: :help text-objects. I also learned a lot about Vim from following discussions on vim_use, and from hitting the "Random page" link in the sidebar on this wiki every day.

Some of these are pretty basic questions...I'd again suggest taking a look at our tips for new users.

Also please note...you're using Vim, not vi. There is a difference and you'll get better responses on places like the vim_use mailing list and (especially) #vim on freenode if you use the proper name.

By the way...it would be a good idea to create a username on the wiki, so you can sign your comments with ~~~~, as I have done below.

--Fritzophrenic 17:34, August 31, 2010 (UTC)

'splitvertical' patch discussion

Ref: http://vim.wikia.com/index.php?title=User:Kartik_Agaram&diff=prev&oldid=28528 Thanks Fritzophrenic; I've posted a link on the mailing list, so rather than post again with a new url I'll leave that stuff there for now. In a few days maybe I'll put a pointer to the talk page and move the discussion there. Kartik Agaram 18:55, October 4, 2010 (UTC)

delete some spam pages.

Hi could you please delete the pages Battery Charger, Panasonic Battery and Have a kind of happiness call waiting because they contain obvious spam. Chrisbra 11:59, December 9, 2010 (UTC)

Thanks, and thanks for reverting the vandalism by the anonymous user. I've deleted the pages and permanently blocked the spam account, and temporarily blocked the IP of the vandal. --Fritzophrenic 15:30, December 9, 2010 (UTC)

Not much going on?

Hi there! I just decided to sign up and I wanted to introduce myself. I have been a long time lurker on Vim Tips. Mostly, well, I use the tips. But recently I have been getting more and more into the Vim community and I noticed that this wiki isn't seeing a lot of action. I think the community is still going strong but I fear that the Vim Tips isn't getting the support it deserves. I wonder if there is anything I can do to help specifically? Thanks! Trcollinson 22:58, January 1, 2011 (UTC)

You're right, it has been a little slow recently. I think a lot of people are turned off by Wikia's new format. Our most active editor and administrator, JohnBeckett, has been missing in action for a few months now (still fuming over the way wikia handled the new look rollout, I understand) so I've been keeping shop here since with help from a few other contributors who have flagged spam, corrected typos, and the like. And of course, added tips.

A few things need doing. First of all, there are still a bunch of tips that got imported and never really cleaned up satisfactorily. You can find these in Category:Review. Secondly, we have flagged many tips with a {{todo}} flag, you can find these in Category:Todo. Most of these tips have a note at the beginning of the Comments section saying what needs to be done. Finally, we need to catch up on getting our newly added "proposed new tips" decided on and hopefully John can come back and use his bot to assign tip IDs. See Vim_Tips_Wiki:New_tips. If it gets to be a few months later I may start doing it manually.

I'm not sure that there is much we can do to drum up support in the community other than continue to improve the resource, but I'm glad you want to help.

Hope to see you around!

--Fritzophrenic 04:46, January 2, 2011 (UTC)

I can see why JohnBeckett would be upset. A lot of the other wikia wiki's I use have been having a similar problem with the switch. But such is life I guess.

I am looking over these lists and wow! There is a ton of content there. I see a lot of it needs to be merged and rewritten. But a lot of the todo's (and honestly the reviews as well) have a note that they need to be merged but it doesn't seem like a lot of merging is happening. Is that because of time requirements on you and such or is the merging process just hard? I'll take a look at those and start helping. Thanks for the info!

Trcollinson 22:19, January 2, 2011 (UTC)

Yeah, there's a lot to do and not very many people doing it. Obviously the most fun thing is submitting new material but a lot of the old material still needs some attention and it doesn't often get it.

If you're working on merging tips (a worthy endeavor) take a quick glance at our merge guidelines first. Remember that you don't necessarily need to spend a lot of time merging in useless content. Sometimes a "merge" is just providing a redirect to a better solution. Most of the time though, there should be something useful to include in the merge.

Good luck!

--Fritzophrenic 03:13, January 3, 2011 (UTC)

Checking in

Howdy! I just wanted to check in and see how things are. I noticed that the theme changed. Is this the way the theme was originally? I was also curious as to whether you know if JohnBeckett may ever come back? Is he reachable? If not maybe in the future it would be advantageous to create a new bot to handle some of the activies JohnBot was handling. I have developed a number of wikibots in the past and would be glad to help. If I can do anything let me know. As always, if you have any suggestions on my editing I always appreciate it. Thanks! Trcollinson 21:38, January 9, 2011 (UTC)

Hello again! I'll shoot John an email in the next day or two, he's usually pretty responsive to that. I am hoping to get him to resume some of his JohnBot activities (like applying templates to newly created tips, for example). As for the theme, this is still the "new wikia look." The change you noticed was me accepting the new theme and deciding to see what it had to offer. I finally got around to uploading an image of the Vim logo for the "wordmark" for the wiki, and decided the site ought to be a matching color. I just grabbed one of the pre-made color schemes and didn't try anything fancy. If people complain it can be changed back. If you have suggestions I'm pretty open as well. Details on the "new look" can be found here:

--Fritzophrenic 03:24, January 10, 2011 (UTC)

I think it looks fine with me. Although I think the site look and feel can have a lot of importance for a project, I think Vim Tips has a lot bigger "fish to fry" so to speak moving forward, at least at the moment. I would stick with the green though!

As for John, I was just floating around the site on my phone (where it's hard to edit things, but easy to read), and I noticed that in his talk page there was a lot more discussion a few months ago then there is now. I would love to see things ramp up again and I think it can happen (maybe I am just super optimistic by nature, but what the hay). So I hope we comes back :) he seemed to be a big help just as you are and I hope maybe I will be as well someday. I think what you, he and others have done for the community is a great thing. So I guess this is my simple way of saying thanks!

Trcollinson 05:56, January 10, 2011 (UTC)

Greetings. I hate the idea of slaving for Wikia who have us in a very ugly position. However, that is the position we are in, and the community should have a Vim Tips wiki, so I suppose we should get on with it. I am busy in other places but will be able to resume JohnBot stuff in a few days. I have not yet looked over what's been happening much, but it appears Trcollinson is exactly what we need to get back on track. Thanks! I must warn everyone that I am rather more grumpy and impatient than in the past. I have not yet looked at the "new tips" situation, but I am inclined to deal with them in an accelerated manner without some of the dithering and being nice to everyone that we have done in the past. Yes, being nice is good and it is the only way to build collaboration. But if we have evidence that collaboration is not forthcoming (for example, if somone has dumped a 60%-finished tip here and disappeared), we need to be realistic. I'm not going to start a delete rampage, but I'll be looking for practical ideas of how to catch up (which will probably involve a fair bit of deleting). I have just dropped in to provide this update. See you all in due course. JohnBeckett 10:23, January 16, 2011 (UTC)

Welcome back Mr. Beckett :) glad to finally can the chance to see you. I am not fully aware of the history of wikia or what they have done. However, one of my suggestions would be, why don't we just move the whole Vim Tips elsewhere? I guess I am just trying to understand the background a bit better.

As for continuing the work, let me know where you would like help, and I will. I can do just about anything and my time will be freeing up here more shortly. I believe in the Vim tips project as I have been using it for so many years and I would love to see it keep going. However, I think your point about accelerating the work here is actually a very good thing. I have worked on a lot of wiki's and the thing that I have noticed which gets new editors moving is seeing other editors moving as well. The "if you build it, they will come" methodology. So anyway, I will try to keep the editing up at an even pace, and hope we can make things better in the next few months!

Thanks, Trcollinson 06:13, January 17, 2011 (UTC)

It's a bit too tedious to explain, but in brief Wikia have changed the skin dramatically while showing an arrogant disregard for the different wiki communities. The problem is that, due to the hard work of those disregarded communities, Wikia now has a good Google ranking. If we were to copy this wiki elsewhere, it would be pretty well impossible to outrank vim.wikia.com. People searching for stuff would go to Wikia and would never realise that the official wiki was elsewhere. There is not much interest in vim.wikia.com (apart from people using Google to find a quick solution to some problem of the moment), and there would be essentially no interest in a clone. The main problem with the skin is the absurd focus on trivia (the top and side bars), with the content squeezed in as an after thought.
I'll take a week or two to work out what has been happening here (looks like Fritzophrenic has done a great job with the logo and menus at the top), and may have some suggestions for how people can help in due course. Probably the best thing would be to sort out the new tips. JohnBeckett 09:09, January 17, 2011 (UTC)
I understand WOW's wiki did in fact move, with limited success. While they have a big community outside the wiki where they were able to spread the word that the wiki had moved, there is still a lot of activity on the wiki here.
John, one thing i did while you were gone, is changed the wording of the "Proposed tip" template to read "Newly created tip" or something like that, since they tend to stick around in "proposed" state longer than we originally intended.
As for the skin, it gave me TONS of problems at the beginning. I think it is still broken in IE7 to some extent, but I had to upgrade at work so I'm not certain anymore. They did finally fix all the issues I had in Opera (issues that were preventing me from logging in with javascript enabled), but I think they were targeting some other problem on a different browser when they did (Opera is not officially supported). I do admit that it does look "fresh" and "modern" which will certainly appeal to a broader audience for many wikis...but that sort of thing never really mattered on this wiki.
--Fritzophrenic 16:52, January 17, 2011 (UTC)
I see the point there now, no doubt. I think my current personal thinking to jump in both feet first and try to update and clean up as much of the content as I can is still the best move I can make. There is a ton of content which still needs to be cleaned up from the original move, merged, or just plain removed, so I will continue on with that and see where it gets me.
I also think some people have forgotten that Vim Tips is here. I think you're right John that people have the most interest in Vim Tips when they need an answer to an immediate problem. But really that is the same situation many people have with Wikipedia. I think the community as a whole will support the effort. I have been tweeting about it, and posting on Facebook about it and I think I need to do it somemore. Even mentioning it in the #vim channel on freenode. I am hoping it will help :) I think it will in time. It's a big ship, and it moves slowly, but with good momentum it will keep going. At any rate, I am glad to see you back around :)
Trcollinson 21:05, January 17, 2011 (UTC)


I have prepared the new tips for discussion, see New tips. We need to somehow decide what to do with all that stuff. As User:JohnBot I have also done some tweaking of a few things, see Special:Contributions/JohnBot. When looking at Recent changes, you can click 'Show bots' to see recent activity. JohnBeckett 07:26, January 25, 2011 (UTC)

Main Page Issue?

Hey there, I am having trouble with the front page of the wiki. Every time I go to it it redirects me to Resize which is a page that does not exist. I checked the source for the page, but it had nothing unusual in it. Are you having this problem? Do you see why I might be redirected like I am seeing?

Trcollinson 23:54, January 26, 2011 (UTC)

I just clicked the Vim logo at the top left of this page and was taken directly to the main page with no problem. The correct URL is http://vim.wikia.com/wiki/Vim_Tips_Wiki (if a logged-in user accesses http://vim.wikia.com they end up at some customised Special:WikiActivity page which I never look at). JohnBeckett 03:05, January 27, 2011 (UTC)
Once or twice sometime earlier this month, I did get redirected to some other page. I do not remember which page it was, but it stopped doing that after only a couple times. Now it redirects me to WikiActivity as John says. I looked through the preferences and found a "Disable my redirect to Wiki Activity" option under "Misc" but did not see anything about redirecting to last edited page or anything like that (which is what I was looking for). I am trying out this option now, because like John I rarely look at that page. I have an RSS feed set up so I see all the changes anyway. –Fritzophrenic 15:27, January 27, 2011 (UTC)

Help, Community portal and script followed


Thanks for your welcome note. Actually, I was wondering about some tips for this wiki. I didn't find any help, have I missed it?? Sorry if it is hidden somewhere and I should have looked better... Also, there are some links at the top of each page, one being "Community portal", but this page has never been created :-S

So, my first question before those arised was about the followed pages. I am following some Vim Tips, but also some pages about the scripts of vim.org. The latter do not appear in my list of followed pages... Is this a bug? If not, how can I have the complete list of my followed pages?

Thanks in advance for all.

--XonqNopp (T|C) 10:54, January 28, 2011 (UTC)

I have not yet figured out how to show scripts in my "followed pages", however every followed page is also added to your "watchlist" which you can view: Special:Watchlist. You can even add this to that floating toolbar at the bottom. I have added it to mine but I'm still not sure whether I like it or not. Just type "Watchlist" in the dialog and click it with the mouse in the popup. Once on the watchlist page, there are also links to edit or view it there. I have my preferences set up to email me if something on my watchlist is updated, I think this also works for Script: pages but am not really sure. John?
Thanks for the hint about community portal being broken. Somehow the automated thing which used to work stopped working. I have updated the navigation bar to point to the correct page and created a redirect with the alternate capitalization just in case.
Additional help is in Category:Help. Hope that helps! Let me know if you have any more questions.
Fritzophrenic 16:41, January 28, 2011 (UTC)
In theory there should be no difference in following or watching a normal tip or a script: if your preferences include an email address and the default to send you an email alert on changes to watched pages, you should get an email for each change to a script page. I imagine the public "followed pages" has some code to only list pages in the main namespace (i.e. tips). For example, you might have a reason to watch some templates (like Template:Help) and your interest would be due to a particular requirement that is unlikely to apply to general users. The "followed pages" stuff is an attempt to generate interest in the articles on a wiki, so while I don't recall seeing any documentation about it, it would make sense for only main namespace pages to be listed in "followed pages". The Special:Watchlist page should show all watched/followed pages (the default view on that page will only show recent changes to watched pages; click "View and edit watchlist" or "Edit raw watchlist" to see the actual list). JohnBeckett 09:19, January 30, 2011 (UTC)

Hi, and thanks for the reply. As I did not find any link to my watchlist, I assumed it was here called the followed pages and that is why I was wondering where were the scripts followed. So with the watchlist I understand better. But I think there should be a link to the watchlist in the menu of the top right corner, since it may be as useful as the list of the followed pages... Thanks for all. --XonqNopp (T|C) 13:54, February 2, 2011 (UTC)

Community content is available under CC-BY-SA unless otherwise noted.