Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to disable syntax highlighting in Sublime REPL-tabs?

Is there any way to disable the syntax highlighting in SublimeREPL-tabs when a script is running?

Please see this question for context: Red lines coming up after strings in SublimeREPL (python)?

For example, when python-scripts run in Sublime REPL, apostrophes (') in the output-text get highlighted as syntax. Because of this, the last part of the line is highlighted as if the string (which in fact is text-output and not actual code) was not closed properly.

This is what the output looks like: enter image description here

The highlighting is useful when Sublime REPL is running the interactive python shell, but when it just should run a script, I would like to get the text output without highlighting, like in any commandline-interface. Of course I could just run the scripts in the commandline, but it would be nice to keep all work focused in just one program.

Maybe there are settings for the different kinds of Sublime REPL-enveronments (Interactive, run from script, etc.) that could change this behaviour?

Thanks for any help! :)

like image 854
Samuel Plumppu Avatar asked Dec 29 '14 15:12

Samuel Plumppu


1 Answers

Go to Sublime Text > Preferences > Package Settings > SublimeREPL > Settings - User

(If your 'Settings - User' is empty, first copy in the contents of 'Settings - Default')

under "repl_view_settings": add:

,
    "syntax": "Packages/Text/Plain text.tmLanguage"

so mine is now:

// 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"
},
like image 68
Aqueum Avatar answered Sep 28 '22 07:09

Aqueum