7 ms·
Best of Vim Tips
- akkartik 17y agoMan, that's intimidating. I found 2 new tricks on the top screen and I still don't want to scroll through the rest.
- mattwdelong 17y agoMy 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.
- 10ren 17y agoFor 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.
- res0nat0r 17y agoThis 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
- jamesbritt 17y ago"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.
- 10ren 17y agoFor 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?
- coliveira 17y agoThis is pure gold. Thanks.
- ghotli 17y agoThis 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.
- jamesbritt 17y agoSo 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? :)
- s3graham 17y agoI tried registering @vimtips, but turns out it's already been done: http://twitter.com/vimtips http://twitter.com/vimtips Hasn't tweeted in while though.
- mileszs 17y agoOops, that's me. I'll get that app tweeting again. Sorry.
- jamesbritt 17y agoSweet. 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. :)
- crazydiamond 17y agohey 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.
- markjuh 17y agoYes, I'd like to second that- it's a great reference list that gave me exactly what I needed already quite a few times.
- graywh 17y agoI 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.
- kwamenum86 17y agoA lot of these (at least in the beginning) appear to be regexp tricks rather than vim ones
- 10ren 17y agoOh 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.
- defdac 17y agoOk, now I'm totally sure I will never in my life try Vim - I'm not Rainman.
- Oranj 17y agoWhat does this do? 'a,'bg/fred/s/dick/joe/igc : VERY USEFUL
- blackman 17y agobetween (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.
- deleted 17y ago[deleted]