From 062b5f7398da079e067e6ad1992ac97ed32f707d Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Mon, 18 Feb 2019 18:00:20 -0500 Subject: Match statics and typedefs as Tag --- bin/hi.c | 5 ++++- bin/man1/hi.1 | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/hi.c b/bin/hi.c index 2656313a..e36d1467 100644 --- a/bin/hi.c +++ b/bin/hi.c @@ -93,8 +93,11 @@ static const struct Syntax CSyntax[] = { .pattern = "define" BL1 "(" PATTERN_ID ")" BL0 "[(]" }, { Tag, .subexp = 2, .pattern = "(enum|struct|union)" SP1 "(" PATTERN_ID ")" SP0 "[{]" }, - { Tag, .parent = ~SET(Keyword), .subexp = 1, + { Tag, .parent = ~SET(Keyword), .newline = true, .subexp = 1, .pattern = "(" PATTERN_ID ")" SP0 "[(][^)]*[)]" SP0 "[{]" }, + { Tag, .newline = true, .subexp = 3, .pattern = + "(static|typedef)" SP1 + "(" "(" PATTERN_ID ")" SP0 "([*]|[[][^]]*[]]|[{][^}]*[}])*" SP0 ")+" }, { String, .parent = SET(Macro), .subexp = 1, .pattern = "include" BL0 "(<[^>]*>)" }, { String, diff --git a/bin/man1/hi.1 b/bin/man1/hi.1 index 0d82ca75..b852bf50 100644 --- a/bin/man1/hi.1 +++ b/bin/man1/hi.1 @@ -72,7 +72,7 @@ The options are as follows: .Bl -tag -width "title=..." .It Cm anchor Output tags -(type and function definitions) +(top-level definition names) as anchor links. . .It Cm css Ns = Ns Ar url -- cgit 1.4.1 2f0c12840e7d8950ac025fea1c&follow=1'>diff
path: root/bin/man1/title.1 (unfollow)
Commit message (Expand)Author
2022-06-02Set TABSIZE=4June McEnroe
2022-06-02Do basic match highlightingJune McEnroe
2022-06-02Clean up parsing a littleJune McEnroe
2022-06-02Don't duplicate path stringJune McEnroe
2022-06-02Use stderr instead of /dev/tty, realloc buffer if lines too longJune McEnroe
2022-06-02Add initial working version of qfJune McEnroe
2022-05-29Set prompt for okshJune McEnroe