blob: 8388336f25c8c8e473dd3fc1c1bcb4b098130a4d [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim syntax support file
Christian Brabandte978b452023-08-13 10:33:05 +02002" Maintainer: The Vim Project <https://github.com/vim/vim>
3" Last Change: 2023 Aug 10
4" Former Maintainer: Bram Moolenaar <Bram@vim.org>
Bram Moolenaar071d4272004-06-13 20:20:40 +00005
6" This file is used for ":syntax manual".
7" It installs the Syntax autocommands, but no the FileType autocommands.
8
9if !has("syntax")
10 finish
11endif
12
13" Load the Syntax autocommands and set the default methods for highlighting.
14if !exists("syntax_on")
15 so <sfile>:p:h/synload.vim
16endif
17
18let syntax_manual = 1
19
Bram Moolenaar885f24f2016-02-01 22:54:46 +010020" Overrule the connection between FileType and Syntax autocommands. This sets
21" the syntax when the file type is detected, without changing the value.
22augroup syntaxset
23 au! FileType * exe "set syntax=" . &syntax
24augroup END
Bram Moolenaar071d4272004-06-13 20:20:40 +000025
26" If the GUI is already running, may still need to install the FileType menu.
Bram Moolenaara7241f52008-06-24 20:39:31 +000027" Don't do it when the 'M' flag is included in 'guioptions'.
28if has("menu") && has("gui_running") && !exists("did_install_syntax_menu") && &guioptions !~# 'M'
Bram Moolenaar071d4272004-06-13 20:20:40 +000029 source $VIMRUNTIME/menu.vim
30endif