On 11/02/10 01:33, Tim Johnson wrote:
I'm using version 7.2/normal/Gui on slackware 13/32-bit.

I have vim runing, loaded with a session file, and then opened for
editing some html files. Syntax highlighting *will not* work for the
html filetype. Syntax highlight *is* working for other filetypes.

Furthermore, if I open the same html files in another instance of
vim loaded from another session file, the syntax highlighting for
html files does work.

If I were to make a wild guess here, I would guess that there is
some setting in the session file that is preventing the syntax
highlighting for the html filetype?

And advice would be appreciated.
thanks

I suppose there is something fishy with your session file, but without hands-down testing it's hard to say what.

I suggest that rather than use :mksession, you construct (at least one time) a "custom session file" by writing into a new script (which can be named, for instance, ~/Session.vim if you don't need to keep another default session) all the ex-commands which you would use at the command-line to reload your current files in a new Vim just after it starts up. No need to duplicate any settings already in your vimrc, but don't forget anything: most of the commands will be ":e <filename>" ":new <filename>" etc. but maybe now and then an ":lcd <directory>" etc. (You can leave out the initial colons.) Start Vim as "vim -S" or "gvim -S" to source this handmade script (which will probably be much shorter and much easier to understand than a session file made by :mksession) -- if you wrote it the right way, then your files will be loaded correctly, with syntax highlighting and all.


Best regards,
Tony.
--
Nothing is faster than the speed of light ...

To prove this to yourself, try opening the refrigerator door before the
light comes on.

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

Reply via email to