Hacker News new | past | comments | ask | show | jobs | submit login

Bad advice. Just :q not :q!

Let it give you the warning and then hit :q! if you're really sure.

Also, it's probably better to tell new vi users to write and exit with :w it works just as well and is more consistent.




I use :wq always when saving and exiting so I can see and remember exactly what's happening, despite shortcuts existing.

And :q when just exiting as you mentioned for exactly this reason. Tell me I'm quitting without saving so I can decide what to do next.


:w only writes, doesn't exit. :wq writes and exits, or :x




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: