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.

199

u/Flkdnt Apr 01 '19

Don't forget Windows Sysadmins who touch a production Linux server once every couple months. πŸ˜‚πŸ˜‚πŸ˜‚πŸ˜‚

65

u/ruinercollector Apr 01 '19

I find that the sysadmins usually find out about pico/nano quickly and stay over there...

38

u/Flkdnt Apr 01 '19

Oh I love nano, but sometimes I find myself in Vi looking like a 5 year old trying to learn how to type.

30

u/nicksvr4 Apr 02 '19

Had to use vi yesterday, what a shit show. Couldn't figure out how to append something. Will never forget how to quit these God forsaken applications after getting stuck a couple times in the past.

28

u/static_motion Apr 02 '19

Well appending is one of the most intuitive commands in vi, you just press a. If that inserts the letter "a", press Esc first to exit insert mode then press a.

27

u/tribak Apr 02 '19

How do I remove the `a` that was typed earlier?

24

u/elsnoir Apr 02 '19

Press β€˜x’

48

u/tribak Apr 02 '19

Now there's an "x" next the `a`.

24

u/elsnoir Apr 02 '19

You need to hit β€˜Esc’ to get out of insert mode first

→ More replies (0)
→ More replies (1)
→ More replies (8)
→ More replies (3)

18

u/lordlionhunter Apr 02 '19

Am sysadmin. Learned to use vim from other sysadmins. Working on many remote servers and need to be able to make quick changes for debugging or whatever? Vim is the best choice. Works over every ssh connection and once you learn it, it's as good as any text editor.

11

u/meneldal2 Apr 02 '19

I'd argue the butterfly works even better, you don't even need a ssh connection.

10

u/RNGsus_Christ Apr 02 '19

Nice. 'Course, there's a Vim mode for that.

→ More replies (1)

8

u/imral Apr 02 '19

it's as good as any text editor.

No, it's far better :-D

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

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)
→ More replies (4)

4

u/EntityDamage Apr 02 '19

:Q

Shit, caps lock was on

:q

Now it's recording? Shit!

:q :q :q FUCK JUST EXIT!!

→ More replies (2)

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)
→ More replies (9)

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)
→ More replies (21)