aboutsummaryrefslogtreecommitdiff
path: root/runtime/syntax
diff options
context:
space:
mode:
authorAnmol Sethi <anmol@aubble.com>2016-08-24 11:56:33 -0400
committerJustin M. Keyes <justinkz@gmail.com>2016-09-03 12:57:41 -0400
commitf8fc8f51c0db0137a696f65a8ba75c89c1012119 (patch)
treee5591214a8a28b5cd6dce41865e295260d2df734 /runtime/syntax
parent94dfb6cea24180592af5c495dd9e8abf61d5735f (diff)
downloadrneovim-f8fc8f51c0db0137a696f65a8ba75c89c1012119.tar.gz
rneovim-f8fc8f51c0db0137a696f65a8ba75c89c1012119.tar.bz2
rneovim-f8fc8f51c0db0137a696f65a8ba75c89c1012119.zip
man.vim #5249
- fix synopsis highlighting in other locales. Cannot always rely on the first line for the section in some locales; instead, use the file path and explicitly set b:man_sect to the actual section. - eliminate separate s:man_args function - simplify logic: do not reuse buffer content - introduce b:man_default_sects Fixes #5233 - introduce <Plug>(man_vsplit), <Plug>(man_tab) - simplify regexps
Diffstat (limited to 'runtime/syntax')
-rw-r--r--runtime/syntax/man.vim6
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/syntax/man.vim b/runtime/syntax/man.vim
index 5dd41b3af5..4a527dd350 100644
--- a/runtime/syntax/man.vim
+++ b/runtime/syntax/man.vim
@@ -7,10 +7,10 @@ endif
syntax case ignore
syntax match manReference display '[^()[:space:]]\+([0-9nx][a-z]*)'
-syntax match manSectionHeading display '^\%(\S.*\)\=\S$'
+syntax match manSectionHeading display '^\S.*$'
syntax match manTitle display '^\%1l.*$'
syntax match manSubHeading display '^ \{3\}\S.*$'
-syntax match manOptionDesc display '^\s\+\%(+\|--\=\)\S\+'
+syntax match manOptionDesc display '^\s\+\%(+\|-\)\S\+'
highlight default link manTitle Title
highlight default link manSectionHeading Statement
@@ -18,7 +18,7 @@ highlight default link manOptionDesc Constant
highlight default link manReference PreProc
highlight default link manSubHeading Function
-if getline(1) =~# '^[^()[:space:]]\+([23].*'
+if b:man_sect =~# '^[23]'
syntax include @c $VIMRUNTIME/syntax/c.vim
syntax match manCFuncDefinition display '\<\h\w*\>\ze\(\s\|\n\)*(' contained
syntax region manSynopsis start='^\%(