# Define SciTE settings for troff files.

# see also groff_filenames(5)
file.patterns.troff=*.groff;*.roff;*.me;*.ms;*.mom;*.man;*.mdoc;*.tmac;*.1;*.2;*.3;*.4;*.5;*.6;*.7;*.8
*filter.troff=troff|$(file.patterns.troff)|
lexer.$(file.patterns.troff)=troff
*language.troff=troff|roff||

# Heirloom Troff specific requests
keywordclass.heirloom= \
bleedat breakchar brnl brpnl \
cropat dch dwh \
errprint \
fallback fdeferlig feature fkern flig fp fps fspacewidth \
hidechar hylang hylen hypp \
index \
kernafter kernbefore kernpair \
lc_ctype lds letadj lhang lnr lnrf lpfx \
mediasize minss \
nhychar nrf \
padj papersize psbb pshape \
recursionlimit rhang \
sentchar spacewidth \
track transchar trimat \
unwatch unwatchn \
watch watchlength watchn \
xflag

# Neatroff-specific requests
keywordclass.neatroff= \
<< >> cl co co+ co< co> eos ff ffsc fmap \
hycost hydash hystop in2 kn ochar pmll ssh ti2

# Predefined requests (derived from Groff)
keywords.$(file.patterns.troff)= \
ab ad af aln als am am1 ami ami1 as as1 asciify \
backtrace bd blm box boxa bp br brp break \
c2 cc ce cf cflags ch char chop class close color composite continue cp cs cu \
da de de1 defcolor dei dei1 device devicem di do ds ds1 dt \
ec ecr ecs el em eo ev evc ex \
fam fc fchar fcolor fi fl fp fschar fspecial ft ftr fzoom \
gcolor \
hc hcode hla hlm hpf hpfa hpfcode hw hy hym hys \
ie if ig . in it itc \
kern \
lc length linetabs linetabs lf lg ll lsm ls lt \
mc mk mso \
na ne nf nh nm nn nop nr nroff ns nx \
open opena os output \
pc pev pi pl pm pn pnr po ps psbb pso ptr pvs pvs \
rchar rd return rfschar rj rm rn rnn rr rs rt \
schar shc shift sizes so sp special spreadwarn ss sty substring sv sy \
ta tc ti tkf tl tm tm1 tmc tr trf trin trnt troff \
uf ul unformat \
vpt vs \
warn warnscale wh while write writec writem \
$(keywordclass.heirloom) $(keywordclass.neatroff)

# Flow control requests/commands with conditionals
keywords2.$(file.patterns.troff)=if ie while
# Flow control requests/commands without conditionals
keywords3.$(file.patterns.troff)=el nop
# Requests and commands, initiating ignore blocks
keywords4.$(file.patterns.troff)=ig
# Requests and commands with end-macros
# Mom macros alias MAC to de.
keywords5.$(file.patterns.troff)=am am1 de de1 MAC

comment.block.troff=\\#~
comment.block.at.line.start.troff=1
comment.stream.start.troff=.ig
comment.stream.end.troff=..

indent.maintain.$(file.patterns.troff)=1

# Default
style.troff.32=$(font.base)
# White space and text lines
style.troff.0=
#style.troff.0=fore:#808080
# Requests
style.troff.1=$(colour.keyword),bold
# Unrecognized commands or macros
style.troff.2=$(colour.keyword)
# Number
style.troff.3=$(colour.number)
# Operator
style.troff.4=$(colour.operator),bold
# String arguments (only for commands/macros)
style.troff.5=$(colour.string)
# Comment
style.troff.6=$(colour.code.comment.line),$(font.code.comment.line)
# Ignore-blocks
style.troff.7=
#style.troff.7=$(colour.code.comment.box),$(font.code.comment.box)
# Escapes
style.troff.8=$(colour.char),bold
style.troff.9=$(colour.char),bold
style.troff.10=$(colour.char),bold
style.troff.11=$(colour.char),bold
style.troff.12=$(colour.char),bold
style.troff.13=$(colour.char),bold
style.troff.14=$(colour.char),bold
style.troff.15=$(colour.char),bold
style.troff.16=$(colour.char),bold
style.troff.17=$(colour.preproc),bold
style.troff.18=$(colour.char),bold
style.troff.19=$(colour.char),bold
style.troff.20=$(colour.char),bold
style.troff.21=$(colour.char),bold
style.troff.22=$(colour.char),bold
style.troff.23=$(colour.char),bold
style.troff.24=$(colour.char),bold
style.troff.25=$(colour.char),bold
style.troff.26=$(colour.char),bold
style.troff.27=$(colour.char),bold

# This will seldom suffice even on Groff
command.compile.$(file.patterns.troff)=pdfroff "$(FileNameExt)" >"$(FileName).pdf"
command.build.$(file.patterns.troff)=make
