When I save and load a session, the syntax highlighting is messed up.

I am able to reproduce the problem as follows. Consider helloworld.f90

$cat helloworld.f90
program helloworld
    implicit none

    write(*,*) 'Hello World\n'
end program helloworld

If I do

$gvim helloworld.f90

I get something like shown in working.png ( 
http://kamaraju.googlepages.com/vim_problems ). Now
inside the gvim session, I did

:mksession! test.vim

After this, exiting gvim and opening test.vim using

gvim -S test.vim

gave me something like shown in not_working.png

Why is the syntax highlighting messed up in the second case? I have a bunch of
configuration files
namely .vimrc, .gvimrc, .vim/ftplugin/fortran.vim, .vim/indent/fortran.vim
which ensure that the syntax highlighting is correct in the first case. But I
do not know why these files are not being loaded when I am restoring the
session using -S. Any ideas?

PS: This mailing list does not seem to accept any attachments. That is why I 
uploaded the screenshots to http://kamaraju.googlepages.com/vim_problems .

thanks
raju

-- 
http://groups.google.com/group/ask-anything/about

Reply via email to