Mercurial > vim
annotate runtime/syntax/snnsres.vim @ 12847:14f287552218 v8.0.1300
patch 8.0.1300: file permissions may end up wrong when writing
commit https://github.com/vim/vim/commit/cd142e3369db8888163a511dbe9907bcd138829c
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Nov 16 17:03:45 2017 +0100
patch 8.0.1300: file permissions may end up wrong when writing
Problem: File permissions may end up wrong when writing.
Solution: Use fchmod() instead of chmod() when possible. Don't truncate
until we know we can change the file.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 16 Nov 2017 17:15:06 +0100 |
parents | 46763b01cd9a |
children |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: SNNS result file | |
3 " Maintainer: Davide Alberani <alberanid@bigfoot.com> | |
4 " Last Change: 28 Apr 2001 | |
5 " Version: 0.2 | |
6 " URL: http://digilander.iol.it/alberanid/vim/syntax/snnsres.vim | |
7 " | |
8 " SNNS http://www-ra.informatik.uni-tuebingen.de/SNNS/ | |
9 " is a simulator for neural networks. | |
10 | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
11 " 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
|
12 if exists("b:current_syntax") |
7 | 13 finish |
14 endif | |
15 | |
16 " the accepted fields in the header | |
17 syn match snnsresNoHeader "No\. of patterns\s*:\s*" contained | |
18 syn match snnsresNoHeader "No\. of input units\s*:\s*" contained | |
19 syn match snnsresNoHeader "No\. of output units\s*:\s*" contained | |
20 syn match snnsresNoHeader "No\. of variable input dimensions\s*:\s*" contained | |
21 syn match snnsresNoHeader "No\. of variable output dimensions\s*:\s*" contained | |
22 syn match snnsresNoHeader "Maximum input dimensions\s*:\s*" contained | |
23 syn match snnsresNoHeader "Maximum output dimensions\s*:\s*" contained | |
24 syn match snnsresNoHeader "startpattern\s*:\s*" contained | |
25 syn match snnsresNoHeader "endpattern\s*:\s*" contained | |
26 syn match snnsresNoHeader "input patterns included" contained | |
27 syn match snnsresNoHeader "teaching output included" contained | |
28 syn match snnsresGen "generated at.*" contained contains=snnsresNumbers | |
29 syn match snnsresGen "SNNS result file [Vv]\d\.\d" contained contains=snnsresNumbers | |
30 | |
31 " the header, what is not an accepted field, is an error | |
32 syn region snnsresHeader start="^SNNS" end="^\s*[-+\.]\=[0-9#]"me=e-2 contains=snnsresNoHeader,snnsresNumbers,snnsresGen | |
33 | |
34 " numbers inside the header | |
35 syn match snnsresNumbers "\d" contained | |
36 syn match snnsresComment "#.*$" contains=snnsresTodo | |
37 syn keyword snnsresTodo TODO XXX FIXME contained | |
38 | |
39 | |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
40 hi def link snnsresGen Statement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
41 hi def link snnsresHeader Statement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
42 hi def link snnsresNoHeader Define |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
43 hi def link snnsresNumbers Number |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
44 hi def link snnsresComment Comment |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
45 hi def link snnsresTodo Todo |
7 | 46 |
47 | |
48 let b:current_syntax = "snnsres" | |
49 | |
50 " vim: ts=8 sw=2 |