How can I reliably print a message and pause during processing of .vimrc? I'm using vim 7.4 (not gvim) on Linux Mint. The input() function behaves erratically as shown below. The redraw function doesn't seem to help. I'd like to print a message and wait for the user to press a key to proceed.
Any tips?
For example, with my .vimrc set to:
redraw!
echo "xa"
redraw!
call input("y123456")
redraw!
echo "xb"
redraw!
call input("z123456")
redraw!
echo "xc"
redraw!
with vim -u .vimrc --noplugin no-such-file
, I see:
xay123456
, on the bottom line (~ on the other lines), with cursor on the digit 5- press ENTER
xbz123456
, with cursor about 6 or 7 characters after the digit 6- press ENTER
xcPress ENTER or type command to continue
, with cursor immediately after "continue"- press ENTER
- `"no-such-file" [New File]
with vim -u .vimrc --noplugin
I see:
- screen 2/3 full of ~ down the left side, with
y123456
towards the right side, about 15 lines above the bottom line, with cursor on the (empty) bottom line about 8 characters from the left - press ENTER
- screen unchanged except for bottom line now says
xbz123456
with cursor about 6 characters to the right of the digit 6 - press ENTER
- last line now says
xcPress ENTER or type command to continue
with cursor just aftercontinue
- press ENTER
- normal screen with nothing on the bottom line