1071d4279SBram Moolenaar" Vim syntax support file 2071d4279SBram Moolenaar" Maintainer: Bram Moolenaar <[email protected]> 3*885f24fbSBram Moolenaar" Last Change: 2016 Feb 01 4071d4279SBram Moolenaar 5071d4279SBram Moolenaar" This file is used for ":syntax manual". 6071d4279SBram Moolenaar" It installs the Syntax autocommands, but no the FileType autocommands. 7071d4279SBram Moolenaar 8071d4279SBram Moolenaarif !has("syntax") 9071d4279SBram Moolenaar finish 10071d4279SBram Moolenaarendif 11071d4279SBram Moolenaar 12071d4279SBram Moolenaar" Load the Syntax autocommands and set the default methods for highlighting. 13071d4279SBram Moolenaarif !exists("syntax_on") 14071d4279SBram Moolenaar so <sfile>:p:h/synload.vim 15071d4279SBram Moolenaarendif 16071d4279SBram Moolenaar 17071d4279SBram Moolenaarlet syntax_manual = 1 18071d4279SBram Moolenaar 19*885f24fbSBram Moolenaar" Overrule the connection between FileType and Syntax autocommands. This sets 20*885f24fbSBram Moolenaar" the syntax when the file type is detected, without changing the value. 21*885f24fbSBram Moolenaaraugroup syntaxset 22*885f24fbSBram Moolenaar au! FileType * exe "set syntax=" . &syntax 23*885f24fbSBram Moolenaaraugroup END 24071d4279SBram Moolenaar 25071d4279SBram Moolenaar" If the GUI is already running, may still need to install the FileType menu. 26a7241f5fSBram Moolenaar" Don't do it when the 'M' flag is included in 'guioptions'. 27a7241f5fSBram Moolenaarif has("menu") && has("gui_running") && !exists("did_install_syntax_menu") && &guioptions !~# 'M' 28071d4279SBram Moolenaar source $VIMRUNTIME/menu.vim 29071d4279SBram Moolenaarendif 30