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

It's CTRL+X and then N to not save changes


Thanks! Gonna try to remember that combo.


You don't even need to remember it. At the bottom it lists keyboard shortcuts, and on the left is "^X Exit". When you press it with a modified file, it gives you:

    Save modified buffer?                                                                               
    Y Yes
    N No           ^C Cancel


It appears in the table of commands at the bottom of the screen by default, doesn't it?


I don't remember exactly, I just remember having a hard time exiting nano but not vim (also not before I knew vim: it just tells you what to do when you press the usual ctrl+c). From the sibling comment to yours, it says ^X which probably wasn't clear to me is supposed to be ctrl instead of shift. With hindsight it seems quite obvious, I'll admit.




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

Search: