News for hackers. Stuff that matters.
Re:Best of Vim Tips by akkartik on Thursday January 07, 2010 @03:31PM (#1037969)
Man, that's intimidating. I found 2 new tricks on the top screen and I still don't want to scroll through the rest.
Re:Best of Vim Tips by mattwdelong on Thursday January 07, 2010 @04:38PM (#1038079)
My exact thoughts. I think I am going to print it out and study it for a while. I am sure there are tons of productivity things I can learn..and things I should probably already know.
Re:Best of Vim Tips by 10ren on Thursday January 07, 2010 @11:39PM (#1038868)
For intimidation, try browsing all the help pages of vim! :-)

I've concluded that vim has every feature I can imagine - and then some. But I can't appreciate it until I've imagined it. The problem is that it is impossible to find that feature in the help, since I don't know its name. Google helps here, by searching for a description of it in my own words.

Every tutorial I've ever seen on vim is mind-bogglingly boring. I've learnt the most by just hearing one tip at a time - and searching for one when I need it.

Some people can absorb massive quantities of raw information, but I need to integrate new information into my other knowledge in order to be able to use it. Then there's practicing the habit of using it, and learning in what situations it is appropriate. For a tool, it's not knowledge per se, but the application of knowledge that is useful.

Re:Best of Vim Tips by 10ren on Friday January 08, 2010 @01:04AM (#1038996)
Oh man, the very first one was something I'd been wishing for!

I need it for appending to text I've searched for, especially if I need to do it a few times. e.g. for adding an argument to a few method calls. I usually go `n` (repeat the search), then `e` (go to the end).

That's enough. One tip at a time maxes out my absorption rate.

Re:Best of Vim Tips by res0nat0r on Thursday January 07, 2010 @03:48PM (#1038000)
This is the best list of vim tips online I believe, and the author is always updating it. Last update: 22-DEC-09

One of my favorites that has saved me a ton of time more than once:

" rename a string with an incrementing number

:let i=10 | 'a,'bg/Abc/s/yy/\=i/ |let i=i+1 # convert yy to 10,11,12 etc

Re:Best of Vim Tips by jamesbritt on Thursday January 07, 2010 @09:32PM (#1038644)
"This is the best list of vim tips online "

When does a collection of items go from a list of tips to a lengthy compendium of details?

Like others, I started looking over the page and got discouraged; there's too damn much.

Re:Best of Vim Tips by 10ren on Friday January 08, 2010 @01:33AM (#1039028)
For my understanding (ignoring the loop):

    between mark a and mark b: 'a,'b
    goto lines containing Abc: g/Abc
    recognizable substitute:   s/yy/\=i/
      = prefixes a variable (escaped with \)
A problem is that it will only replace the first `yy` on the line (if you add g, to make it s/yy/\=i/g, it replaces all of them, but with the same value of i.

How to make it increment multiple yy's on the one line?

Re:Best of Vim Tips by jamesbritt on Thursday January 07, 2010 @11:08PM (#1038824)
So after griping that the page is a case of data overload, I though there should be another way to get this much information parceled out in more digestible portions.

In order to help myself (and others so interested) to improve my German vocabulary I set up a Twitter account that shoots off random German - English word definitions: @TeachMeGerman. Every hour you can learn a new word (modulo the data set size, though the repetition is actually handy).

I bet such a thing, if it does not already exist, would be good way to pick up new vim tips.

Thoughts?

Volunteers? :)

Re:Best of Vim Tips by s3graham on Friday January 08, 2010 @12:31AM (#1038955)
I tried registering @vimtips, but turns out it's already been done: http://twitter.com/vimtips Hasn't tweeted in while though.
Re:Best of Vim Tips by mileszs on Friday January 08, 2010 @09:09AM (#1039519)
Oops, that's me. I'll get that app tweeting again. Sorry.
Re:Best of Vim Tips by jamesbritt on Friday January 08, 2010 @03:25PM (#1040339)
Sweet. I don't knok if this is a practical approach for you, but for @TeachMeGerman I set up a large text file (one I had created for a "flash card" app) and a small Ruby script to grab a random entry and post it to Twitter, driven via cron.

This way I didn't have to remember to do anything. :)

Re:Best of Vim Tips by ghotli on Thursday January 07, 2010 @08:55PM (#1038561)
This article suffers from a bad case of TL;DR. There's great information buried in there, but it's presentation is poor. Typography should be taught in primary school to stave this off.
Re:Best of Vim Tips by graywh on Friday January 08, 2010 @12:06AM (#1038913)
I think it's better to just know how/why all these tricks and tips work instead of having a huge list that's hard to read. It's much easier to apply that way.
Re:Best of Vim Tips by kwamenum86 on Friday January 08, 2010 @12:43AM (#1038974)
A lot of these (at least in the beginning) appear to be regexp tricks rather than vim ones
Re:Best of Vim Tips by defdac on Friday January 08, 2010 @02:36AM (#1039087)
Ok, now I'm totally sure I will never in my life try Vim - I'm not Rainman.
Re:Best of Vim Tips by crazydiamond on Thursday January 07, 2010 @11:15PM (#1038835)
hey guys this page is fantastic and the author responds in a very friendly way. You don't have to read it in one shot. Its more like a cheat sheet, than an extensive manual.

I love it as it is.

Re:Best of Vim Tips by markjuh on Friday January 08, 2010 @04:53AM (#1039201)
Yes, I'd like to second that- it's a great reference list that gave me exactly what I needed already quite a few times.
Re:Best of Vim Tips by coliveira on Thursday January 07, 2010 @05:02PM (#1038124)
This is pure gold. Thanks.
Re:Best of Vim Tips by Oranj on Friday January 08, 2010 @05:01AM (#1039209)
What does this do?

'a,'bg/fred/s/dick/joe/igc : VERY USEFUL

Re:Best of Vim Tips by blackman on Friday January 08, 2010 @06:10AM (#1039278)
between (book)mark a and b find fred then search the line and replace any occurrence of dick with joe with a confirmation. there a couple of modifiers on there I don't know but I think that's pretty much it.