neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

iss.vim (5004B)


      1 " Vim syntax file
      2 " Language:             Inno Setup File (iss file) and My InnoSetup extension
      3 " Maintainer:           Jason Mills (jmills@cs.mun.ca)
      4 " Previous Maintainer:  Dominique Stéphan (dominique@mggen.com)
      5 " Last Change:          2023 Jan 26
      6 "
      7 " Todo:
      8 "  - Pascal scripting syntax is not recognized.
      9 "  - Embedded double quotes confuse string matches. e.g. "asfd""asfa"
     10 
     11 " quit when a syntax file was already loaded
     12 if exists("b:current_syntax")
     13  finish
     14 endif
     15 
     16 " shut case off
     17 syn case ignore
     18 
     19 " match keywords with colon
     20 syn iskeyword @,48-57,_,192-255,:
     21 
     22 " Preprocessor
     23 syn region issPreProc start="^\s*#" end="$"
     24 
     25 " Section
     26 syn region issSection	start="\[" end="\]"
     27 
     28 " Label in the [Setup] Section
     29 syn match  issDirective	"^[^=]\+="
     30 
     31 " URL
     32 syn match  issURL	"http[s]\=:\/\/.*$"
     33 
     34 " Parameters used for any section.
     35 " syn match  issParam "[^: ]\+:"
     36 syn keyword issParam	Name:
     37 syn keyword issParam	MinVersion: OnlyBelowVersion: Languages:
     38 syn keyword issParam	Source: DestDir: DestName: CopyMode: ExternalSize:
     39 syn keyword issParam	Attribs: Permissions: FontInstall: Flags:
     40 syn keyword issParam	FileName: Parameters: WorkingDir: HotKey: Comment:
     41 syn keyword issParam	IconFilename: IconIndex:
     42 syn keyword issParam	Section: Key: String:
     43 syn keyword issParam	Root: SubKey: ValueType: ValueName: ValueData:
     44 syn keyword issParam	RunOnceId:
     45 syn keyword issParam	Type: Excludes:
     46 syn keyword issParam	Components: Description: GroupDescription: Types: ExtraDiskSpaceRequired:
     47 syn keyword issParam	StatusMsg: RunOnceId: Tasks:
     48 syn keyword issParam	MessagesFile: LicenseFile: InfoBeforeFile: InfoAfterFile:
     49 
     50 syn match  issComment	"^\s*;.*$" contains=@Spell
     51 
     52 " folder constant
     53 syn match  issFolder	"{\@1<!{[^{]*}" contains=@NoSpell
     54 
     55 " string
     56 syn region issString	start=+"+ end=+"+ contains=issFolder,@Spell
     57 
     58 " [Dirs]
     59 syn keyword issDirsFlags deleteafterinstall uninsalwaysuninstall uninsneveruninstall
     60 
     61 " [Files]
     62 syn keyword issFilesCopyMode normal onlyifdoesntexist alwaysoverwrite alwaysskipifsameorolder dontcopy
     63 syn keyword issFilesAttribs readonly hidden system
     64 syn keyword issFilesPermissions full modify readexec
     65 syn keyword issFilesFlags allowunsafefiles comparetimestampalso confirmoverwrite deleteafterinstall
     66 syn keyword issFilesFlags dontcopy dontverifychecksum external fontisnttruetype ignoreversion
     67 syn keyword issFilesFlags isreadme onlyifdestfileexists onlyifdoesntexist overwritereadonly
     68 syn keyword issFilesFlags promptifolder recursesubdirs regserver regtypelib restartreplace
     69 syn keyword issFilesFlags sharedfile skipifsourcedoesntexist sortfilesbyextension touch
     70 syn keyword issFilesFlags uninsremovereadonly uninsrestartdelete uninsneveruninstall
     71 syn keyword issFilesFlags replacesameversion setntfscompression nocompression noencryption noregerror
     72 
     73 
     74 " [Icons]
     75 syn keyword issIconsFlags closeonexit createonlyiffileexists dontcloseonexit
     76 syn keyword issIconsFlags runmaximized runminimized uninsneveruninstall useapppaths
     77 
     78 " [INI]
     79 syn keyword issINIFlags createkeyifdoesntexist uninsdeleteentry uninsdeletesection uninsdeletesectionifempty
     80 
     81 " [Registry]
     82 syn keyword issRegRootKey   HKCR HKCU HKLM HKU HKCC
     83 syn keyword issRegValueType none string expandsz multisz dword binary
     84 syn keyword issRegFlags createvalueifdoesntexist deletekey deletevalue dontcreatekey
     85 syn keyword issRegFlags preservestringtype noerror uninsclearvalue
     86 syn keyword issRegFlags uninsdeletekey uninsdeletekeyifempty uninsdeletevalue
     87 
     88 " [Run] and [UninstallRun]
     89 syn keyword issRunFlags hidewizard nowait postinstall runhidden runmaximized
     90 syn keyword issRunFlags runminimized shellexec skipifdoesntexist skipifnotsilent
     91 syn keyword issRunFlags skipifsilent unchecked waituntilidle
     92 
     93 " [Types]
     94 syn keyword issTypesFlags iscustom
     95 
     96 " [Components]
     97 syn keyword issComponentsFlags dontinheritcheck exclusive fixed restart disablenouninstallwarning
     98 
     99 " [UninstallDelete] and [InstallDelete]
    100 syn keyword issInstallDeleteType files filesandordirs dirifempty
    101 
    102 " [Tasks]
    103 syn keyword issTasksFlags checkedonce dontinheritcheck exclusive restart unchecked
    104 
    105 
    106 " Define the default highlighting.
    107 " Only when an item doesn't have highlighting yet
    108 
    109 " The default methods for highlighting.  Can be overridden later
    110 hi def link issSection	Special
    111 hi def link issComment	Comment
    112 hi def link issDirective	Type
    113 hi def link issParam	Type
    114 hi def link issFolder	Special
    115 hi def link issString	String
    116 hi def link issURL	Include
    117 hi def link issPreProc	PreProc
    118 
    119 hi def link issDirsFlags		Keyword
    120 hi def link issFilesCopyMode	Keyword
    121 hi def link issFilesAttribs	Keyword
    122 hi def link issFilesPermissions	Keyword
    123 hi def link issFilesFlags		Keyword
    124 hi def link issIconsFlags		Keyword
    125 hi def link issINIFlags		Keyword
    126 hi def link issRegRootKey		Keyword
    127 hi def link issRegValueType	Keyword
    128 hi def link issRegFlags		Keyword
    129 hi def link issRunFlags		Keyword
    130 hi def link issTypesFlags		Keyword
    131 hi def link issComponentsFlags	Keyword
    132 hi def link issInstallDeleteType	Keyword
    133 hi def link issTasksFlags		Keyword
    134 
    135 
    136 let b:current_syntax = "iss"
    137 
    138 " vim:ts=8