Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Also, don't use :q!, just use ZZ, its quicker.

But ZZ is equivalent to :wq, which is different. If OP finds themself in a text file in vim by accident and started typing a word, they will likely NOT want to save those changes. (Hence OP's :q!, rather than :q.)



If you've made changes then yes its not equivalent, keep in mind I NEVER open a file for editing unless I intend to edit.

That is what view/more/less are for.


Oh, cool! I didn't know about view, actually... I'd been using vim to poke around in files because I'm familiar with the navigation key commands, and was always keen to make sure not to edit something. But opening as read-only is great!




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: