xhtml.vim 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. " Vim filetype plugin file
  2. " Language: xhtml
  3. "
  4. " This runtime file is looking for a new maintainer.
  5. "
  6. " Former maintainer: Dan Sharp
  7. " Last Changed: 2009 Jan 20
  8. " 2024 Jan 14 by Vim Project (browsefilter)
  9. if exists("b:did_ftplugin") | finish | endif
  10. " Make sure the continuation lines below do not cause problems in
  11. " compatibility mode.
  12. let s:save_cpo = &cpo
  13. set cpo-=C
  14. " Define some defaults in case the included ftplugins don't set them.
  15. let s:undo_ftplugin = ""
  16. let s:browsefilter = "HTML Files (*.html, *.htm)\t*.html;*.htm\n" .
  17. \ "XML Files (*.xml)\t*.xml\n"
  18. if has("win32")
  19. let s:browsefilter .= "All Files (*.*)\t*\n"
  20. else
  21. let s:browsefilter .= "All Files (*)\t*\n"
  22. endif
  23. let s:match_words = ""
  24. runtime! ftplugin/xml.vim ftplugin/xml_*.vim ftplugin/xml/*.vim
  25. unlet b:did_ftplugin
  26. " Override our defaults if these were set by an included ftplugin.
  27. if exists("b:undo_ftplugin")
  28. let s:undo_ftplugin = b:undo_ftplugin
  29. unlet b:undo_ftplugin
  30. endif
  31. if exists("b:browsefilter")
  32. let s:browsefilter = b:browsefilter
  33. unlet b:browsefilter
  34. endif
  35. if exists("b:match_words")
  36. let s:match_words = b:match_words
  37. unlet b:match_words
  38. endif
  39. runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim
  40. let b:did_ftplugin = 1
  41. " Combine the new set of values with those previously included.
  42. if exists("b:undo_ftplugin")
  43. let s:undo_ftplugin = b:undo_ftplugin . " | " . s:undo_ftplugin
  44. endif
  45. if exists("b:browsefilter")
  46. let s:browsefilter = b:browsefilter . s:browsefilter
  47. endif
  48. if exists("b:match_words")
  49. let s:match_words = b:match_words . "," . s:match_words
  50. endif
  51. " Load the combined list of match_words for matchit.vim
  52. if exists("loaded_matchit")
  53. let b:match_words = s:match_words
  54. endif
  55. " Change the :browse e filter to primarily show tcsh-related files.
  56. if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
  57. let b:browsefilter="XHTML files (*.xhtml, *.xhtm)\t*.xhtml;*.xhtm\n" . s:browsefilter
  58. endif
  59. " Undo the stuff we changed.
  60. let b:undo_ftplugin = "unlet! b:browsefilter b:match_words | " . s:undo_ftplugin
  61. " Restore the saved compatibility options.
  62. let &cpo = s:save_cpo
  63. unlet s:save_cpo