vue.vim 946 B

123456789101112131415161718192021222324252627282930313233
  1. " Vim filetype plugin file
  2. " Language: vue
  3. " Last Change:
  4. " 2025 Jun 09 by Vim project set comment options #17479
  5. if exists("b:did_ftplugin") | finish | endif
  6. let b:did_ftplugin = 1
  7. " Make sure the continuation lines below do not cause problems in
  8. " compatibility mode.
  9. let s:save_cpo = &cpo
  10. set cpo-=C
  11. setlocal commentstring=<!--\ %s\ -->
  12. setlocal comments=s:<!--,m:\ \ \ \ ,e:-->
  13. let b:undo_ftplugin = "setlocal comments< commentstring<"
  14. " Copied from ftplugin/html.vim
  15. " Original thanks to Johannes Zellner and Benji Fisher.
  16. if exists("loaded_matchit")
  17. let b:match_ignorecase = 1
  18. let b:match_words = '<:>,'
  19. \ .. '<\@<=[ou]l\>[^>]*\%(>\|$\):<\@<=li\>:<\@<=/[ou]l>,'
  20. \ .. '<\@<=dl\>[^>]*\%(>\|$\):<\@<=d[td]\>:<\@<=/dl>,'
  21. \ .. '<\@<=\([^/][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>'
  22. let b:undo_ftplugin .= ' | unlet! b:match_words b:match_ignorecase'
  23. endif
  24. " Restore the saved compatibility options.
  25. let &cpo = s:save_cpo
  26. unlet s:save_cpo