randy3k / Terminus

Bring a real terminal to Sublime Text

Home Page:https://packagecontrol.io/packages/Terminus

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How can I use same shortcut execute python or groovy

brucmao opened this issue · comments

This is the way I currently execute python

{
        "keys":["f5"],
        "caption":"Terminus: save & Python",
        "command":"chain",
        "args":
        {
            "commands":[
                ["save"],
                ["terminus_open",
                    {
                        "cwd" :"${file_path:${folder}}",
                        "cmd" : [ "python","-i","$file" ],
                        "post_window_hooks": [                
                            ["carry_file_to_pane", {"direction": "down"}]                
                        ]
                    },
                ],
           ]
        }
    }

I want to execute python and groovy with the same shortcut key f5

Could you elaborate? What is groovy?

Apache Groovy is a powerful, optionally typed and dynamic language

here is groovy build system, I build groovy with shortcuts ctrl+b

groovy.sublime-build

{
    "cmd": ["groovy","$file"],
    "selector": "source.groovy",
    "file_regex": "[ ]*at .+[(](.+):([0-9]+)[)]",

    "windows": {
        "shell": "cmd.exe"
    }

}