Does pulling the ex line up like below serve any purpose?
Asked
Active
Viewed 42 times
1 Answers
1
It avoids the hit-enter-prompt when issuing a command whose output spans more lines than the cmdheight value.
Vim issues the hit-enter-prompt when the output of the command exceed the cmdheight value.
e.g.:
set cmdheight=1
echo "foo\nbar"
The echo command output spans on two lines but cmdheight is set to 1. Vim will show the two lines temporarily but will prompt the user with Press ENTER or type command to continue before restoring the command height to its cmdheight size.
e.g.:
set cmdheight=2
echo "foo\nbar"
In this example Vim doesn't prompt the user with the hit enter prompt since the output of the command fit within the cmdheight value (2 lines in this case)
Vivian De Smedt
- 16,336
- 3
- 18
- 37

And I wondered if this serves any useful purpose; like for instance, adding line breaks to your ex command.
– leeand00 Mar 21 '24 at 22:36:help cmdheightI believe – D. Ben Knoble Mar 21 '24 at 23:24