Sublime-EvalPrinter
Sublime-EvalPrinter copied to clipboard
Doesn't recognize language when javascript is within a .html file.
Even when the default language is set to Javascript. EvalPrinter still returns - "Couldn't determine a supported language. Maybe you want to set the default_language setting."
You can modify the EvalPrinter.py as such
if "Python" in syntax:
output = EvalEvaluator.runPython(codeStr)
elif "JavaScript" in syntax:
output = EvalEvaluator.runJavaScript(codeStr)
elif "HTML" in syntax:
output = EvalEvaluator.runJavaScript(codeStr)
elif "Bash" in syntax:
output = EvalEvaluator.runBash(codeStr)
elif "PHP" in syntax:
output = EvalEvaluator.runPHP(codeStr)
elif "CoffeeScript" in syntax:
output = EvalEvaluator.runCoffee(codeStr)
else:
output = "Couldn't determine a supported language. Maybe you want to set the default_language setting."
Ideally though, the evalprinter should determine the type from the current scope.
I made some changes to identify the scope instead of the syntax, you can pull from here:
https://github.com/basaran/Sublime-EvalPrinter
You can also run the eval on an empty line to evaluate the whole file.