微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

如何在 SublimeREPL 中禁用语法高亮,而不将语法设置为纯文本?

如何解决如何在 SublimeREPL 中禁用语法高亮,而不将语法设置为纯文本?

当我在 SublimeREPL 中运行程序时,我经常会看到突出显示的反斜杠 '' 显示为粉红色。

我可以解决它,但它很烦人,如果我能禁用它就太好了。我在其他帖子中读到您可以将语法转换为纯文本,但我喜欢使用彩色单词,所以不想这样做。我只想删除粉红色突出显示

Screenshot of SublimeREPL with syntax highlighting

谢谢大家!

解决方法

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

(如果你的'设置-用户'为空,先把'设置-默认'的内容复制进去)

在“repl_view_settings”下:添加:

这是第一个选项:第一个选项没有语法高亮显示为白色。

// 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"
},

enter image description here

这是第二个选项:第二个选项基于 unix 语法突出显示。

// 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,"syntax": "Packages/ShellScript/Shell-Unix-Generic.tmLanguage"
},

enter image description here

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。