SublimeRepl New Repl "No Repl for 'sql' "



我正在尝试使用Sublime Repl为Postgres设置Sublime Text Repl。

我在Users/Packages/SublimeRepl/config中设置了一个名为Postgres的新文件夹,并添加了两个文件:

Main.sublime-menu具有以下内容

[
     {
        "id": "tools",
        "children":
        [{
            "caption": "SublimeREPL",
            "mnemonic": "R",
            "id": "SublimeREPL",
            "children":
            [
                {"command": "repl_open", 
                 "caption": "PSQL",
                 "id": "repl_psql",
                 "mnemonic": "Q",
                 "args": {
                    "type": "subprocess",
                    "encoding": {"windows": "$win_cmd_encoding",
                                 "linux": "utf-8",
                                 "osx": "utf-8"},
                    "cmd": {"windows": ["psql.exe", "-a"],
                            "linux": ["psql","-U","tahnoon"],
                            "osx": ["psql","-U","tahnoon"]},
                    "cwd": "$file_path",
                    "cmd_postfix": "n", 
                    "env": {},
                    "suppress_echo": false, 
                    "syntax": "Packages/SQL/SQL.tmLanguage"
                    }
                }
            ]   
        }]
    }
]

并且CCD_ 4具有以下内容

[
    {
        "caption": "SublimeREPL: PSQL",
        "command": "run_existing_window_command", "args":
        {
            "id": "repl_psql",
            "file": "config/Postgres/Main.sublime-menu"
        }
    }
]

如果我启动一个repl并尝试使用Ctrl+,F从一个名为test.sql的文件中执行Eval,我会收到一条错误消息Cannot Find Repl for 'sql'

我做错了什么?

发现以下键值"external_id":"sql"起作用:

[
     {
        "id": "tools",
        "children":
        [{
            "caption": "SublimeREPL",
            "mnemonic": "R",
            "id": "SublimeREPL",
            "children":
            [
                {"command": "repl_open", 
                 "caption": "PSQL",
                 "id": "repl_sql",
                 "mnemonic": "Q",
                 "args": {
                    "type": "subprocess",
                    "encoding": {"windows": "$win_cmd_encoding",
                                 "linux": "utf-8",
                                 "osx": "utf-8"},
                    "cmd": {"windows": ["psql.exe","-U","tahnoon"],
                            "linux": ["psql","-U","tahnoon"],
                            "osx": ["psql","-U","tahnoon"]},
                    "cwd": "$file_path",
                    "cmd_postfix": "n", 
                    "cwd": "$file_path",
                    "external_id": "sql",
                    "suppress_echo": false, 
                    "syntax": "Packages/SQL/SQL.tmLanguage"
                    }
                }
            ]   
        }]
    }
]

最新更新