Mercurial > vim
annotate runtime/syntax/config.vim @ 12975:e311187347c1 v8.0.1363
patch 8.0.1363: recovering does not work when swap file ends in .stz
commit https://github.com/vim/vim/commit/af903e5d490ec9c6c49079f67de7e92e3c35a725
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Dec 2 15:11:22 2017 +0100
patch 8.0.1363: recovering does not work when swap file ends in .stz
Problem: Recovering does not work when swap file ends in .stz.
Solution: Check for all possible swap file names. (Elfling, closes https://github.com/vim/vim/issues/2395,
closes #2396)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 02 Dec 2017 15:15:05 +0100 |
parents | 46763b01cd9a |
children | 167a030448fa |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: configure.in script: M4 with sh | |
3 " Maintainer: Christian Hammesr <ch@lathspell.westend.com> | |
6505 | 4 " Last Change: 2015 Jan 14 |
5 " (patch from Yngve Inntjore Levinsen to detect AC_MSG) | |
6 " (patch from Khym Chanur to add @Spell) | |
7 | 7 |
8 " Well, I actually even do not know much about m4. This explains why there | |
9 " is probably very much missing here, yet ! | |
6505 | 10 " But I missed good highlighting when editing my GNU autoconf/automake |
7 | 11 " script, so I wrote this quick and dirty patch. |
12 | |
13 | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
6505
diff
changeset
|
14 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
6505
diff
changeset
|
15 if exists("b:current_syntax") |
7 | 16 finish |
17 endif | |
18 | |
19 " define the config syntax | |
20 syn match configdelimiter "[()\[\];,]" | |
21 syn match configoperator "[=|&\*\+\<\>]" | |
6505 | 22 syn match configcomment "\(dnl.*\)\|\(#.*\)" contains=configDnl,@Spell |
7 | 23 syn match configfunction "\<[A-Z_][A-Z0-9_]*\>" |
24 syn match confignumber "[-+]\=\<\d\+\(\.\d*\)\=\>" | |
6505 | 25 syn keyword configDnl dnl contained |
7 | 26 syn keyword configkeyword if then else fi test for in do done |
27 syn keyword configspecial cat rm eval | |
6505 | 28 |
29 " This shortens the script, see syn-ext-match.. | |
30 syn region configstring start=+\z(["'`]\)+ skip=+\\\z1+ end=+\z1+ contains=@Spell | |
31 | |
32 " Anything inside AC_MSG_TYPE([...]) and AC_MSG_TYPE(...) is a string. | |
33 syn region configstring matchgroup=configfunction start="AC_MSG_[A-Z]*\ze(\[" matchgroup=configdelimiter end="\])" contains=configdelimiter,@Spell | |
34 syn region configstring matchgroup=configfunction start="AC_MSG_[A-Z]*\ze([^[]" matchgroup=configdelimiter end=")" contains=configdelimiter,@Spell | |
7 | 35 |
36 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
6505
diff
changeset
|
37 " Only when an item doesn't have highlighting yet |
7 | 38 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
39 hi def link configdelimiter Delimiter |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
40 hi def link configoperator Operator |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
41 hi def link configcomment Comment |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
42 hi def link configDnl Comment |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
43 hi def link configfunction Function |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
44 hi def link confignumber Number |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
45 hi def link configkeyword Keyword |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
46 hi def link configspecial Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
47 hi def link configstring String |
7 | 48 |
49 | |
50 let b:current_syntax = "config" | |
51 | |
52 " vim: ts=4 |