Vim's UserGettingBored autocmd
Vim, a popular text editor, has an amusing feature called UserGettingBored, which is an autocmd that doesn't perform any function. The autocmd feature in Vim allows users to execute code when certain events occur, such as saving a file or creating a buffer. There are over 100 such events, ranging from "buffer was created" to "file was saved".
However, UserGettingBored stands out as peculiar. According to the documentation, it activates when a user presses the same key 42 times. This joke autocmd was first introduced by Bram Moolenaar in July 2000, more than a year before Vim 6.0 was released. Initially, the description simply read: "When the user hits CTRL-C. Just kidding!".
This remained unchanged until August 2001, when Moolenaar added a smiley face to the documentation: "When the user hits CTRL-C. Just kidding! :-)" A decade later, in 2013, the description evolved into its present form: "When the user presses the same key 42 times. Just kidding! :-)" In 2022, developer Mike Smith developed an unofficial plugin based on this joke autocmd.
Now, if a user presses the same key 42 times in Insert mode during a Vim session, a picture of Samuel L. Jackson is displayed.
Written by urgent.news from Lobsters's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.