How do I stop Vim from constantly showing 'Hit ENTER to continue' by giving messages more room?
Answer
:set cmdheight=2
Explanation
The cmdheight option controls how many lines Vim reserves for the command-line area at the bottom of the screen. The default of 1 often isn't tall enough to display messages from LSP servers, compilers, or plugins — causing the disruptive "Press ENTER or type command to continue" prompt every time a message spills over. Increasing it to 2 or 3 gives messages enough room to display without requiring a key-press.
How it works
set cmdheight=1(default) — one line; any message longer than the terminal width triggers a hit-enter promptset cmdheight=2— two lines; fits most plugin and LSP status messagesset cmdheight=0(Neovim 0.8+) — hides the command area entirely when idle, reclaiming the line for buffer content; it reappears on demand
Example
With cmdheight=1, an LSP message like this forces a pause:
Language server initialized, 3 diagnostics found. Press ENTER or type command to continue
With :set cmdheight=2, the same message sits quietly in the two-line area:
Language server initialized, 3 diagnostics found.
← second line stays empty, no prompt
Tips
- For plugin-heavy or LSP-enabled setups,
set cmdheight=2in your vimrc is a quality-of-life essential - Neovim 0.8+ users often prefer
set cmdheight=0— the command area appears only when you type a command or a message arrives - Combine with
:set shortmess+=cto suppress less important completion-menu messages and further reduce interruptions :set noshowmoderemoves the-- INSERT --/-- VISUAL --status line, which pairs well with a tallercmdheightwhen you have a plugin rendering mode in the statusline