> .vimrc:
>     au VimLeave * :call PrintAtExit()
>     function! PrintAtExit()
>         echo "bye-bye"
>         !echo bye-bye
>     endfun
> 
> Expecting
> 
>    $ vim foo
>    ZZ
>    bye-bye
> 
> But "bye-bye" does not appear. Anybody has an idea how to print
> in VimLeave  so that it's visible after vim quit to shell ?

It depends on your terminal.  The xterm (and its ilk) have two 
screens that can be switched between.  For hairy details, you can 
read at

   :help xterm-screens

So when Vim starts, it usually flips to the alternate screen, and 
then upon exit (after your "echo" attempts) switches back to the 
primary screen.  As detailed in the help above (under "NOTE 2"), 
you can try adding

   set t_ti= t_te=

to your vimrc.  This will prevent Vim from flipping screens. 
You'll get left with the screen-content from vim, but also with 
the output of your "echo" commands.

-tim




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

Reply via email to