How to exit vi/vim?

in #programming8 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.18
TRX 0.24
JST 0.034
BTC 96187.44
ETH 2668.60
SBD 0.43