blob: 1a35127c86c3a09182aeccd742a850001e25221a [file] [log] [blame]
Bram Moolenaare37d50a2008-08-06 17:06:04 +00001" Vim ftplugin file
Bram Moolenaar40962ec2018-01-28 22:47:25 +01002" Language: NSIS script
3" Maintainer: Ken Takata
4" URL: https://github.com/k-takata/vim-nsis
5" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
6" Last Change: 2018-01-26
Bram Moolenaare37d50a2008-08-06 17:06:04 +00007
8if exists("b:did_ftplugin")
9 finish
10endif
Bram Moolenaar40962ec2018-01-28 22:47:25 +010011
12let s:cpo_save = &cpo
13set cpo&vim
14
Bram Moolenaare37d50a2008-08-06 17:06:04 +000015let b:did_ftplugin = 1
16
17let b:undo_ftplugin = "setl com< cms< fo< def< inc<"
Bram Moolenaar40962ec2018-01-28 22:47:25 +010018 \ " | unlet! b:match_ignorecase b:match_words"
Bram Moolenaare37d50a2008-08-06 17:06:04 +000019
20setlocal comments=s1:/*,mb:*,ex:*/,b:#,:; commentstring=;\ %s
21setlocal formatoptions-=t formatoptions+=croql
22setlocal define=^\\s*!define\\%(\\%(utc\\)\\=date\\|math\\)\\=
23setlocal include=^\\s*!include\\%(/NONFATAL\\)\\=
24
Bram Moolenaar40962ec2018-01-28 22:47:25 +010025if exists("loaded_matchit")
26 let b:match_ignorecase = 1
27 let b:match_words =
28 \ '\${\%(If\|IfNot\|Unless\)}:\${\%(Else\|ElseIf\|ElseIfNot\|ElseUnless\)}:\${\%(EndIf\|EndUnless\)},' .
29 \ '\${Select}:\${EndSelect},' .
30 \ '\${Switch}:\${EndSwitch},' .
31 \ '\${\%(Do\|DoWhile\|DoUntil\)}:\${\%(Loop\|LoopWhile\|LoopUntil\)},' .
32 \ '\${\%(For\|ForEach\)}:\${Next},' .
33 \ '\<Function\>:\<FunctionEnd\>,' .
34 \ '\<Section\>:\<SectionEnd\>,' .
35 \ '\<SectionGroup\>:\<SectionGroupEnd\>,' .
36 \ '\<PageEx\>:\<PageExEnd\>,' .
37 \ '\${MementoSection}:\${MementoSectionEnd},' .
38 \ '!if\%(\%(macro\)\?n\?def\)\?\>:!else\>:!endif\>,' .
39 \ '!macro\>:!macroend\>'
40endif
41
Bram Moolenaare37d50a2008-08-06 17:06:04 +000042let &cpo = s:cpo_save
43unlet s:cpo_save