News for hackers. Stuff that matters.
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.