docbk.vim 530 B

12345678910111213141516171819202122232425
  1. " Vim filetype plugin file
  2. " Language: DocBook
  3. " Maintainer: Nikolai Weibull <now@bitwi.se>
  4. " Latest Revision: 2012-04-25
  5. if exists('b:did_ftplugin')
  6. finish
  7. endif
  8. if !exists('b:docbk_type')
  9. if expand('%:e') == 'sgml'
  10. let b:docbk_type = 'sgml'
  11. else
  12. let b:docbk_type = 'xml'
  13. endif
  14. endif
  15. if b:docbk_type == 'sgml'
  16. runtime! ftplugin/sgml.vim ftplugin/sgml_*.vim ftplugin/sgml/*.vim
  17. else
  18. runtime! ftplugin/xml.vim ftplugin/xml_*.vim ftplugin/xml/*.vim
  19. endif
  20. let b:undo_ftplugin = "unlet! b:docbk_type"