On Mon, 23 Mar 2009 21:41:13 +0800, Tony Mechelynck  
<[email protected]> wrote:

>
> On 23/03/09 14:09, Charles Campbell wrote:
>>
>> Yue Wu wrote:
>>> On Sat, 21 Mar 2009 11:51:25 +0800, Yue Wu<[email protected]>  wrote:
>>>
>>>
>>>> I have a func:
>>>>
>>>> func Hi()
>>>>    echo "hi"
>>>>    return ""
>>>> endfunc
>>>>
>>>> When I invoke it in insert mode by
>>>>
>>>>       <C-R>=Hi()<CR>
>>>>
>>>> the echo will go away immidiately after call the func as there isn't  
>>>> such
>>>> an echo, how can I prevent its goaway and remain in the screen's  
>>>> bottom
>>>> line after call the func?
>>>>
>>>>
>>>
>>> Is it impossible?
>>>
>>>
>>
>> Try
>>    :set cmdheight=2
>>
>> Regards,
>> Chip Campbell
>>
>
> Reading the question again, you (Yue Wu) are echoing the function's
> return value (the empty string) immediately after the function returns,
> thus erasing what was displayed by the function itself.
>
> You may prefer to invoke the function (still from Insert mode) by
>
>       <C-O>:call Hi()<CR>
>
> which does not dosplay the return value.
>
>
> Best regards,
> Tony.

Thank you for your explanation, now I get that there isn't an easy way
to achieve it, <C-O> can, but has side effect that it has to escape to
normal mode temporarily, that's not what I want.

-- 
Regards,
Van.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to