15 ms·
Vim Creep
- habitmelon 14y agoI have never been moved so close to tears by an article about a text editor before.
- jdludlow 14y agoMost people have read this before, but maybe some of the kidlets here haven't seen it. http://www.cryptonomicon.com/beginning.html http://www.cryptonomicon.com/beginning.html 464gg for the greatest chapter about an OS ever written.
- twism 14y agolooks like he forgot to switch to command mode at the end of the post.
- mediocregopher 14y agoWhich is the the :wq got inserted and not executed.
- jonzjia 14y agomacvim for objective-c? That sounds like a PITA to set up properly.
- chrisdotcode 14y agoAlso feels good to have vim bindings inside of emacs using evil (http://www.emacswiki.org/emacs/Evil http://www.emacswiki.org/emacs/Evil).
- sea6ear 14y agoOddly, I've found myself using vimacs (https://github.com/andrep/vimacs https://github.com/andrep/vimacs) to have emacs keybindings available with the quick startup / easy configurability of vim. I make no claim that emacs keybindings are superior to vim's native keybindings, but for whatever reason, I type more naturally using them at this point. (Which somewhat mystifies me, since for years I used vi/vim as a primary editor with it's normal keybindings.) I still think that vim keybindings are faster than Emacs for actually editing text, but the emacs keybindings feel more pleasant to me (unless I'm using something without a dedicated control key - like a phone or tablet).
- kennethologist 14y agoThis article has changed(or at least I hope) my life. I'm installing Vim today on my Windows Laptop. Does anyone know of a good guide for beginners?
- Smudge 14y ago:help tutor Or, if you get bored: http://vim-adventures.com/ http://vim-adventures.com/
- solutionyogi 14y agoI would highly recommend 'The Practical Vim' by Pragmatic Bookshelf. http://pragprog.com/book/dnvim/practical-vim http://pragprog.com/book/dnvim/practical-vim It will teach you 'The Vim Way' which is a MUST if you want to get most out of it. When starting with Vim, it can be very daunting and I can't emphasize that enough. If you are in NJ/NY, please email me and I can walk you through 'The Vim Way' to make it easier to get up to speed.
- icarus_drowning 14y agoI learn by watching and following along with examples, so the following YouTube videos are the ones that I've found the most useful: http://www.youtube.com/watch?v=71YTkxUNwmg http://www.youtube.com/watch?v=71YTkxUNwmg <--Covers the basics and helpful commands. I had never used vim before watching this video, and now I'm reasonably competent at basic text editing. I needed to do find and replace on a short story I'm working on (changed a character's name), and I found this one helpful: http://www.youtube.com/watch?v=J1_CfIb-3X4 http://www.youtube.com/watch?v=J1_CfIb-3X4 I wanted to understand/use the .vimrc file, so I googled until I hit this one, which I found quite informative: [UPDATE: put in the wrong link, serves me right for picking the last history item with .vimrc in it instead of watching it. The actual video I found helpful was this one of a guy showing his .vimrc file and what various things in it do: http://www.youtube.com/watch?v=xZuy4gBghho http://www.youtube.com/watch?v=xZuy4gBghho] Lastly, once you're comfortable using it, try going into command mode and typing Shift-a, and notice that it moves your cursor to the end of the line and puts you in insert mode. I saw this tip on HN awhile back, and I hadn't seen it in any basic tutorials, but it is the single most useful command I've come across.
- ciderpunx 14y agoNice. Very nice. I even tweeted it. With TwitVim, naturally. http://vim.sourceforge.net/scripts/script.php?script_id=2204 http://vim.sourceforge.net/scripts/script.php?script_id=2204
- karmajunkie 14y agoCan we all stop patting ourselves on the back for being vim badasses now? Yes, its a fantastic editor. Yes, its probably going to make you more productive. Yes, its every bit as capable as any other IDE or editor out there. No, it will not make you a better person. No, mastery of vim does not make you fart sunshine. No, it won't make you an enlightened buddha.
- Produce 14y agoNo, we can't. Yes, it is. Yes, it will. Yes, it is. Yes, it will. Yes, it does. Yes, I am.
- StavrosK 14y agoAlso, it doesn't even make you that much more productive. I love it to bits and use it exclusively, but it's just a bit faster, it's not going to reduce the time it takes you to actually think about the things you have to write.
- RegEx 14y agoI agree. The most utility I get out of VIM is quick formatting. I'm very particular on how my code looks, (I want to make things as painless as possible for the next guy), and navigating code in normal mode is much faster than anything I could do with a mouse. As far as writing code goes, typing 120wpm makes me fast, not VIM. As far as thinking goes, Jarnal and a Wacom tablet help me do that, not VIM.
- pfraze 14y agoI think it's more about mastering tools with a high learning curve. It's our trade; it's fun to feel good about it.
- thetabyte 14y agoI think that's something we as a community forget. It's ok to feel proud of being good with your tools. It is fun. As long as we don't turn it into a "holier than thou" situation, it's neat to have an editor that you have such mastery over that you can control blocks of text with keystrokes. Note: I don't quite have it yet myself. I'm been using vim for about 6 months (with only 2-3 of active use) and I'm actually right on that cusp he mentions--where you are searching less and less, and only for more powerful and obscure commands, and things are just starting to all become extremely useful. It's beautiful.
- deleted 14y ago[deleted]
- crazygringo 14y agoThis feels like an article about a religion or cult, not a software program. I just don't get it. Ever since newer editors got block editing or multiple insertion cursors, and RegEx find & replace across multiple files, and searching filenames to open... I feel like I've already got everything I need! What am I missing out on? I don't feel like my text editor holds back my productivity. Using something like Sublime, I never think, man, if only Sublime did x, it would save me five minutes, twenty times a week! I've never had anyone explain to me what specific kind of code editing is so much more productive in vim than in any other editor. Can someone give me a real-world, commonly occurring example? Or is it not about productivity? Is it an interface thing? People like the way it feels to use? The article explains the "feeling" I always hear about, how vim is so much better, but for the millionth time, fails to tell me why, in a way a non-vim-user can understand.
- heretohelp 14y agoI don't understand vimmers, but I use Emacs and I can say that having your work environment be 100% programmable is pretty damned nice.
- pfraze 14y agoI used emacs for about 6 months, and just recently switched to vim to see what I think. It's been pretty subtle so far; close enough that I don't know how much the choice matters.
- rsbrown 14y agoNo, I didn't.
- jdludlow 14y agoMy first week in college a distant relative of mine at the same school pulled me into the Sun lab. The sum-total of his instructions were: * This is how you log in. * This is ls. * This is cd. * This is man. * This is apropos. * Learn vi. * Have fun. What came from that 5 minute intro to Unix has been applied orders of magnitude more often than anything from 5 years of an EE degree.
- xutopia 14y agoCan you explain to me what apropos does?
- shazow 14y agoThis is why `man` came before `apropos`. :P http://www.unix.com/man-page/Linux/1/apropos/ http://www.unix.com/man-page/Linux/1/apropos/
- anextio 14y agoIt searches for a keyword in the manpages and tells you what page contains the text. $ apropos printf fmtcheck(3) - sanitizes user-supplied printf(3)-style format string format(ntcl) - Format a string in the style of sprintf fwkpfv(1) - FireWire kprintf viewer fwprintf(3), swprintf(3), vfwprintf(3), vswprintf(3), vwprintf(3), wprintf(3) - formatted wide character output conversion printf(1) - formatted output printf(3), fprintf(3), sprintf(3), snprintf(3), asprintf(3), dprintf(3), vprintf(3), vfprintf(3), vsprintf(3), vsnprintf(3), vasprintf(3), vdprintf(3) - formatted output conversion wprintf_l(3), fwprintf_l(3), swprintf_l(3), vwprintf_l(3), vfwprintf_l(3), vswprintf_l(3) - formatted wide character output conversion
- deleted 14y ago[deleted]
- Symmetry 14y agoIt lets you find other commands, basically. http://en.wikipedia.org/wiki/Apropos_(Unix) http://en.wikipedia.org/wiki/Apropos_(Unix)
- andere 14y agoWhat a feel-good piece.
- SwellJoe 14y agoI've said it before, and I'll say it again... Editing text is a solved problem: vim or emacs. Pick one and get back to work.
- a3_nm 14y agoWhile vim is very cool, there is certainly a lot of room for improvement. vim's codebase doesn't look like something that I would like to hack, and don't try to tell me that things like vim plugins or vimscript are supposed to be the best that we can ever hope to do.
- SwellJoe 14y agoI'm not trying to tell you anything about the codebase, vim plugins, or vimscript. I'm trying to tell you that it's probably a waste of your time to agonize over text editors, when there are two very powerful editors available to you, with decades of development and refinement, millions of active users, hundreds or thousands of contributions of plugins and scripts and support tools, copious documentation and examples, and the tools you need to embark on any text editor task you may have without ever feeling limited by the editor (assuming you have learned your editor). Do you want to work on your software, or do you want to work on text editor scripts? Sure, sometimes you need to write a macro or script or something...but, I can count the lines of vim code I've written in my entire 20+ years of programming on my fingers and toes (if I count vimrc stuff, it'll require a few other people's fingers and toes, but it's still statistically zero compared the amount of code and docs I've written in that time). I'll leave it to Bram Moollenaar figure out how to improve vim. He's added Python support to vim years ago. Is Python really insufficient for you? I've never needed it, but if I were making something big for vim, I'd probably look into it. But, again, I'd rather be working on the stuff I'm passionate about. Editing text is not a problem I'm excited about; if it's your bag, that's great. But, for the rest of us, it's just a form of procrastination to fiddle and futz around with new tools when the old ones are more than sufficient (and probably superior, on the whole, to new ones...sure, TextMate is super-badass and awesome; but it's missing tons of capabilities that vim and emacs have, and you'd probably be better off learning how to maximize your efficiency in those more powerful editors, than learning new tools which will come and go).
- VMG 14y agoNope. Don't get me wrong, I love vim, but I don't need to have it everywhere. It makes no sense in the browser. It's lacking some features Eclipse has (although if Eclipse had a proper Vim mode, I'd use it in a heartbeat).
- zship 14y agoHave you heard of Eclim? It's a sort-of "bridge" between Eclipse and Vim and I couldn't be happier with it. http://eclim.org/ http://eclim.org/
- osa1 14y agoI'm using viPlugin( http://www.viplugin.com/ http://www.viplugin.com/ ) for months now and I'm pretty happy with it. I don't think I could use Eclipse without it.
- VMG 14y agoThanks, I'll have a look
- jamesaguilar 14y agoI've never found that symbols -> buffer is the bottleneck for me. Instead, it exists somewhere between problem -> symbols.
- regularfry 14y agoYeah, but having got through the problem->symbols bottleneck, it's nice not to have another one waiting.
- AndyKelley 14y agoSomehow this reminds me of an Everything2 article about Nethack titled "You have a sad feeling for a moment, and then it passes." It inspires the same kind of nostalgia. http://everything2.com/title/You+have+a+sad+feeling+for+a+moment%252C+then+it+passes http://everything2.com/title/You+have+a+sad+feeling+for+a+mo...
- kevinalexbrown 14y agoThis is an extremely awesome, fantastic, exhilarating use of hyperbole. What I gained from the article wasn't any explanation of why Vim is great; indeed, there was little included in this respect, aside from moving "entire blocks of code with the flick of a finger." Even the cool feeling of proficiency you get from knowing a tool well, and the fun of getting to show off a skill to a "how did he do that!?" audience was secondary. My favorite part was the implicit reminder to relax about my tools. The most effective use of hyperbole is not the emphasis of a particular point, but a caution not to take ourselves too seriously, and place our self-satisfaction in proper perspective. The most powerful instances border on satire, and in that respect, this piece was perfect. Addendum: I use vim and pentadactyl. They are extremely awesome, fantastic, and exhilarating.
- mun2mun 14y agoJust watch the video of the page http://blog.extracheese.org/2010/11/screencast-custom-vim-refactorings.html http://blog.extracheese.org/2010/11/screencast-custom-vim-re... to get the gist of "entire blocks of code with the flick of a finger".
- noonespecial 14y agoThanks for posting that. I'm a bit of a VIM noob. I learned * and '' from that. Most useful. So much awesome yet to discover.
- solutionyogi 14y agoWow. That guy's VimFu is crazy. I wish I was half as fast as he is.
- andrewstewart 14y agoGary Bernhardt (guy doing that screencast) also does [Destroy All Software][1]. Lot of useful Ruby/Rails videos, done with vim. He's just as fast as this video, if not faster, and he doesn't slow down. [1]: http://destroyallsoftware.com/ http://destroyallsoftware.com/
- kstenerud 14y agoI started using vi in high school. Used it extensively throughout college. Then I had my first taste of a proper GUI IDE. Since then, I've only used vim for editing config files on a remote unix system.
- gatordan 14y agoNot so subtly the author is telling the reader if you program with Vim you'll be just like "all the really great programmers" who can write 4 line solutions to problems that take ordinary programmers 10 pages. You'll produce "impossible patterns of code and text manipulation", and be able to "fill dozens of registers" (admittedly I don't know what that means). This is all bit silly and reminds me of "hacking" in the Hollywood films. I understand that this post was tongue in cheek. I also understand that not all text editors are equal, if you see someone writing their first hello world program in Notepad yes you should tell them about much better alternatives. But this post confuses ability to program with ability to use Vim. Being really good at using Vim will definitely let you say you're part of the club of people who are really good at using Vim. It just might make you more efficient at manipulating code. But let's not perpetuate the elitism that is pervasive enough in hacking, it's a text editor. It doesn't make you more intelligent, better at problem solving, or writing more efficient code.
- thedufer 14y agoHe's not saying that using Vim will make you a better hacker. You're the one who's confusing remarks on correlation for causation. Its probably likely that there is such a correlation; those who are willing to put in the time learning vim/emacs are probably those who spend the most time coding, and thus have the most practice.
- moron 14y agoI still can't believe people love that damn thing so much, even after all these years. There are way better tools in my opinion. Of course, if you like it by all means continue using it. But if you think it has anything to do with your talent as an engineer, you are wrong. And if you see other engineers not using it and think it implies anything about their talent, you are wrong. Side note: if anyone wrote in such a breathless tone about Apple, they would be skewered as a fanboy and a drinker of the Kool-Aid.
- lisper 14y agoYou could do a global search and replace of "vim" with "emacs" (or pretty much any other development tool for that matter) and it would not change the semantic content of this article at all.
- m12r 14y agowhy vim creep, it should be titled "ode to vim"
- lukejduncan 14y agoFor me pragmatism wins the day. Vim has been installed on every machine I've ever ssh'ed into. Not true for emacs or even nano or pico.
- dredmorbius 14y agoVim, really? Some vi variant, save but for a few instances. But not necessarily vim. Being stuck to use old-school vi a few times in the not-to-distant past made me realize how massive an improvement over it vim is. Yes, I can GSD with vi, but I can really GSD with vim.
- mixmastamyk 14y agosshfs allows you to use any editor you like.
- tikhonj 14y agoYeah, but I always ssh from Emacs using Tramp. When all I have to do is C-x C-f /user@hostname:~/path/to/file, there is no reason to use anything else. Just as pragmatic, and I get to use all my nice normal Emacs features at the same time.
- farinasa 14y agoBeing somewhere in the middle of that timeline, I'd watch that movie. This piece reminds me that an authors vision is always more important to communication than the subject itself.
- mikebell 14y agoI'm all for vim or whatever other editor you prefer. But to somehow claim that one editor or another is going to make you a better programmer and make your 10 pages of crap code become 4 elegant lines is pretty nonsensical. No matter what editor you use; if you're not good at problem solving, you're not going to make a good programmer.
- thornofmight 14y agoHow do people use Vi on large projects? Do you just manually type in the name of the file you're looking for every time?
- kabdib 14y agoI'm like that, exactly, but with Emacs. A long time ago I narrowly escaped being like that exactly, but with TECO :-) I've learned not to fret about people's choice of editor. FOr instance, if someone was happy in NotePad, as long as it didn't affect me, I learned not to care. (I might grit my teeth in frustration, watching them flail for minutes at something I could do in seconds with my choice of editor, but that's my problem).
- mdonahoe 14y agoI chose vim because it was radically different than anything else. All text editors have crazy shortcuts that do magic, but only vim has the ironically named NORMAL mode with its verbs, movements and registers... I treated it like a new game to learn. Sometimes I will write a macro because it is more fun, even though it might not save me raw time.
- wangweij 14y agoIf someone can always "churned out 4 line solutions for an assignment that took you 10 pages of code to complete", he can use any editor or maybe simply "cat >".
- devin 14y ago"Knife skills" don't make you a good developer. Cook a great steak and worry less about cutting it. Tools are boring. People are far more important. A post like this is akin to "I LOVE BRITNEY SPEARS." Please God, make the programmer pop culture stop.
- kragen 14y agoCoincidentally, I've been working on my knife skills lately. In the past, I often served dinner late because I took so long to chop the vegetables. (I'm vegetarian.) Now that I'm focusing on proper knife technique to chop quickly, I find that I can get dinner served faster — but also I have more flexibility to respond and experiment in the kitchen, because I can, for example, put the skillet on the stove before I start chopping the onion I'm going to sauté. And I'm less likely to burn things, because chopping takes less of my time and attention. Of course, knowing how to cut isn't the same as knowing how to cook. Vegetables chopped slowly taste the same as vegetables chopped fast. But if you already know a thing or two about food, you can cook a little bit better if your cutting technique is better.
- pacomerh 14y agoNice writing, this goes straight to the HN monthly. Ultra nerdy nonetheless.
- helpbygrace 14y agoI definitely save this article not for the awesome main post but for the useful comments and replies. Thanks all.
- kator 14y agoLOL so in my early days it was "vi" but I too use "vim" now a days. Either way the funny thing is when someone asks me "how do you do THAT in vi?" I often find myself typing in the air to replay the muscle memory that executes those instructions. For better or for worse I've become muscle programmed to execute vi commands in flashes of thought that really never reach my normal cognitive functions. I love to watch people stunned as they see me do something I've taken for granted for years or figured everyone else knew how to do. All that said, all tools are not for all situations and all people. I do at times find myself jumping into eclipse (Java I'm looking at you!!!) because of the many additional features available in a good IDE. I know you can run the vim extensions in eclipse but I've never bothered. I figure if I'm going to mouse my way through an IDE I'm not sure what having vi commands will do to make my life easier. :-)
- Xcelerate 14y agoYou know, I'm doing an experiment like this with Tetris. I was looking at the world record for 40 line clear (20.55 seconds at http://www.youtube.com/watch?v=WzUUKKuye24 http://www.youtube.com/watch?v=WzUUKKuye24) and I realized that the limit is not how fast he thinks, but how fast he is pressing the keys. So I designed my own system. One key press drops the piece instantly into the correct spot, with the correct rotation. It's making my brain hurt practicing because it requires so much thinking, but once I get it into muscle memory, things are going to get really interesting. My 40 line best using the arrow keys is 45 seconds and with my new scheme it is 2:21. But I'm dropping time quickly and I'm sure very soon I'll beat my record.
- Xcelerate 14y agoOkay, maybe you didn't see how this related. I should have made it clearer. There are a lot of discussions on this page about how Vim's advantage comes from the muscle memory adaptation, relegating text editing to a subconscious, effortless activity rather than something that requires active thought. I was expounding on this concept with an idea of my own and speculating about its potential benefits using analogous logic to that used in the reasoning about Vim's efficiency. Better?
- modarts 14y agoI admit that this is beautifully written, even though I strongly disagree with the premise.
- jordo37 14y agoFully recognize I am outing myself here but the timing seems great given the Vim articles that have been coming up lately, as well as my Lead Engineer keeps bugging me to really get into Vim. I have used it before, but never GOT it. Is there an online guide that is great (and not just a story like this one) or do I need to get the O'Reily Vi and Vim book?