home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / unix / vim-6.2.tar.bz2 / vim-6.2.tar / vim62 / runtime / ftplugin / xml.vim < prev    next >
Encoding:
Text File  |  2003-04-16  |  1.1 KB  |  36 lines

  1. " Vim filetype plugin file
  2. " Language:    xml
  3. " Maintainer:    Dan Sharp <dwsharp at hotmail dot com>
  4. " Last Changed: 2003 Apr 16
  5. " URL:        http://mywebpage.netscape.com/sharppeople/vim/ftplugin
  6.  
  7. if exists("b:did_ftplugin") | finish | endif
  8. let b:did_ftplugin = 1
  9.  
  10. setlocal commentstring=<!--%s-->
  11.  
  12. " XML:  thanks to Johannes Zellner and Akbar Ibrahim
  13. " - case sensitive
  14. " - don't match empty tags <fred/>
  15. " - match <!--, --> style comments (but not --, --)
  16. " - match <!, > inlined dtd's. This is not perfect, as it
  17. "   gets confused for example by
  18. "       <!ENTITY gt ">">
  19. if exists("loaded_matchit") && !exists("b:match_words")
  20.     let b:match_ignorecase=0
  21.     let b:match_words =
  22.      \  '<:>,' .
  23.      \  '<\@<=!\[CDATA\[:]]>,'.
  24.      \  '<\@<=!--:-->,'.
  25.      \  '<\@<=?\k\+:?>,'.
  26.      \  '<\@<=\([^ \t>/]\+\)\%(\s\+[^>]*\%([^/]>\|$\)\|>\|$\):<\@<=/\1>,'.
  27.      \  '<\@<=\%([^ \t>/]\+\)\%(\s\+[^/>]*\|$\):/>'
  28. endif
  29.  
  30. " Change the :browse e filter to primarily show xml-related files.
  31. if has("gui_win32") && !exists("b:browsefilter")
  32.     let  b:browsefilter="XML Files (*.xml)\t*.xml\n" .
  33.         \    "DTD Files (*.dtd)\t*.dtd\n" .
  34.         \    "All Files (*.*)\t*.*\n"
  35. endif
  36.