Start anew
[msysgit.git] / share / vim / vim58 / syntax / syntax.vim
blobbbe8ee3d5f181d9e32ee6b1afc5738c03767d471
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.
8 if has("syntax")
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
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.
20 filetype on
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
29 " Execute the syntax autocommands for the each buffer.
30 doautoall filetype BufRead
32 endif " has("syntax")
34 " vim: ts=8 sts=0