On 10/11/06, Kamaraju Kusumanchi <[EMAIL PROTECTED]> wrote:
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?
Does 'syn off | syn on' fixes the colors in this situation ?
Yakov