dtrace.vim 1.1 KB

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