blob: a276b310a3d2bc154aad662de154026da9fefacc [file] [log] [blame]
Bram Moolenaar3577c6f2008-06-24 21:16:56 +00001" 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
Riley Bruins0a083062024-06-03 20:40:45 +02004" 2024/05/23 by Riley Bruins <ribru17@gmail.com ('commentstring')
Bram Moolenaar3577c6f2008-06-24 21:16:56 +00005" Version: 1.2
6" Maintainer: Nicolas Weber <nicolasweber@gmx.de>
7
8" Only do this when not done yet for this buffer
9if exists("b:did_ftplugin")
10 finish
11endif
12
13" Don't load another plugin for this buffer
14let b:did_ftplugin = 1
15
16" Using line continuation here.
17let s:cpo_save = &cpo
18set cpo-=C
19
20let b:undo_ftplugin = "setl fo< com< cms< isk<"
21
22" Set 'formatoptions' to break comment lines but not other lines,
23" and insert the comment leader when hitting <CR> or using "o".
24setlocal fo-=t fo+=croql
25
26" Set 'comments' to format dashed lists in comments.
27setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/
28
29" dtrace uses /* */ comments. Set this explicitly, just in case the user
Riley Bruins0a083062024-06-03 20:40:45 +020030" changed this (/*\ %s\ */ is the default)
31setlocal commentstring=/*\ %s\ */
Bram Moolenaar3577c6f2008-06-24 21:16:56 +000032
33setlocal iskeyword+=@,$
34
35" When the matchit plugin is loaded, this makes the % command skip parens and
36" braces in comments.
37let b:match_words = &matchpairs
38let b:match_skip = 's:comment\|string\|character'
39
40let &cpo = s:cpo_save
41unlet s:cpo_save