Hi all :)

I want to use different statusline for the current window so I put
these into my .gvimrc file:

        " Use different statusline for the active window
        autocmd! WinEnter *     setlocal statusline=%!MyStatusLine() | echomsg
'xyz'
        autocmd! TabEnter *     setlocal statusline=%!MyStatusLine() | echomsg
'xyz'

        " restore the global statusline so that 'StatusLineNC' hi group can
be used
        " for non-active windows
        autocmd! WinLeave *     setlocal statusline<

        function!       MyStatusLine(...)
                " ... parse statusline otherwise
        endfunction

The 'echomsg' command is just a verification that the autocmd was
successfully fired. But even it does the local statusline still won't
change for a freshly opened window. It was like:
        :vsplit another_file    or
        :tabedit another_file
then I got 'xyz' in the message list, but ':echo &l:statusline' still
shows nothing and the statusline was in no way updated. How can I
change this?

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

Reply via email to