blob: c0e53fa7b4095952d8004daf3e3402f1e17d8159 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim syntax support file
2" Maintainer: Bram Moolenaar <Bram@vim.org>
Bram Moolenaar885f24f2016-02-01 22:54:46 +01003" Last Change: 2016 Feb 01
Bram Moolenaar071d4272004-06-13 20:20:40 +00004
5" This file is used for ":syntax manual".
6" It installs the Syntax autocommands, but no the FileType autocommands.
7
8if !has("syntax")
9 finish
10endif
11
12" Load the Syntax autocommands and set the default methods for highlighting.
13if !exists("syntax_on")
14 so <sfile>:p:h/synload.vim
15endif
16
17let syntax_manual = 1
18
Bram Moolenaar885f24f2016-02-01 22:54:46 +010019" Overrule the connection between FileType and Syntax autocommands. This sets
20" the syntax when the file type is detected, without changing the value.
21augroup syntaxset
22 au! FileType * exe "set syntax=" . &syntax
23augroup END
Bram Moolenaar071d4272004-06-13 20:20:40 +000024
25" If the GUI is already running, may still need to install the FileType menu.
Bram Moolenaara7241f52008-06-24 20:39:31 +000026" Don't do it when the 'M' flag is included in 'guioptions'.
27if has("menu") && has("gui_running") && !exists("did_install_syntax_menu") && &guioptions !~# 'M'
Bram Moolenaar071d4272004-06-13 20:20:40 +000028 source $VIMRUNTIME/menu.vim
29endif