3 ms·
Depends on your editor i suppose, but vipe checks the exit code of it [1]. In vim you can exit with an error using :cq [1]: https://github.com/pgdr/moreutils/b
by delusional 5y ago
Depends on your editor i suppose, but vipe checks the exit code of it [1]. In vim you can exit with an error using :cq
[1]: https://github.com/pgdr/moreutils/blob/f4a811d0a1fafb3d7b0e7f514d85916ae3933942/vipe#L89 https://github.com/pgdr/moreutils/blob/f4a811d0a1fafb3d7b0e7...
- foresto 5y agoExiting vim with :cq is also handy for backing out of git commits.
- delusional 5y agoI use the mnemonic "cancel-quit" for exactly that reason.
- reayn 5y agoPressing ZQ in insert mode also provides the same effect!
- toxik 5y agoIn normal mode, not insert mode. ZQ in insert mode inserts ZQ.
- reayn 5y agoOh my bad, i had a bit of a stroke writing my comment lol.
- CGamesPlay 5y agoActually, it doesn’t. ZQ is the same as :q! which quits without saving with a 0 exit code. So all of your git branches get deleted in this example, since you left the file as it was. You definitely want :cq here.