Thursday, October 13, 2016

Re: Inconsistent behavior at end of .vim script

Hi Graham,

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:

:mes

HTH.

On 12 October 2016 at 17:53, Graham Lawrence <gl00637@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+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--

Frank

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: