On Aug 27, 6:25 am, Fredrik Melander <melan...@dfn-cert.de> wrote:
>
>         tab all
>         map <Tab> :tabn<cr>
>         map <S-Tab> :tabp<cr>
>
>         set autochdir
>         source $HOME/.vim/plugin/vtreeexplorer.vim
>
>         function Test()
>                 30 vsplit
>                 set nonu
>                 VTreeExplore
>         endfunction
>
>         tabdo call Test()
>
> Something like that. Opening vim with N files results in N-1 correctly
> displayed tabs plus one always ends up completely blank. I'd blame my
> own ignorance if it weren't for the fact that if I comment out the
> tabdo-line, open the files and then manually run "tabdo call Test()"
> from within vim, it all works as expected.
>

Since it works if you load each file manually then call the tabdo, I
suspect Vim doesn't like doing all this during startup (though I don't
know the reason).

Try this minor modification and see if it works better:

        tab all
        map <Tab> :tabn<cr>
        map <S-Tab> :tabp<cr>

        set autochdir

        function Test()
                30 vsplit
                set nonu
                VTreeExplore
        endfunction

        autocmd VimEnter * tabdo call Test()

This way you don't try to run your function until after Vim is all
done with initialization. In addition, you don't need to source the
plugin in your .vimrc, Vim can just do it normally.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to