1 " Vim syntax support file
2 " Maintainer: Bram Moolenaar <Bram@vim.org>
3 " Last Change: 1998 Dec 6
5 " This file is used for ":syntax on".
6 " It installs the autocommands and starts highlighting for all buffers.
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
16 " Load the Syntax autocommands and set the default methods for highlighting.
17 so <sfile>:p:h/synload.vim
19 " Load the FileType autocommands, in case that hasn't been done yet.
22 " Set up the connection between FileType and Syntax autocommands.
23 " This makes the syntax automatically set when the file type is detected.
25 au! FileType * exe "set syntax=" . expand("<amatch>")
29 " Execute the syntax autocommands for the each buffer.
30 doautoall filetype BufRead