Mercurial > vim
annotate runtime/syntax/dylanintr.vim @ 11533:c83dd5fa40d8 v8.0.0649
patch 8.0.0649: when opening a help file the filetype is set several times
commit https://github.com/vim/vim/commit/9049298f8d0bbc237b7c666c7ad6cdabe738e8fc
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jun 22 14:16:31 2017 +0200
patch 8.0.0649: when opening a help file the filetype is set several times
Problem: When opening a help file the filetype is set several times.
Solution: When setting the filetype to the same value from a modeline, don't
trigger FileType autocommands. Don't set the filetype to "help"
when it's already set correctly.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 22 Jun 2017 14:30:03 +0200 |
parents | 46763b01cd9a |
children |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: Dylan | |
3 " Authors: Justus Pendleton <justus@acm.org> | |
4 " Last Change: Fri Sep 29 13:53:27 PDT 2000 | |
5 " | |
6 | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
7 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
8 if exists("b:current_syntax") |
7 | 9 finish |
10 endif | |
11 | |
12 syn case ignore | |
13 | |
14 syn region dylanintrInfo matchgroup=Statement start="^" end=":" oneline | |
15 syn match dylanintrInterface "define interface" | |
16 syn match dylanintrClass "<.*>" | |
17 syn region dylanintrType start=+"+ skip=+\\\\\|\\"+ end=+"+ | |
18 | |
19 syn region dylanintrIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+ | |
20 syn match dylanintrIncluded contained "<[^>]*>" | |
21 syn match dylanintrInclude "^\s*#\s*include\>\s*["<]" contains=intrIncluded | |
22 | |
23 "syn keyword intrMods pointer struct | |
24 | |
25 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
26 " Only when an item doesn't have highlighting yet |
7 | 27 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
28 hi def link dylanintrInfo Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
29 hi def link dylanintrInterface Operator |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
30 hi def link dylanintrMods Type |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
31 hi def link dylanintrClass StorageClass |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
32 hi def link dylanintrType Type |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
33 hi def link dylanintrIncluded String |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
34 hi def link dylanintrInclude Include |
7 | 35 |
36 | |
37 let b:current_syntax = "dylanintr" | |
38 | |
39 " vim:ts=8 |