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

Re: user-defined syntax highlighting for multiple files

Expand Messages
  • A. J. Mechelynck
    Yakov Lerner wrote: [...] ... As a user, you never need to modify anything in or under $VIMRUNTIME. And you should rather leave that directory tree alone,
    Message 1 of 5 , Feb 25, 2006
      Yakov Lerner wrote:
      [...]
      > 2. places your syntax defs into separate file under
      > ~/.vim/syntax/ and make it
      > detectable by filetype mechanism. I believe you need
      > to modify file $VIMRUNTIME/filetype.vim for that
      >
      > Yakov

      As a user, you never need to modify anything in or under $VIMRUNTIME.
      And you should rather leave that directory tree alone, because any
      upgrade (including a new v7 snapshot or a new v6 patchlevel) can
      silently overwrite anything in it.

      - If you create a new filetype, add a filetype.vim in some other
      directory in 'runtimepath' (e.g. as ~/.vim/filetype.vim) with the
      autocommands necessary to detect that new filetype.

      - If you only alter the syntax for an existing filetype, filetype.vim
      will usually need no change; instead, your changes will go in e.g.
      ~/.vim/after/syntax/<something>.vim (for small changes) or in
      ~/.vim/syntax/<something>.vim (for a rewrite from scratch) (where
      <something> is the syntax name, which is normally the same as the
      filetype). (On Windows, ~/vimfiles replaces ~/.vim; on most platforms,
      there is also a $VIM/vimfiles [not .vim] which is sytem-wide rather than
      user-specific.)


      Best regards,
      Tony.
    Your message has been successfully submitted and would be delivered to recipients shortly.