Mercurial > vim
annotate runtime/syntax/man.vim @ 10048:43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Aug 30 23:26:57 2016 +0200
Updated runtime files. Remove version checks for Vim older than 6.0.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 30 Aug 2016 23:30:09 +0200 |
parents | 17333ebd2bbd |
children | 46763b01cd9a |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: Man page | |
2034 | 3 " Maintainer: SungHyun Nam <goweol@gmail.com> |
7 | 4 " Previous Maintainer: Gautam H. Mudunuri <gmudunur@informatica.com> |
5 " Version Info: | |
7272
17333ebd2bbd
commit https://github.com/vim/vim/commit/d042dc825c9b97dacd84d4728f88300da4d5b6b9
Christian Brabandt <cb@256bit.org>
parents:
2034
diff
changeset
|
6 " Last Change: 2015 Nov 24 |
7 | 7 |
8 " Additional highlighting by Johannes Tanzler <johannes.tanzler@aon.at>: | |
9 " * manSubHeading | |
10 " * manSynopsis (only for sections 2 and 3) | |
11 | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7272
diff
changeset
|
12 " 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
|
13 if exists("b:current_syntax") |
7 | 14 finish |
15 endif | |
16 | |
17 " 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
|
18 runtime! syntax/ctrlh.vim |
7 | 19 |
20 syn case ignore | |
21 syn match manReference "\f\+([1-9][a-z]\=)" | |
22 syn match manTitle "^\f\+([0-9]\+[a-z]\=).*" | |
7272
17333ebd2bbd
commit https://github.com/vim/vim/commit/d042dc825c9b97dacd84d4728f88300da4d5b6b9
Christian Brabandt <cb@256bit.org>
parents:
2034
diff
changeset
|
23 syn match manSectionHeading "^[a-z][a-z -]*[a-z]$" |
17333ebd2bbd
commit https://github.com/vim/vim/commit/d042dc825c9b97dacd84d4728f88300da4d5b6b9
Christian Brabandt <cb@256bit.org>
parents:
2034
diff
changeset
|
24 syn match manSubHeading "^\s\{3\}[a-z][a-z -]*[a-z]$" |
7 | 25 syn match manOptionDesc "^\s*[+-][a-z0-9]\S*" |
26 syn match manLongOptionDesc "^\s*--[a-z0-9-]\S*" | |
27 " syn match manHistory "^[a-z].*last change.*$" | |
28 | |
29 if getline(1) =~ '^[a-zA-Z_]\+([23])' | |
30 syntax include @cCode <sfile>:p:h/c.vim | |
31 syn match manCFuncDefinition display "\<\h\w*\>\s*("me=e-1 contained | |
1621 | 32 syn region manSynopsis start="^SYNOPSIS"hs=s+8 end="^\u\+\s*$"me=e-12 keepend contains=manSectionHeading,@cCode,manCFuncDefinition |
7 | 33 endif |
34 | |
35 | |
36 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7272
diff
changeset
|
37 " Only when an item doesn't have highlighting yet |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7272
diff
changeset
|
38 command -nargs=+ HiLink hi def link <args> |
7 | 39 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7272
diff
changeset
|
40 HiLink manTitle Title |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7272
diff
changeset
|
41 HiLink manSectionHeading Statement |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7272
diff
changeset
|
42 HiLink manOptionDesc Constant |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7272
diff
changeset
|
43 HiLink manLongOptionDesc Constant |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7272
diff
changeset
|
44 HiLink manReference PreProc |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7272
diff
changeset
|
45 HiLink manSubHeading Function |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7272
diff
changeset
|
46 HiLink manCFuncDefinition Function |
7 | 47 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7272
diff
changeset
|
48 delcommand HiLink |
7 | 49 |
50 let b:current_syntax = "man" | |
51 | |
52 " vim:ts=8 sts=2 sw=2: |