dtrace.vim 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. " Language: D script as described in "Solaris Dynamic Tracing Guide",
  2. " http://docs.sun.com/app/docs/doc/817-6223
  3. " Last Change: 2008/03/20
  4. " 2024/05/23 by Riley Bruins <ribru17@gmail.com ('commentstring')
  5. " Version: 1.2
  6. " Maintainer: Nicolas Weber <nicolasweber@gmx.de>
  7. " Only do this when not done yet for this buffer
  8. if exists("b:did_ftplugin")
  9. finish
  10. endif
  11. " Don't load another plugin for this buffer
  12. let b:did_ftplugin = 1
  13. " Using line continuation here.
  14. let s:cpo_save = &cpo
  15. set cpo-=C
  16. let b:undo_ftplugin = "setl fo< com< cms< isk<"
  17. " Set 'formatoptions' to break comment lines but not other lines,
  18. " and insert the comment leader when hitting <CR> or using "o".
  19. setlocal fo-=t fo+=croql
  20. " Set 'comments' to format dashed lists in comments.
  21. setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/
  22. " dtrace uses /* */ comments. Set this explicitly, just in case the user
  23. " changed this (/*\ %s\ */ is the default)
  24. setlocal commentstring=/*\ %s\ */
  25. setlocal iskeyword+=@,$
  26. " When the matchit plugin is loaded, this makes the % command skip parens and
  27. " braces in comments.
  28. let b:match_words = &matchpairs
  29. let b:match_skip = 's:comment\|string\|character'
  30. let &cpo = s:cpo_save
  31. unlet s:cpo_save