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 / vim54rt.sit / runtime / syntax / nosyntax.vim < prev    next >
Encoding:
Text File  |  1999-08-14  |  697 b   |  31 lines  |  [TEXT/ALFA]

  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 off".
  6. " It removes the autocommands and stops highlighting for all buffers.
  7.  
  8. if has("syntax")
  9.  
  10.   " remove all syntax autocommands and remove the syntax for each buffer
  11.   augroup syntax
  12.     au!
  13.     au BufEnter * syn clear
  14.     au BufEnter * if exists("b:current_syntax") | unlet b:current_syntax | endif
  15.     doautoall syntax BufEnter *
  16.     au!
  17.   augroup END
  18.  
  19.   " Just in case: remove all autocommands for the Syntax event
  20.   au! Syntax
  21.  
  22.   if exists("syntax_on")
  23.     unlet syntax_on
  24.   endif
  25.   if exists("syntax_manual")
  26.     unlet syntax_manual
  27.   endif
  28. endif
  29.  
  30. " vim: ts=8
  31.