Bram Moolenaar | 3577c6f | 2008-06-24 21:16:56 +0000 | [diff] [blame] | 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 |
Riley Bruins | 0a08306 | 2024-06-03 20:40:45 +0200 | [diff] [blame] | 4 | " 2024/05/23 by Riley Bruins <ribru17@gmail.com ('commentstring') |
Bram Moolenaar | 3577c6f | 2008-06-24 21:16:56 +0000 | [diff] [blame] | 5 | " Version: 1.2 |
| 6 | " Maintainer: Nicolas Weber <nicolasweber@gmx.de> |
| 7 | |
| 8 | " Only do this when not done yet for this buffer |
| 9 | if exists("b:did_ftplugin") |
| 10 | finish |
| 11 | endif |
| 12 | |
| 13 | " Don't load another plugin for this buffer |
| 14 | let b:did_ftplugin = 1 |
| 15 | |
| 16 | " Using line continuation here. |
| 17 | let s:cpo_save = &cpo |
| 18 | set cpo-=C |
| 19 | |
| 20 | let 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". |
| 24 | setlocal fo-=t fo+=croql |
| 25 | |
| 26 | " Set 'comments' to format dashed lists in comments. |
| 27 | setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/ |
| 28 | |
| 29 | " dtrace uses /* */ comments. Set this explicitly, just in case the user |
Riley Bruins | 0a08306 | 2024-06-03 20:40:45 +0200 | [diff] [blame] | 30 | " changed this (/*\ %s\ */ is the default) |
| 31 | setlocal commentstring=/*\ %s\ */ |
Bram Moolenaar | 3577c6f | 2008-06-24 21:16:56 +0000 | [diff] [blame] | 32 | |
| 33 | setlocal iskeyword+=@,$ |
| 34 | |
| 35 | " When the matchit plugin is loaded, this makes the % command skip parens and |
| 36 | " braces in comments. |
| 37 | let b:match_words = &matchpairs |
| 38 | let b:match_skip = 's:comment\|string\|character' |
| 39 | |
| 40 | let &cpo = s:cpo_save |
| 41 | unlet s:cpo_save |