Sublime Forum

Do you use interactive build? If so, this may be for you

#1

The following has been developed for de Julia REPL, but it would also work with minor changes for Python, for instance.

The build file JuliaREPL.sublime-build

{ // This build system simply opens a new interactive Julia REPL 
    // 2023 Petr Krysl
    // Depends on AbbreviatedStackTraces
    "target": "terminus_open",
    "auto_close": false,
    "title": "Julia REPL",
    "shell_cmd": "julia -t4", // Assume that PATH is set before invoking the editor
    "cwd": "${file_path:${folder}}",
    "selector": "source.julia",
    "focus": true,
    "file_regex": "^\\s*[@][\\s\\S.*]*\\s(\\S.+.jl):([0-9]+)\\s*"
}

The Terminus Settings

{
    // a list of available shells to execute
    // the shell marked as "default" will be the default shell
    "shell_configs": [
        {
            "name": "Git bash",
            "cmd": "bash.exe",
            "env": {},
            "enable": true,
            "default": true,
            "platforms": ["windows"],
        },
    ],
    "unix_term": "xterm-256color",
    "unix_lang": "en_US.UTF-8",
    "min_columns": 128, 
    "view_settings": {
        "font_face": "JetBrains mono",
        },
}

This works for the following error lines:

@ Main.sphere_mode_examples C:\Users\pkonl\Documents\00WIP\FinEtoolsAcoustics.jl\examples\modal\sphere_mode_examples.jl:72 
@ C:\Users\pkonl\Documents\00WIP\FinEtoolsAcoustics.jl\examples\modal\sphere_mode_examples.jl:72

Note the minimum-columns setting: this sets the Terminus to a width that prevents wrapping. Wrapping would ruin the matching of the regex.

Go-to-error then works with typing F4, with the cursor placed above the error message.

0 Likes