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