How do I prevent Vim from pausing at the --More-- prompt when displaying long command output?
Answer
:set nomore
Explanation
When a Vim command produces output that exceeds the terminal height, Vim pauses and displays a -- More -- prompt, requiring you to press a key to continue. Setting nomore disables this pause entirely so all output is shown at once.
How it works
:set more(the default) enables the pause-at-end-of-screen behavior:set nomoredisables it, letting output scroll past without interruption- This affects any command that produces multi-page output:
:messages,:reg,:history,:scriptnames,:map, and others
Example
With the default more setting, running :scriptnames on a large config shows:
1: ~/.vim/vimrc
2: ~/.vim/bundle/plug.vim
...
-- More --
After :set nomore, the full list prints without pausing.
Tips
- Useful in scripts invoked with
vim -cwhere interactive prompts break automation - Commonly set in
~/.vimrcalongside:redircapture workflows so the full output is redirected without needing manual confirmation - Restore the default with
:set more - In Neovim,
nomorealso suppresses the pause invim.cmd()calls from Lua