News for hackers. Stuff that matters.
Re:Vim Creep by kevinalexbrown on Thursday July 12, 2012 @04:05PM (#4236464)
This 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.

Re:Vim Creep by babarock on Thursday July 12, 2012 @04:37PM (#4236641)
Also, years of evangelism will teach you that you cannot convince someone that Vim is better, let alone great. A lot of the propaganda out there starts by telling people "you're doing it wrong! Let me show you the better way!".

Vim is one of these tools that isn't obviously better, so that you don't really understand its power until you try it (for a few months or so).

I enjoyed this article exactly because the author didn't try to rationalize the superiority of his tool, rather depict in an entertaining way, a familiar (to me) feeling of empowerment said tool can give you.

Re:Vim Creep by einhverfr on Thursday July 12, 2012 @09:07PM (#4237711)
Exactly. This is one reason why I never tell people they are wrong regarding a choice of text editors. Keep in mind I usually have multiple VIM instances open and an instance of gedit (because I do some things that VIM is a little clumsy at regarding my todo list).

What I usually say is something like:

There are text editors and then there are text editors. If you are only spending a few hours a month in front of a text editor, you are probably better off with something simple. If, on the other hand, you are going to be using it all the time, it is well worth your time to learn an industrial strength one like VIM or EMACS. These have learning curves, but they have big payoffs as well regarding productivity.

Re:Vim Creep by icebraining on Friday July 13, 2012 @04:15AM (#4238780)
W.r.t your Todo list, have you tried VimOutliner? It's excellent for that, even having macros for checkboxes and such.
Re:Vim Creep by einhverfr on Friday July 13, 2012 @08:20AM (#4239473)
I haven't tried it. I will take a look. If it has a bunch of useful macros it might work. I might be able to program my own macros as well.

The thing is that Cut this text and past it here is still a very useful paradigm for my todo list, while remove line 47, change the "* " at the beginning of the line to "3) " and replace the current line starting with "3) " is a little less helpful. Note that items in the queue to make my short to-do list are coded either * for larger tasks or % for smaller ones. In theory VIM + macros would work. Just not sure I want to write the macros.

Re:Vim Creep by ipirlo on Sunday July 15, 2012 @04:11AM (#4246484)
why not use Emacs Org mode/ VimOrganizer?
Re:Vim Creep by dredmorbius on Thursday July 12, 2012 @06:31PM (#4237196)
Many worthwhile revelations are inherently experiential. There are a very, very few people who are sufficiently gifted in communication to be able to sell large numbers of people on them. In most cases, though, people simply have to achieve enlightenment or experience the concept for themselves.

The Zen koan of the seeker told he would find enlightenment by acquiring the shirt of the happiest man in the world ... who turns out to be shirtless ... captures something of this essence.

Re:Vim Creep by re_todd on Thursday July 12, 2012 @10:32PM (#4237943)
I love Vim, but I don't ever recommend it to anyone. I think it gives me an advantage. Whey would I want other people using it and thus lose that advantage?
Re:Vim Creep by ehsanu1 on Friday July 13, 2012 @02:28AM (#4238501)
Even if it was for purely selfish reasons, it can make great sense to recommend better things to improve others. The world is not zero sum.
Re:Vim Creep by mun2mun on Thursday July 12, 2012 @04:17PM (#4236537)
Just watch the video of the page 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".
Re:Vim Creep by astrofinch on Friday July 13, 2012 @03:28AM (#4238625)
I'm pretty sure that "re-factoring" could've been accomplished equally fast with the mouse. In most editors, you can double-click to select a token and triple-click to select a line. So the mouse version would be: double-click 10, copy, double-click ten, paste, triple click the line you want to delete, press delete. Pretty fast, really; especially if you're using a laptop where the cost of moving your hand to the mouse is negligible.

I tried Vim for several months and got reasonably competent. But then I timed myself doing the Vim tutorial with Vim and Gedit, and Gedit won handily. For this reason I'm convinced that Vim is only popular because using it gives you hacker cred.

I'm open to changing my mind based on solid experimental evidence, but for now I only use Vim occasionally, for the macros.

Re:Vim Creep by zephod on Friday July 13, 2012 @06:00AM (#4239096)
Your first paragraph ignores the central point of the screencast: How would you record those mouse interactions as a general, reprogrammable macro? He signs off the video with an important statement which hints at the 'zen' of using Vim for a long time: "It's a nice thing to aspire to, to automate all of your interactions with the code in this way".
Re:Vim Creep by noonespecial on Friday July 13, 2012 @01:58AM (#4238436)
Thanks for posting that. I'm a bit of a VIM noob. I learned * and '' from that. Most useful. So much awesome yet to discover.
Re:Vim Creep by solutionyogi on Thursday July 12, 2012 @09:29PM (#4237763)
Wow. That guy's VimFu is crazy. I wish I was half as fast as he is.
Re:Vim Creep by andrewstewart on Thursday July 12, 2012 @11:06PM (#4238021)
Gary 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/

Re:Vim Creep by agumonkey on Friday July 13, 2012 @07:18AM (#4239275)
Ah, I thought the voice was familiar. I like the fact that he types fast but mostly acts smooth. Very easy to follow.

side note, everyone has to watch his https://www.destroyallsoftware.com/talks/wat/ talk

Re:Vim Creep by grammaton on Friday July 13, 2012 @10:09AM (#4239850)
Great screencast, and thanks for including it - but man, that guy really should get a quieter keyboard.
Re:Vim Creep by wyclif on Sunday July 15, 2012 @03:28AM (#4246417)
I love my clickety-clack IBM Model M, and they'll take it away when they pry my cold, dead fingers from it.
Re:Vim Creep by adito on Thursday July 12, 2012 @05:03PM (#4236807)
And he end it with

    :wq
This part make me smile... Wonder what others tough when see that?
Re:Vim Creep by tsm on Thursday July 12, 2012 @06:14PM (#4237128)
For rhetorical effect, `:wq` is right. But in the real world, `:x` is the better choice.
Re:Vim Creep by sofal on Thursday July 12, 2012 @07:50PM (#4237467)
I disagree for the following reason: I think of :w and :q as two concepts, and :x adds a third, which I personally feel adds some cognitive load, like I now have to differentiate between wanting to write, wanting to quit, and wanting to do both at the same time. With :wq it feels to me like I'm deliberately saying "let's write and then quit".

Muscle memory is not likely to kick in anyway because I almost always use :w and :q separately. I'm modifying the file in one tmux window and compiling/running it in another, so I keep the file open in vim. I don't want to replace :q with :x because I want to be alerted if I've made some changes that haven't been written yet, because that means I may have neglected to test them.

Re:Vim Creep by anders0 on Thursday July 12, 2012 @08:57PM (#4237688)
No love for `ZZ` here? :( (And its friend `ZQ`, which is the same as `:q!`.)
Re:Vim Creep by DigitalJack on Thursday July 12, 2012 @07:45PM (#4237450)
I've been using vim for years and didn't know about :x. go figure.
Re:Vim Creep by tsm on Thursday July 12, 2012 @07:58PM (#4237487)
Be aware that :wq will update the last-modified timestamp and :x will only do so if it's actually saving.
Re:Vim Creep by artursapek on Thursday July 12, 2012 @07:54PM (#4237473)
The only time I type :wq is when it's by accident that my finger hits both keys at once. I hate it.
Re:Vim Creep by saraid216 on Thursday July 12, 2012 @07:48PM (#4237459)
Pft. What rhetorical effect? `:x` is always the better choice. :P
Re:Vim Creep by robert_nsu on Friday July 13, 2012 @10:36AM (#4239972)
I still use `:wq` once every blue moon. Only out of habit though.
Re:Vim Creep by tathagatadg on Saturday July 14, 2012 @09:34AM (#4244116)
Same here ... I'd ask people why you wanna do two keystrokes when you understand when to :x. Creatures of habit. One thing I dislike though is accidentally having my shift key pressed which converts the :x to :X and Vim thinks I want to encrypt the file.
Re:Vim Creep by guscost on Thursday July 12, 2012 @04:44PM (#4236688)
I recently discovered a way to learn Vim without fear: learn undo ('u') first! If you know that, you can just mess around with Vim commands until you inevitably screw something up, undo the changes, relax, take a deep breath, and Google whatever you're trying to do.
Re:Vim Creep by irahul on Friday July 13, 2012 @02:24AM (#4238494)
If you are familiar with vim, install gundo.vim and enjoy traversing your undo tree.
Re:Vim Creep by guscost on Friday July 13, 2012 @08:41PM (#4242649)
Awesome.
Re:Vim Creep by helpbygrace on Thursday July 12, 2012 @07:00PM (#4237309)
and Ctrl + R for redo.
Re:Vim Creep by pyre on Thursday July 12, 2012 @11:28PM (#4238089)
... and this to go back to the state of the file 10 minutes ago:

  :earlier 10m
and

  :later 10m
to go back. Note: This is independent of undo/redo cycles as Vim keeps track of that in a tree-like structure. There's just no really great default way of accessing it. See Gundo for a plugin that tries to make it more accessible.
Re:Vim Creep by alttab on Friday July 13, 2012 @12:10PM (#4240385)
You just blew my mind.
Re:Vim Creep by SilasX on Friday July 13, 2012 @04:08AM (#4238758)
>Addendum: I use vim and pentadactyl. They are extremely awesome, fantastic, and exhilarating.

Hell yeah! In fact, I came to Vim through pentadactyl because I wanted a way to browse without using the mouse. I second the description of "exhilarating": navigating pages from the keyboard is much, much faster than clicking on links (except in those cases where the poor site design makes the clickable buttons undetectable to pentadactyl... Psst, HN search result navigation, that means you)

Re:Vim Creep by icebraining on Friday July 13, 2012 @04:12AM (#4238772)
And the ring that binds them together is Pentadactyl's Ctrl+i, which opens the the textarea with focus in GVim, and then loads it back when you close the editor. I'm typing this in it ;)
Re:Vim Creep by SilasX on Friday July 13, 2012 @04:23AM (#4238811)
Wow, and you learn new features every day. Thanks! (It probably teaches such a trick in the tutorial but early on I was busy de-Vimming the actual text input in browsers when I first installed it...)
Re:Vim Creep by ipirlo on Sunday July 15, 2012 @04:18AM (#4246503)
gF to open the html source in vim