Changeset 54452


Ignore:
Timestamp:
Jul 27, 2009, 8:59:57 PM (9 years ago)
Author:
mnick@…
Message:
  • correct portfile_highlight_space_errors handling
  • fix optional -append/-delete for configure.args
File:
1 edited

Legend:

Unmodified
Added
Removed
  • contrib/mpvim/syntax/portfile.vim

    r54447 r54452  
    22" Language:     MacPorts Portfiles
    33" Author:               Maximilian Nickel <mnick@macports.org>
    4 " Copyright:    Copyright (c) 2009 Maximilian Nickel
    5 " Licence:              You may redistribute this under the same terms as Vim itself
    64"
    75
     
    1412endif
    1513
     14" Disable whitespace error highlight if variable is not set
     15if !exists("g:portfile_highlight_space_errors")
     16        let g:portfile_highlight_space_errors=0
     17endif
     18
    1619let is_tcl=1
    17 let portfile_highlight_space_errors=1
    1820runtime! syntax/tcl.vim
    1921
     
    5759syn keyword PortfilePhasesConf  use_configure nextgroup=PortfileYesNo skipwhite
    5860syn match PortfilePhasesConf    "configure\.\(env\|\(c\|ld\|cpp\|cxx\|objc\|f\|fc\|f90\)flags\)\(-\(append\|delete\)\)\?"
    59 syn match PortfilePhasesConf    "configure\.\(\(pre\|post\)\-\)\?args\(-\(\append\|delete\)\)" nextgroup=PortfileConfEntries skipwhite
     61syn match PortfilePhasesConf    "configure\.\(\(pre\|post\)\-\)\?args\(-\(\append\|delete\)\)\?" nextgroup=PortfileConfEntries skipwhite
    6062syn region PortfileConfEntries  matchgroup=Normal start="" skip="\\$" end="$" contained
    6163syn match PortfilePhasesConf    "configure\.\(cc\|cpp\|cxx\|objc\|fc\|f77\|f90\|javac\|compiler\)"
     
    124126
    125127" check whitespace, copied from python.vim
    126 if exists("portfile_highlight_space_errors")
     128if g:portfile_highlight_space_errors == 1
    127129  " trailing whitespace
    128130  syn match   PortfileSpaceError   display excludenl "\S\s\+$"ms=s+1
     
    159161hi def link PortfileGroups                              Keyword
    160162
    161 if exists("portfile_highlight_space_errors")
     163if g:portfile_highlight_space_errors == 1
    162164        hi def link PortFileSpaceError  Error
    163165endif
Note: See TracChangeset for help on using the changeset viewer.