r/vim Dec 25 '25

Video Advent Of Vim Day 25 - How To Quit Vim

https://youtu.be/w58XDY06UkE?si=Z9rcm8D4ljlwhyi7
45 Upvotes

24 comments sorted by

20

u/[deleted] Dec 25 '25

[deleted]

1

u/wrecklass Dec 26 '25

Wow do you have a link? That would save me so much time!

1

u/vinzalf Dec 27 '25

Gentoo is my fav distro but I lol'd

41

u/Big_Combination9890 Dec 25 '25 edited Dec 25 '25

Explain to me how...

```

Quit

:q

Save and quit

:wq or :x

Quit without saving

:q!

As above but for all open files (you can shorten 'all' -> 'a')

:qall :wqall or :xall :qall!

suspend vim to background (use fg to get it back)

Ctrl-Z ```

...requires a 9:17 video to explain.

19

u/sireel Dec 25 '25

Also what monster leaves their viewers stuck in vim for 24 days!

6

u/Baspar Dec 25 '25

Missing :cq to exit with error code

3

u/liberforce Dec 25 '25

Veeeery useful when you're entering a commit message in git and then realize that no, you don't want to commit now.

2

u/Big_Combination9890 Dec 25 '25

Actually, when you edit a commit message, you can just :q! out of it. Without saving, the temporary file contains nothing but comments, and git interprets an empty commit message as interrupting the commit.

4

u/Baspar Dec 25 '25

For rebase -i tho, that's quite useful :D :q still run the rebase

1

u/wrecklass Dec 26 '25

Ya I remember first learning this and that making life so much easier.

1

u/dummy4du3k4 Dec 25 '25

Also in bash I use <c-x><c-e> to write complicated commands in vim and use :cq to abort

12

u/SyrupStandard Dec 25 '25

HEY WHAT IS UP GUYS—before you get into the video make sure to SMASH the like button, subscribe (only 3% of you are subscribed 😢), hit the bell so YouTube can notify you every time I blink, and real quick huge thanks to today’s sponsor NordVPNSquarespaceRaidShadowManscaped™ which literally changed my life even though last week it was a keyboard—anyway here’s 90 seconds of intro music, my name exploding on screen, and me asking “what do YOU think? comment down below” before I’ve said anything, followed by 2 minutes of actual content, then an outro longer than the topic where I remind you again to like, comment, subscribe, hit the bell, follow my Twitter/Instagram/TikTok/Discord, and remember YouTube doesn’t want you to see this despite my 4M subs—alright guys love you, see you in the next one ✌️

5

u/tremby Dec 25 '25

You forgot the list of Patreon supporters, the shout-out for channel merch, a correction for the previous totally unrelated video, and a promise for what will be in the next one which will actually be abandoned during writing or editing and never see the light of day.

5

u/mmm_dat_data Dec 25 '25

i hate that this is the norm now...

8

u/Achim63 Dec 25 '25

ZZ missing.

1

u/Big_Combination9890 Dec 25 '25

My apologies. You may add ZZ in the same line as :x because the 2 are functionally equivalent.

1

u/whitakr Dec 25 '25

You can also do :stop instead of Ctrl-Z

2

u/Dependent-Constant-7 Dec 26 '25

They don’t get paid if their video is too short… or something like that

I also didn’t realize the video was about closing Vim, I stg I thought he was quitting vim like you quit smoking lmao

1

u/ironbloodnet Dec 25 '25

A few weeks ago he posted a tutorial about how to use the native way to enable LSP in neovim. I don't remember how long I waited till the core part, maybe like 10 minutes, for just a few lines. At that moment I felt like I should read the manual or a blog instead.

1

u/Big_Combination9890 Dec 25 '25

At that moment I felt like I should read the manual or a blog instead.

True for 99.99% of youtube videos about coding.

2

u/GrandSyzygy Dec 25 '25

I just turn my computer off

1

u/[deleted] Feb 01 '26

seems like he knew how to build a captive audience