Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

:messages query API, kill "Press ENTER" with fire #22478

Open
justinmk opened this issue Mar 2, 2023 · 1 comment
Open

:messages query API, kill "Press ENTER" with fire #22478

justinmk opened this issue Mar 2, 2023 · 1 comment
Labels
api libnvim, Nvim RPC API enhancement feature request messages UI messages, log messages ui
Milestone

Comments

@justinmk
Copy link
Member

justinmk commented Mar 2, 2023

Problem

"Press ENTER" prompt is obnoxious. Most messages do not require explicit user confirmation. No, not even error messages.

The prevalence of "Press ENTER" is mostly an accident because of vim's reliance on stale tty state to show a message.

Related:

Expected behavior

:messages should be querable via an API.
All messages emitted by Nvim should have metadata allowing Nvim (and plugins etc) to better decide:

  1. which messages genuinely need active user confirmation
  2. which messages can be shown passively (in the cmdline/message area)
  3. which messages need a pager
  4. which messages should be shown for a minimum of X seconds, fading away after some time

Message metadata

  • result (needs pager -- or actual buffer/floating window)
  • error (needs message, and be sticky; user cannot silence)
    • most errors don't need confirm. they can be "sticky" by showing them in the cmdline/message area (which may get overwritten by another message, then show +3 errors in 'showcmd')
  • confirm (invokes "Press ENTER" or something like it)
  • info (needs message, but user can decide how it happens)
  • progress (be sticky and replaceable)

Eliminate "Press ENTER" (for 99% of cases)

With the above, Nvim can do smart things like , instead of showing "Press ENTER", show +3 messages in the 'showcmd' area (e.g.) and the user can check them if they want (via a mapping like g< or g>).

"Press ENTER" should be very rare except for actually dangerous situations.
"Editing a readonly file" is not a dangerous situation.

@9mm

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api libnvim, Nvim RPC API enhancement feature request messages UI messages, log messages ui
Projects
None yet
Development

No branches or pull requests

2 participants