How to exit vi/vim?

in #programming7 years ago (edited)

You have to press ESC at first - Vim enters command mode. And then type:

:q! to quit without saving (think: quit)
:wq to write and quit (write and quit)

followed by ENTER key.

This was the most searched question on stack overflow.
Source: https://stackoverflow.blog/2017/05/23/stack-overflow-helping-one-million-developers-exit-vim/

Coin Marketplace

STEEM 0.24
TRX 0.25
JST 0.040
BTC 94242.56
ETH 3408.52
USDT 1.00
SBD 3.35