explaingit

hakluke/how-to-exit-vim

7,192Audience · developerComplexity · 1/5Setup · easy

TLDR

A community joke repository collecting deliberately absurd and overcomplicated methods for quitting the Vim text editor, from rebooting the computer to reimplementing Vim in Rust.

Mindmap

mindmap
  root((how-to-exit-vim))
    What it does
      Joke exit methods list
      Community contributions
      Absurd alternatives to colon q
    Methods included
      Kill process via shell
      Reboot the computer
      Rewrite Vim in Rust
    Languages featured
      Python Ruby C
      Perl PowerShell
      AppleScript
    Audience
      Developers
      Vim frustrated users
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Browse the list for a laugh and share it with fellow developers who have experienced Vim's infamous exit confusion.

USE CASE 2

Find an outrageously over-engineered Vim exit method in your preferred language, Python, Ruby, C, PowerShell, Perl, and more.

Getting it running

Difficulty · easy Time to first run · 5min
No license information is provided in this repository.

In plain English

how-to-exit-vim is a joke repository that lists deliberately overcomplicated and absurd methods for quitting the Vim text editor. Vim is a command-line text editor that has been around since the 1990s and is famous for confusing new users with its unusual interface: to do almost anything, including saving and quitting, you type specific keyboard commands rather than using menus or buttons. The actual correct way to exit Vim is to press Escape, type ":q!", and hit Enter. This repository ignores that entirely and instead collects contributions from the developer community offering increasingly ridiculous alternatives. Methods in the list include: killing the Vim process from within Vim itself using shell commands, rebooting the computer, pulling out the power cable, reimplementing Vim in the Rust programming language and then exiting that version instead, using AppleScript to automate keystrokes on a Mac, opening the Mac Activity Monitor to force-quit the process, and simply walking away. One method sets a random timer that kills Vim at an unpredictable future moment. Another suggests aliasing the vim command to /bin/true so that Vim never actually opens in the first place. There are also methods in Python, Perl, Ruby, C, and PowerShell, each routing around the normal quit command to achieve the same end result through a more convoluted path. The repository has over 7,000 stars, reflecting how widely recognized the "how do I exit Vim" frustration is in the developer community. It is a community running joke, not a practical guide. The README contains no license information.

Copy-paste prompts

Prompt 1
Write a Python script inspired by the how-to-exit-vim repo that finds the running Vim process by name and kills it using its PID.
Prompt 2
Using the shell alias trick from how-to-exit-vim, write a .zshrc line that prevents Vim from ever opening and silently exits instead.
Prompt 3
Show me the AppleScript approach from how-to-exit-vim that automates the keystrokes needed to quit Vim on a Mac via the Activity Monitor.
Open on GitHub → Explain another repo

← hakluke on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.