summaryrefslogtreecommitdiff
path: root/context/data/textadept/context/modules/textadept-context-types.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2017-04-16 13:20:40 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2017-04-16 13:20:40 +0200
commit218228536ed709be8ab2dde4a00dc27249ceed8a (patch)
tree71b331e3d99ebd89fefcc1cb369d233c5c7fbdc1 /context/data/textadept/context/modules/textadept-context-types.lua
parentea2466fe69bd082d379e95e1567f3de0b76de243 (diff)
downloadcontext-218228536ed709be8ab2dde4a00dc27249ceed8a.tar.gz
2017-04-16 12:47:00
Diffstat (limited to 'context/data/textadept/context/modules/textadept-context-types.lua')
-rw-r--r--context/data/textadept/context/modules/textadept-context-types.lua47
1 files changed, 44 insertions, 3 deletions
diff --git a/context/data/textadept/context/modules/textadept-context-types.lua b/context/data/textadept/context/modules/textadept-context-types.lua
index c638a49ee..5c4dd3a21 100644
--- a/context/data/textadept/context/modules/textadept-context-types.lua
+++ b/context/data/textadept/context/modules/textadept-context-types.lua
@@ -12,6 +12,19 @@ local lexer = require("scite-context-lexer")
local context = lexer.context
local install = context.install
+-- autopdf takes long to stop (weird, not in scite)
+
+-- WIN32 and 'start "" "%e.pdf"' or OSX and 'open "%e.pdf"' or 'xdg-open "%e.pdf"',
+
+local quitter = function(output)
+ return find(output,"%? +$") and true or false, "see message above"
+end
+
+local listing = {
+ command = [[mtxrun --autogenerate --script context --extra=listing --scite --compact "%basename%"]], -- --autopdf
+ quitter = quitter,
+}
+
install {
lexer = "scite-context-lexer-tex",
suffixes = {
@@ -19,14 +32,31 @@ install {
"mkii",
"mkiv", "mkvi", "mkix", "mkxi"
},
- check = [[mtxrun --autogenerate --script check "%basename%"]],
- process = [[mtxrun --autogenerate --script context "%basename%"]], -- --autopdf takes long to stop (weird, not in scite)
+ check = {
+ command = [[mtxrun --autogenerate --script check "%basename%"]],
+ quitter = quitter,
+ },
+ process = {
+ command = [[mtxrun --autogenerate --script context "%basename%"]], -- --autopdf,
+ quitter = quitter,
+ },
+ listing = listing,
+ generate = [[mtxrun --generate]],
+ fonts = [[mtxrun --script fonts --reload --force]],
+ clear = [[mtxrun --script cache --erase]],
+ purge = [[mtxrun --script context --purgeall]],
preview = [[]],
+ logfile = [[]],
+ arrange = [[]],
+ unicodes = [[]],
setter = function(lexer)
-- whatever
end,
}
+
+
+
install {
lexer = "scite-context-lexer-xml",
suffixes = {
@@ -39,7 +69,11 @@ install {
"xul"
},
check = [[tidy -quiet -utf8 -xml -errors "%basename%"]],
- process = [[mtxrun --autogenerate --script context "%basename%"]], -- --autopdf takes long to stop (weird, not in scite)
+ process = {
+ command = [[mtxrun --autogenerate --script context "%basename%"]], -- --autopdf]],
+ quitter = quitter,
+ },
+ listing = listing,
setter = function(lexer)
-- whatever
end,
@@ -50,6 +84,7 @@ install {
suffixes = {
"mp", "mpx"
},
+ listing = listing,
setter = function(lexer)
-- whatever
end,
@@ -64,6 +99,7 @@ install {
check = [[mtxrun --autogenerate --script "%basename%"]],
process = [[mtxrun --autogenerate --script "%basename%"]],
preview = [[mtxrun --autogenerate --script "%basename%"]],
+ listing = listing,
setter = function(lexer)
-- whatever
end,
@@ -74,6 +110,7 @@ install {
suffixes = {
"txt"
},
+ listing = listing,
setter = function(lexer)
-- whatever
end,
@@ -96,6 +133,7 @@ install {
"w",
"ww"
},
+ listing = listing,
setter = function(lexer)
-- whatever
end,
@@ -109,6 +147,7 @@ install {
"hpp", "cpp",
"hxx", "cxx"
},
+ listing = listing,
setter = function(lexer)
-- whatever
end,
@@ -119,6 +158,7 @@ install {
suffixes = {
"bib"
},
+ listing = listing,
setter = function(lexer)
-- whatever
end,
@@ -129,6 +169,7 @@ install {
suffixes = {
"sql"
},
+ listing = listing,
setter = function(lexer)
-- whatever
end,