What you might want to do is use echom rather than plain echo.
The former sticks it's output into the message buffer and you can then
read it with:
On 12 October 2016 at 17:53, Graham Lawrence <gl00...@gmail.com> wrote:
> I have written a .vim script that does one of a number of possibilites to
> the word at the cursor. If this word is alphabetic the script retrieves a
> definition for its root word into @m, which it echoes as its last command.
> Run under :debug the script does exactly as expected, but run independently
> it returns either nothing (apparently), or 3 messages at the foot of the
> screen, being
> "file-name" \d\+L, \d\+C
> the definition found, or that none was found
> Press ENTER or type command to continue
> the last item being in slightly greenish type, and if one does then press
> Enter, all 3 messages promptly disappear. So I assume what is happening
> when nothing shows is that the script itself, or the system, in some way
> presses Enter automatically.
> The behavior is consistent: the word 'styles' always returns the 3 line
> display with the definition for 'style'; the word 'peduncles' always
> apparently returns nothing, though the definition for 'peduncle' is duly
> present in @m.
> I tried starting the script with ':redraw|set lz', but to no effect
> Is there any method that will prevent the screen being redrawn, or, better,
> redraw the screen and then do 'echo @m'?
> Graham Lawrence
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
> You received this message because you are subscribed to the Google Groups
> "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to vim_use+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
You received this message because you are subscribed to the Google Groups
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/d/optout.