# author
#
#   Hans Hagen - PRAGMA ADE - www.pragma-ade.com
#
# environment variable
#
#   CTXSPELLPATH=t:/spell
#
# auto language detection
#
#   % version =1.0 language=uk
#   <?xml version='1.0' language='uk' ?>

ext.lua.auto.reload=1
ext.lua.startup.script=$(SciteDefaultHome)/scite-ctx.lua

#~ extension.$(file.patterns.context)=scite-ctx.lua
#~ extension.$(file.patterns.example)=scite-ctx.lua

#~ ext.lua.reset=1
#~ ext.lua.auto.reload=1
#~ ext.lua.startup.script=t:/lua/scite-ctx.lua

ctx.menulist.default=\
    wrap=wrap_text|\
    unwrap=unwrap_text|\
    sort=sort_text|\
    check=check_text|\
    reset=reset_text

ctx.menulist.context=\
    wrap=wrap_text|\
    unwrap=unwrap_text|\
    sort=sort_text|\
    document=document_text|\
    quote=quote_text|\
    compound=compound_text|\
    check=check_text|\
    reset=reset_text

ctx.menulist.example=\
    wrap=wrap_text|\
    unwrap=unwrap_text|\
    sort=sort_text|\
    uncomment=uncomment_xml|\
    document=document_text|\
    quote=quote_text|\
    compound=compound_text|\
    check=check_text|\
    reset=reset_text

ctx.wraptext.length=65

ctx.spellcheck.language=auto
ctx.spellcheck.wordsize=4
ctx.spellcheck.wordpath=ENV(CTXSPELLPATH)

ctx.spellcheck.wordfile.all=spell-uk.txt,spell-nl.txt

ctx.spellcheck.wordfile.uk=spell-uk.txt
ctx.spellcheck.wordfile.nl=spell-nl.txt
ctx.spellcheck.wordsize.uk=4
ctx.spellcheck.wordsize.nl=4

ctx.helpinfo=\
    Shift + F11   pop up menu with ctx options|\
    |\
    Ctrl  + B     check spelling|\
    Ctrl  + M     wrap text (auto indent)|\
    Ctrl  + R     reset spelling results|\
    Ctrl  + I     insert template|\
    Ctrl  + E     open log file

command.name.21.$(file.patterns.context)=CTX Action List
command.subsystem.21.$(file.patterns.context)=3
command.21.$(file.patterns.context)=show_menu $(ctx.menulist.context)
command.groupundo.21.$(file.patterns.context)=yes
command.save.before.21.$(file.patterns.context)=2
command.shortcut.21.$(file.patterns.context)=Shift+F11

command.name.21.$(file.patterns.example)=CTX Action List
command.subsystem.21.$(file.patterns.example)=3
command.21.$(file.patterns.example)=show_menu $(ctx.menulist.example)
command.groupundo.21.$(file.patterns.example)=yes
command.save.before.21.$(file.patterns.example)=2
command.shortcut.21.$(file.patterns.example)=Shift+F11

#~ command.name.21.*=CTX Action List
#~ command.subsystem.21.*=3
#~ command.21.*=show_menu $(ctx.menulist.default)
#~ command.groupundo.21.*=yes
#~ command.save.before.21.*=2
#~ command.shortcut.21.*=Shift+F11

command.name.22.*=CTX Check Text
command.subsystem.22.*=3
command.22.*=check_text
command.groupundo.22.*=yes
command.save.before.22.*=2
command.shortcut.22.*=Ctrl+B

command.name.23.*=CTX Wrap Text
command.subsystem.23.*=3
command.23.*=wrap_text
command.groupundo.23.*=yes
command.save.before.23.*=2
command.shortcut.23.*=Ctrl+M

command.name.24.*=CTX Reset Text
command.subsystem.24.*=3
command.24.*=reset_text
command.groupundo.24.*=yes
command.save.before.24.*=2
command.shortcut.24.*=Ctrl+R

command.name.25.*=CTX Template
command.subsystem.25.*=3
command.save.before.25.*=2
command.groupundo.25.*=yes
command.shortcut.25.*=Ctrl+I

# command.25.$(file.patterns.context)=insert_template $(ctx.template.list.context)
# command.25.$(file.patterns.example)=insert_template $(ctx.template.list.example)
#
# ctx.template.list.example=\
# foo=mathadore.foo|\
# bar=mathadore.bar
#
# ctx.template.mathadore.foo.file=./ctx-templates/foo.xml
# ctx.template.mathadore.bar.data=bar bar bar
#
# paths: ./ctx-templates, ../ctx-templates, ../../ctx-templates

command.name.26.*=Open Logfile
command.subsystem.26.*=3
command.26.*=open_log
command.save.before.26.*=2
command.groupundo.26.*=yes
command.shortcut.26.*=Ctrl+E

import scite-ctx-context
import scite-ctx-example

ctx.template.scan=yes
ctx.template.rescan=no

ctx.template.suffix.tex=tex
ctx.template.suffix.xml=xml

command.name.27.*=XML Uncomment
command.subsystem.27.*=3
command.27.*=uncomment_xml
command.save.before.27.*=2
command.groupundo.27.*=yes
