home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / mac / vim55rt.sit / runtime / syntax / syntax.vim < prev    next >
Encoding:
Text File  |  1999-09-25  |  955 b   |  35 lines  |  [TEXT/VIM!]

  1. " Vim syntax support file
  2. " Maintainer:    Bram Moolenaar <Bram@vim.org>
  3. " Last change:    1998 Dec 6
  4.  
  5. " This file is used for ":syntax on".
  6. " It installs the autocommands and starts highlighting for all buffers.
  7.  
  8. if has("syntax")
  9.  
  10. " If Syntax highlighting appears to be on already, turn it off first, so that
  11. " any leftovers are cleared.
  12. if exists("syntax_on") || exists("syntax_manual")
  13.   so <sfile>:p:h/nosyntax.vim
  14. endif
  15.  
  16. " Load the Syntax autocommands and set the default methods for highlighting.
  17. so <sfile>:p:h/synload.vim
  18.  
  19. " Load the FileType autocommands, in case that hasn't been done yet.
  20. filetype on
  21.  
  22. " Set up the connection between FileType and Syntax autocommands.
  23. " This makes the syntax automatically set when the file type is detected.
  24. augroup syntax
  25. au! FileType *        exe "set syntax=" . expand("<amatch>")
  26. augroup END
  27.  
  28.  
  29. " Execute the syntax autocommands for the each buffer.
  30. doautoall filetype BufRead
  31.  
  32. endif " has("syntax")
  33.  
  34. " vim: ts=8 sts=0
  35.