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