Mercurial > vim
annotate runtime/syntax/man.vim @ 29245:b12fd2b3be63 v8.2.5141
patch 8.2.5141: using "volatile int" in a signal handler might be wrong
Commit: https://github.com/vim/vim/commit/155f2d1451949d1124bfd6ba9c55be6bd74bab75
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jun 20 13:38:33 2022 +0100
patch 8.2.5141: using "volatile int" in a signal handler might be wrong
Problem: Using "volatile int" in a signal handler might be wrong.
Solution: Use "volatile sig_atomic_t".
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 20 Jun 2022 14:45:03 +0200 |
parents | a3bb84cd0f59 |
children | 050794aa4ef2 |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: Man page | |
20241 | 3 " Maintainer: Jason Franklin <vim@justemail.net> |
4 " Previous Maintainer: SungHyun Nam <goweol@gmail.com> | |
7 | 5 " Previous Maintainer: Gautam H. Mudunuri <gmudunur@informatica.com> |
6 " Version Info: | |
22441 | 7 " Last Change: 2020 Sep 19 |
7 | 8 |
9 " Additional highlighting by Johannes Tanzler <johannes.tanzler@aon.at>: | |
10 " * manSubHeading | |
11 " * manSynopsis (only for sections 2 and 3) | |
12 | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7272
diff
changeset
|
13 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7272
diff
changeset
|
14 if exists("b:current_syntax") |
7 | 15 finish |
16 endif | |
17 | |
18 " Get the CTRL-H syntax to handle backspaced text | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7272
diff
changeset
|
19 runtime! syntax/ctrlh.vim |
7 | 20 |
21 syn case ignore | |
20115 | 22 |
7 | 23 syn match manReference "\f\+([1-9][a-z]\=)" |
22441 | 24 syn match manSectionHeading "^\a.*$" |
25 syn match manSubHeading "^\s\{3\}\a.*$" | |
7 | 26 syn match manOptionDesc "^\s*[+-][a-z0-9]\S*" |
27 syn match manLongOptionDesc "^\s*--[a-z0-9-]\S*" | |
28 " syn match manHistory "^[a-z].*last change.*$" | |
29 | |
20241 | 30 syn match manHeader '\%1l.*' |
31 exe 'syn match manFooter ''\%' . line('$') . 'l.*''' | |
32 | |
7 | 33 if getline(1) =~ '^[a-zA-Z_]\+([23])' |
34 syntax include @cCode <sfile>:p:h/c.vim | |
35 syn match manCFuncDefinition display "\<\h\w*\>\s*("me=e-1 contained | |
1621 | 36 syn region manSynopsis start="^SYNOPSIS"hs=s+8 end="^\u\+\s*$"me=e-12 keepend contains=manSectionHeading,@cCode,manCFuncDefinition |
7 | 37 endif |
38 | |
39 | |
40 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7272
diff
changeset
|
41 " Only when an item doesn't have highlighting yet |
7 | 42 |
20115 | 43 hi def link manHeader Title |
44 hi def link manFooter PreProc | |
45 | |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
46 hi def link manSectionHeading Statement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
47 hi def link manOptionDesc Constant |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
48 hi def link manLongOptionDesc Constant |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
49 hi def link manReference PreProc |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
50 hi def link manSubHeading Function |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
51 hi def link manCFuncDefinition Function |
7 | 52 |
53 | |
54 let b:current_syntax = "man" | |
55 | |
56 " vim:ts=8 sts=2 sw=2: |