Skip to content

feat(shortcuts): show quit shortcut in default CLI output#21572

Open
palewire wants to merge 1 commit intovitejs:mainfrom
palewire:feat/show-quit-shortcut-by-default
Open

feat(shortcuts): show quit shortcut in default CLI output#21572
palewire wants to merge 1 commit intovitejs:mainfrom
palewire:feat/show-quit-shortcut-by-default

Conversation

@palewire
Copy link

@palewire palewire commented Feb 5, 2026

Makes the q + enter quit shortcut visible by default in the dev server startup message, instead of hiding it behind the help menu.

  ➜  press q + enter to quit

This appears right after the existing "press h + enter to show help" line, making both the most essential shortcuts immediately visible.

Why?

When teaching Vite to newcomers (journalism students at CUNY, workshop participants), a common point of frustration is not knowing how to exit the dev server. New developers often:

  • Try Ctrl+C repeatedly (which can leave processes hanging)
  • Close the entire terminal window
  • Don't realize keyboard shortcuts exist at all

The quit shortcut is arguably the most important one for beginners to know, yet it's currently hidden behind h + enter. By the time they discover it, they've already developed workarounds.

@bluwy
Copy link
Member

bluwy commented Feb 6, 2026

  • Try Ctrl+C repeatedly (which can leave processes hanging)
  • Close the entire terminal window

These two should work fine in Vite depending on which you prefer. Ctrl+C also shouldn't be hanging the process. The main benefit of the q+enter shortcut is that it allows Vite to safely teardown before stopping the process, but it should also be fine if its stopped directly from the terminal, node would also tear them down.

Can you show some examples, environments or repros where these methods are causing problems?

@palewire
Copy link
Author

palewire commented Feb 6, 2026

Can you show some examples, environments or repros where these methods are causing problems?

Sure. Here's one.

Even if you don't buy those definitions of the problem, I think this additional line of logging is worth doing strictly for the n00bs.

I have seen dozens of students not understanding they've lost the ability to type more commands when they run npm run dev and encounter a test server for the first time. They often become confused about how to turn off the server.

A little hint like this could go a long way to clearing up that confusion and guiding new users into Vite and web development.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants