r/programming • • Apr 01 '19

Stack Overflow ~ Helping One Million Developers Exit Vim πŸ˜‚

https://stackoverflow.blog/2017/05/23/stack-overflow-helping-one-million-developers-exit-vim/
2.5k Upvotes

441 comments sorted by

View all comments

640

u/cleeder Apr 01 '19

The developers who are most likely to get stuck in Vim are front-end web developers: those who primarily visit tags like JQuery, CSS, and AngularJS. They’re followed by Microsoft developers (C# and SQL Server) and mobile (Android and iOS).

Sounds about what I would expect.

17

u/instanced_banana Apr 01 '19

As someone who uses Linux in his main PC, I now feel kinda bad to not know how to exit Vim. Kinda because I enter in those 3 groups.

26

u/Acceptable_Damage Apr 01 '19

Escape :q!

9

u/flukus Apr 02 '19

ZZ

10

u/ub3rh4x0rz Apr 02 '19 edited Apr 02 '19

ZZ = :wq :x

ZQ = :q!

edit: fixed ZZ equivalency

4

u/stone_henge Apr 02 '19

ZZ isn't exactly equivalent to :wq. ZZ only writes the file if it has been modified. For an example where this difference is significant, open a new, named file without actually editing it and try ZZ. Then do the same with :wq. In the former case no file will have been written. In the latter case you'll have an empty file.

→ More replies (1)
→ More replies (2)

2

u/jl2352 Apr 02 '19

TIL.

Here’s me using :q for all these years like a schmuck.

4

u/EntityDamage Apr 02 '19

:Q

Shit, caps lock was on

:q

Now it's recording? Shit!

:q :q :q FUCK JUST EXIT!!

2

u/MuonManLaserJab Apr 02 '19

<C-Z>killall vim<CR>

→ More replies (1)

11

u/ekun Apr 02 '19
  1. 'ctrl+z' to send the vim process to the background

  2. then search for the process id with this command

ps aux | grep vim

3. then use sudo to kill that process id

sudo kill -9 processID

4. then enter your password

password:

5

u/Jonno_FTW Apr 02 '19

killall vim for the same effect.

→ More replies (2)

2

u/[deleted] Apr 02 '19

[removed] β€” view removed comment

→ More replies (1)
→ More replies (7)

7

u/ruinercollector Apr 01 '19

Type :q in edit mode.

3

u/ChillTea Apr 02 '19

edit mode

Triggered!

→ More replies (2)
→ More replies (2)