CLI config/dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.3 KiB

  1. " Vim filetype plugin
  2. " Language: Pug
  3. " Maintainer: Joshua Borton
  4. " Credits: Tim Pope
  5. " Only do this when not done yet for this buffer
  6. if exists("b:did_ftplugin")
  7. finish
  8. endif
  9. let s:save_cpo = &cpo
  10. set cpo-=C
  11. setlocal iskeyword+=-
  12. " Define some defaults in case the included ftplugins don't set them.
  13. let s:undo_ftplugin = ""
  14. let s:browsefilter = "All Files (*.*)\t*.*\n"
  15. let s:match_words = ""
  16. runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim
  17. unlet! b:did_ftplugin
  18. " Override our defaults if these were set by an included ftplugin.
  19. if exists("b:undo_ftplugin")
  20. let s:undo_ftplugin = b:undo_ftplugin
  21. unlet b:undo_ftplugin
  22. endif
  23. if exists("b:browsefilter")
  24. let s:browsefilter = b:browsefilter
  25. unlet b:browsefilter
  26. endif
  27. if exists("b:match_words")
  28. let s:match_words = b:match_words
  29. unlet b:match_words
  30. endif
  31. " Change the browse dialog on Win32 to show mainly Haml-related files
  32. if has("gui_win32")
  33. let b:browsefilter="Pug Files (*.pug)\t*.pug\n" . s:browsefilter
  34. endif
  35. " Load the combined list of match_words for matchit.vim
  36. if exists("loaded_matchit")
  37. let b:match_words = s:match_words
  38. endif
  39. setlocal comments=://-,:// commentstring=//\ %s
  40. setlocal suffixesadd+=.pug
  41. let b:undo_ftplugin = "setl cms< com< "
  42. \ " | unlet! b:browsefilter b:match_words | " . s:undo_ftplugin
  43. let &cpo = s:save_cpo
  44. " vim:set sw=2: