blob: 0ab34123730f938c0c641af67eb13e7214ddd9e2 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim syntax support file
2" Maintainer: Bram Moolenaar <Bram@vim.org>
Bram Moolenaarb21e5842006-04-16 18:30:08 +00003" Last Change: 2006 Apr 16
Bram Moolenaar071d4272004-06-13 20:20:40 +00004
5" This file is used for ":syntax off".
6" It removes the autocommands and stops highlighting for all buffers.
7
8if !has("syntax")
9 finish
10endif
11
Bram Moolenaarb21e5842006-04-16 18:30:08 +000012" Remove all autocommands for the Syntax event. This also avoids that
13" "syntax=foo" in a modeline triggers the SynSet() function of synload.vim.
14au! Syntax
15
Bram Moolenaar071d4272004-06-13 20:20:40 +000016" remove all syntax autocommands and remove the syntax for each buffer
17augroup syntaxset
18 au!
19 au BufEnter * syn clear
20 au BufEnter * if exists("b:current_syntax") | unlet b:current_syntax | endif
21 doautoall syntaxset BufEnter *
22 au!
23augroup END
24
Bram Moolenaar071d4272004-06-13 20:20:40 +000025if exists("syntax_on")
26 unlet syntax_on
27endif
28if exists("syntax_manual")
29 unlet syntax_manual
30endif