Mercurial > vim
annotate runtime/syntax/man.vim @ 23505:bb29b09902d5 v8.2.2295
patch 8.2.2295: incsearch does not detect empty pattern properly
Commit: https://github.com/vim/vim/commit/d93a7fc1a98a58f8101ee780d4735079ad99ae35
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jan 4 12:42:13 2021 +0100
patch 8.2.2295: incsearch does not detect empty pattern properly
Problem: Incsearch does not detect empty pattern properly.
Solution: Return magic state when skipping over a pattern. (Christian
Brabandt, closes #7612, closes #6420)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 04 Jan 2021 12:45:05 +0100 |
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: |