Urgent.News

What's breaking now, across thousands of outlets.

Tech

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.

Read the original at evanhahn.com →

More in Tech

Why software supply-chain management matters more in the AI era

Why software supply-chain management matters more in the AI era TL;DR AI did not invent software supply-chain risk. It accelerated how fast untrusted code, models, and packages enter your build…

  • AI accelerates untrusted code influx in software supply chains
  • Traditional control plane measures remain crucial in software security
  • Engineering leads should focus on provenance, identity, publish authority, and enforcement

Java Concurrency & Multithreading: 40 Interview Questions

1. Process vs Thread A process has its own memory space and OS resources; threads live inside a process and share its heap and file handles but keep their own stack and program counter.

  • Threads share process memory but have separate stacks and program counters.
  • Java provides platform threads (expensive) and lightweight virtual threads (Project Loom).
  • Java Memory Model ensures visibility guarantees for shared state between threads.

More from Sunday 20 September →