* Tony Mechelynck <antoine.mechely...@gmail.com> [100210 18:43]:
> 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'm glad that you verify my suspicions, unfortunately without
 making a backup, I did the following.
 1)Opened the session file in vim
 2)deleted all but the badd lines and used gf to reload the files
   (30-40 in that project).
 3)Then I found I could load html files with proper syntax
 highlighting.
 
> 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.
 I already do part of what you suggest - that is - I give the
 session file a name appropriate to my project which gives leverage
 to other tools that I use, and I have a simple shell script:
 ....
 gvim -geom -0+0 -S $1
 .....
 and launch from mc by placing the mc cursor on the session file,
 then <space> and <alt-enter> <enter> and the project is restarted.
 A better fix might have been to strip out all but badd <filepath>,
 global search and replace of 'badd' with 'e' and add the lcd
 command. 

> Best regards,
> Tony.
 Thanks Tony.
 tj
> 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

-- 
Tim 
t...@johnsons-web.com
http://www.akwebsoft.com

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

Reply via email to