ishd.vim 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. " Vim filetype plugin file
  2. " Language: InstallShield (ft=ishd)
  3. " Maintainer: Doug Kearns <dougkearns@gmail.com>
  4. " Previous Maintainer: Johannes Zellner <johannes@zellner.org>
  5. " Last Change: 2024 Jan 14
  6. if exists("b:did_ftplugin") | finish | endif
  7. let b:did_ftplugin = 1
  8. " Using line continuation here.
  9. let s:cpo_save = &cpo
  10. set cpo-=C
  11. setlocal foldmethod=syntax
  12. let b:undo_ftplugin = "setl fdm<"
  13. " matchit support
  14. if exists("loaded_matchit")
  15. let b:match_ignorecase = 0
  16. let b:match_words =
  17. \ '\%(^\s*\)\@<=\<function\>\s\+[^()]\+\s*(:\%(^\s*\)\@<=\<begin\>\s*$:\%(^\s*\)\@<=\<return\>:\%(^\s*\)\@<=\<end\>\s*;\s*$,' .
  18. \ '\%(^\s*\)\@<=\<repeat\>\s*$:\%(^\s*\)\@<=\<until\>\s\+.\{-}\s*;\s*$,' .
  19. \ '\%(^\s*\)\@<=\<switch\>\s*(.\{-}):\%(^\s*\)\@<=\<\%(case\|default\)\>:\%(^\s*\)\@<=\<endswitch\>\s*;\s*$,' .
  20. \ '\%(^\s*\)\@<=\<while\>\s*(.\{-}):\%(^\s*\)\@<=\<endwhile\>\s*;\s*$,' .
  21. \ '\%(^\s*\)\@<=\<for\>.\{-}\<\%(to\|downto\)\>:\%(^\s*\)\@<=\<endfor\>\s*;\s*$,' .
  22. \ '\%(^\s*\)\@<=\<if\>\s*(.\{-})\s*then:\%(^\s*\)\@<=\<else\s*if\>\s*([^)]*)\s*then:\%(^\s*\)\@<=\<else\>:\%(^\s*\)\@<=\<endif\>\s*;\s*$'
  23. let b:undo_ftplugin .= " | unlet! b:match_ignorecase b:match_words"
  24. endif
  25. if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
  26. let b:browsefilter = "InstallShield Files (*.rul)\t*.rul\n"
  27. if has("win32")
  28. let b:browsefilter .= "All Files (*.*)\t*\n"
  29. else
  30. let b:browsefilter .= "All Files (*)\t*\n"
  31. endif
  32. let b:undo_ftplugin .= " | unlet! b:browsefilter"
  33. endif
  34. let &cpo = s:cpo_save
  35. unlet s:cpo_save