是否可以在Sublime REPL-tabs中禁用语法高亮?

gr3*_*33n 10 python sublimetext2 sublimerepl

有没有办法在脚本运行时禁用SublimeREPL-tabs中的语法高亮?

请看上下文这个问题:在SublimeREPL(python)中字符串后出现红线?

例如,当python脚本在Sublime REPL中运行时,输出文本中的撇号(')会突出显示为语法.因此,该行的最后一部分被突出显示,就好像字符串(实际上是文本输出而不是实际代码)没有正确关闭.

这是输出的样子: 在此输入图像描述

当Sublime REPL运行交互式python shell时,突出显示很有用,但是当它应该运行脚本时,我希望得到文本输出而不突出显示,就像在任何命令行界面中一样.当然我可以在命令行中运行脚本,但是将所有工作集中在一个程序中会很好.

也许有不同种类的Sublime REPL-enveronments(交互式,从脚本运行等)可以改变这种行为的设置?

谢谢你的帮助!:)

小智 7

转到Sublime Text> Preferences> Package Settings> SublimeREPL> Settings - User

(如果您的'设置 - 用户'为空,请先复制'设置 - 默认'的内容)

在"repl_view_settings"下:添加:

,
    "syntax": "Packages/Text/Plain text.tmLanguage"
Run Code Online (Sandbox Code Playgroud)

我现在是这样的:

// standard sublime view settings that will be overwritten on each repl view
// this has to be customized as a whole dictionary
"repl_view_settings": {
    "translate_tabs_to_spaces": false,
    "auto_indent": false,
    "smart_indent": false,
    "spell_check": false,
    "indent_subsequent_lines": false,
    "detect_indentation": false,
    "auto_complete": true,
    "line_numbers": false,
    "gutter": false,
    "syntax": "Packages/Text/Plain text.tmLanguage"
},
Run Code Online (Sandbox Code Playgroud)