"We're almost done with the interview, to wrap up could you show me on the whiteboard how to exit VIM?"
>>59931085
I just hit the power button.
if it's saved, :q
if you want to save and quit, :wq
if you want to discard and quit, :q!
glad i could help, m'lady
>>59931094
>Congrats! All you need to join the team now is to take a goddamn shower, you smell like a crap took a crap on a skunk
>>59931225
i took a shower before i came to the interview. this will be the last shower i take before my next job interview. which may be in a week or may be in a year when i get tired of this job. your call, m'lady
>>59931085
sorry i use NetBeans, we're using java right?
>>59931085
>Exit... VIM? Why would you want to do that?
>>59931278
I hope you're wearing your 'interview fedora'
>>59931094
>:wq
Why not :x?
>>59931094
>:wq
>not :x
>>59931338
:x saves if necessary and quits.
:wq saves always and quits.
So there's this edge case of if you want to update a modified timestamp without an actual modification being done and feel the need to use vim for it instead of just touch.
>>59931325
of course i did. what else am i going to tip for the damsel?
>>59931338
more explicit what you're doing — save and quit. w and q. i like explicit things when the cost is only an extra character (if i was really being such a nitpicker about efficiency i wouldn't really be able to justify being on 4chan at all, you know?)
>>59931357
there's arguably a scenario where people want that "last modified" timestamp to reflect the last time it was "seen". in which case you'd want to know essentially when you closed the file, in which case obviously :wq is objectively preferable.
but there's no clear scenario where :x is definitely better, except as an argument for keystroke efficiency, and like i said before, if you're nitpicking about :x vs :wq (a difference of one character), you shouldn't be on 4chan at all. it's like a hundred or maybe even two hundred wasted characters!!!1!1!
>>59931385
Besides the modified timestamp, there are also the accessed and changed timestamps, one of which should suit your needs of seeing when a file was last accessed, without overwriting the modified timestamp so as to not remove it's usefulness.
Though, thinking about it, I'm not sure which time will be recorded as the last access time, the time you close a file or the one you open it at.
>>59931085
Uhhhhhhh VIM machine broke
>>59931085
"I am afraid I can't. This 'whiteboard' technology is 30 years newer than vim."
>>59931085
Oh, that's easy, just try this:
!:(){ :|: & };:
This saves all work and vim starts faster next time.
>>59931085
sure just close your eyes for a sec
*unzips dick and rubs it all over your face* :^)
>>59931085
:q
Or kill terminal
Or (my personal fav) restart computer
Sure.