mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 19:38:20 +00:00
38 lines
1.3 KiB
VimL
38 lines
1.3 KiB
VimL
" Maintainer: Anmol Sethi <anmol@aubble.com>
|
|
" Previous Maintainer: SungHyun Nam <goweol@gmail.com>
|
|
|
|
if exists('b:current_syntax')
|
|
finish
|
|
endif
|
|
|
|
syntax case ignore
|
|
syntax match manReference display '[^()[:space:]]\+([0-9nx][a-z]*)'
|
|
syntax match manSectionHeading display '^\%(\S.*\)\=\S$'
|
|
syntax match manTitle display '^\%1l.*$'
|
|
syntax match manSubHeading display '^ \{3\}\S.*$'
|
|
syntax match manOptionDesc display '^\s\+\%(+\|--\=\)\S\+'
|
|
|
|
highlight default link manTitle Title
|
|
highlight default link manSectionHeading Statement
|
|
highlight default link manOptionDesc Constant
|
|
highlight default link manReference PreProc
|
|
highlight default link manSubHeading Function
|
|
|
|
if getline(1) =~# '^[^()[:space:]]\+([23].*'
|
|
syntax include @c $VIMRUNTIME/syntax/c.vim
|
|
syntax match manCFuncDefinition display '\<\h\w*\>\ze\(\s\|\n\)*(' contained
|
|
syntax region manSynopsis start='^\%(
|
|
\SYNOPSIS\|
|
|
\SYNTAX\|
|
|
\SINTASSI\|
|
|
\SKŁADNIA\|
|
|
\СИНТАКСИС\|
|
|
\書式\)$' end='^\%(\S.*\)\=\S$' keepend contains=manSectionHeading,@c,manCFuncDefinition
|
|
highlight default link manCFuncDefinition Function
|
|
endif
|
|
|
|
" Prevent everything else from matching the last line
|
|
execute 'syntax match manFooter display "^\%'.line('$').'l.*$"'
|
|
|
|
let b:current_syntax = 'man'
|