On Mon 6-Nov-06 11:02pm -0600, you wrote:

> There is not-a-solution-but-weird-workaround at

>     http://www.vim.org/tips/tip.php?tip_id=1379
>     Tip #1379: make echo seen when it would otherwise disappear and go unseen

Nice idea.  I've expanded it a bit by changing the
CursorHold to get rid of itself and restore the previous
value of 'updatetime'.  The following was added to your tip:

" The following is a self destructive version of the
" CursorHold autocmd.  It also restores 'updatetime'.

let s:Pecho=''
fu! s:Pecho(msg)
  if &ut!=11|let s:hold_ut=&ut|let &ut=11|en
  let s:Pecho=a:msg
  aug Pecho
  au CursorHold * if s:Pecho!=''|echo s:Pecho
    \|let s:Pecho=''|let &ut=s:hold_ut|en
    \|aug Pecho|exe 'au!'|aug END|aug! Pecho
  aug END
endf

" Test of above

au! BufEnter foo call s:Pecho("Entered foo")

" Now even changing to "foo" in a different tab page
" will print the message.

-- 
Best regards,
Bill

Reply via email to