Opened 3 years ago

Closed 3 years ago

#2141 closed defect (fixed)

Vim syntax file uses `hi link` instead of `hi def link`

Reported by: chris-morgan@… Owned by:
Priority: minor Milestone:
Component: other Version: 1.19.x
Keywords: vim Cc: chris-morgan@…
uname -a: n/a
nginx -V: n/a

Description

contrib/vim/syntax/nginx.vim, lines 2417 to 2437.

These lines start with hi link, but should start with hi def link. Otherwise I can’t set the highlighting in my colorscheme file, because the syntax file which is loaded after it clobbers it.

See ':highlight-default' in the Vim help for more information and explanation.

  • contrib/vim/syntax/nginx.vim

    a b  
    24142414
    24152415" highlight
    24162416
    2417 hi link ngxComment Comment
    2418 hi link ngxParamComment Comment
    2419 hi link ngxListenComment Comment
    2420 hi link ngxVariable Identifier
    2421 hi link ngxVariableString PreProc
    2422 hi link ngxString String
    2423 hi link ngxListenString String
     2417hi def link ngxComment Comment
     2418hi def link ngxParamComment Comment
     2419hi def link ngxListenComment Comment
     2420hi def link ngxVariable Identifier
     2421hi def link ngxVariableString PreProc
     2422hi def link ngxString String
     2423hi def link ngxListenString String
    24242424
    2425 hi link ngxBoolean Boolean
    2426 hi link ngxDirectiveBlock Statement
    2427 hi link ngxDirectiveImportant Type
    2428 hi link ngxDirectiveListen Type
    2429 hi link ngxDirectiveControl Keyword
    2430 hi link ngxDirectiveError Constant
    2431 hi link ngxDirectiveDeprecated Error
    2432 hi link ngxDirective Identifier
    2433 hi link ngxDirectiveThirdParty Special
    2434 hi link ngxDirectiveThirdPartyDeprecated Error
     2425hi def link ngxBoolean Boolean
     2426hi def link ngxDirectiveBlock Statement
     2427hi def link ngxDirectiveImportant Type
     2428hi def link ngxDirectiveListen Type
     2429hi def link ngxDirectiveControl Keyword
     2430hi def link ngxDirectiveError Constant
     2431hi def link ngxDirectiveDeprecated Error
     2432hi def link ngxDirective Identifier
     2433hi def link ngxDirectiveThirdParty Special
     2434hi def link ngxDirectiveThirdPartyDeprecated Error
    24352435
    2436 hi link ngxListenOptions Keyword
    2437 hi link ngxListenOptionsDeprecated Error
     2436hi def link ngxListenOptions Keyword
     2437hi def link ngxListenOptionsDeprecated Error
    24382438
    24392439let b:current_syntax = "nginx"

Change History (2)

comment:1 by Maxim Dounin <mdounin@…>, 3 years ago

In 7782:dea93b6dce94/nginx:

Contrib: vim syntax, default highlighting (ticket #2141).

Using default highlighting makes it possible to easily overrule
highlighting specified in the syntax file, see ":highlight-default"
in vim help for details.

comment:2 by Maxim Dounin, 3 years ago

Resolution: fixed
Status: newclosed

Fixed, thanks.

Note: See TracTickets for help on using tickets.