Open hwonsok opened 4 years ago
How about using the panel?
I am sorry but I am very new to sublime text so I am not really sure what panel you are referring to.
In that case, you may want to consider looking at this section https://github.com/randy3k/Terminus#terminus-build-system
I have created a new .sublime-build
file that has the following configuration:
{
"target": "terminus_open",
"auto_close": false,
"post_window_hooks": [
["carry_file_to_pane", {"direction": "right"}]
],
"shell_cmd": "python -u \"$file\"",
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python",
"env": {"PYTHONIOENCODING": "utf-8"},
"variants":
[
{
"name": "Syntax Check",
"shell_cmd": "python -m py_compile \"${file}\"",
}
]
}
Still not entirely sure if this is what you are referring to.
You could use the target
"target": "terminus_exec",
"cancel": "terminus_cancel_build",
instead. The cancel command is also recommended
By using "target": "terminus_exec",
it does indeed make Terminus operate just as the console, but I am no longer able to move it to the right pane as it is no longer a tab.
I am uncertain if this is a situation I have to choose in between:
I wonder if there is a third scenario where it is possible to have the Terminus behave as the console but also move it to the right pane. Even if it is as simple as having Terminus open a new tab and close the previous one (if one is currently open).
Seems fair, I have just pushed a new commit afb5a7c which allows reusing the tagged view. Something along this line.
{
"target": "terminus_open",
"tag": "python build",
"auto_close": false,
"post_window_hooks": [
["carry_file_to_pane", {"direction": "right"}]
],
"shell_cmd": "python -u \"$file\"",
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python",
"env": {"PYTHONIOENCODING": "utf-8"},
"variants":
[
{
"name": "Syntax Check",
"shell_cmd": "python -m py_compile \"${file}\"",
}
]
}
I'll wait for the next update. Thank you very much!
Is this supposed to work now?
With
"post_window_hooks": [
["carry_file_to_pane", {"direction": "right"}]
],
it keeps splitting the right most pane and adding the tab there.
@randy3k has a regression been introduced since https://github.com/randy3k/Terminus/commit/afb5a7ce57a8a7fde1c5c4e63f5bddba374ae669? I've added a tag to my build system but terminus_open
still opens a new tab for each invocation.
Ping @randy3k.
I am currently using Terminus with Origami to pop up the console on the right pane.
Every time a I build using Terminus, a new tab is created instead of the current open one being updated.
As I am trying to replicate sublime text's console as much as possible, I would like to know if there is a way to disable a new tab to be opened and updating the current one instead.