On 22/03/09 10:29, 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?
>
It depends on what the func does in addition to the echo, and in
particular on whether it returns a value.
- This function
func Hi()
echomesg "hi"
endfunc
adds the message to Vim's message list so you can recall it with
:messages
- That one:
func Hello()
return "Hello"
endif
can be called with
:echo Hello()
- Then this one
func HowDoYouDo()
let g:Howdy = "How do you do?"
echo g:Howdy
endfunc
saves its message in a global variable so you can recall it at any point
after the function returns.
Best regards,
Tony.
--
Good day to let down old friends who need help.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---