Loading ...
Sorry, an error occurred while loading the content.
 

Re: How to map file extension for syntax highlighting

Expand Messages
  • Tim Chase
    ... set ... setfiletype ) ... you should be able to put this in xmlconfig syntax file that is activated on *.cfg buffers containing the xml prolog (
    Message 1 of 5 , Feb 28, 2002
      > > > I have file with CFG extension that's actually XML. I'd like vim to
      set
      > > > the syntax coloring to XML format. How can I do this?
      > >
      > > this should be as simple as ":setfiletype xml" (see ":help
      setfiletype")
      > That'll work while I've got the file in vim, but how can I set it so it's
      > applied automatically when the file is opened?

      you should be able to put this in "xmlconfig" syntax file that is activated
      on *.cfg buffers containing the xml prolog (<?xml version="1.0"?>) as seen
      in the filetype.vim file. If you look at how xml files are identified in
      filetype.vim, you should be able to copy and tweak it to load an
      xmlconfig.vim from your syntax directory wherein you ":setf xml".

      Somebody please correct me if I'm way off base here :*)

      -tkc
    Your message has been successfully submitted and would be delivered to recipients shortly.