OK, worked out the problem, it was a modified exec.py. Now it works great, thanks for creating it!
A question though: is pasting text into the terminal supposed to work?
OK, worked out the problem, it was a modified exec.py. Now it works great, thanks for creating it!
A question though: is pasting text into the terminal supposed to work?
How can I debug this? Paste doesn’t work for me. It’s probably easier than you trying to recreate it.
Did upgrade, but no help. Paste didn’t work for me out of the box. It’s probably my setup again, but no idea how, everything should be pretty much vanilla now.
Maybe I can turn on the logging if you can tell me how and it’ll help. Nothing comes up on the console when it fails.
Edit: Of course that does help becuase it shows the wrong command is being executed! Problem solved below…
Try to turn on sublime.log_commands(True)
and check which command is being triggered.
The more I think about it, the more I like it; Sublimely Terminal (SubTerminal) may be a good choice.
It is now renamed as SublimelyTerminal. Most of the commands are renamed from console_
prefix to sly_term_
prefix.
Slightly off the topic but important!
I like keeping the highlighting trailing spaces activated for my workflow.
I disabled the trailing whitespaces in terminal tab view:
But cant figure out how can I disable the same in the panel view. Currently the panel looks like:
So if anybody can help with this issue, it will be great!
By the way the plugin is awesome!
Minor typo in the repo readme at the very bottom: “SublimelyTemrinal” -> “SublimelyTerminal”
For small things like this, is this the right place to mention them or is it better to start opening github issues?
That doesn’t help, it just shows “command: paste.” Don’t you have your own logging in the plugin? I figured that from one of the screen animations you posted.
Even if I drag a selection into the terminal window to do the paste it doesn’t work. The dragged text disappears from its source suggesting that ST thinks the paste was successful.
If I paste via the context menu in the panel it just prints undo paste
. The plugin setting “debug
” is true
.
Thank gawd, I thought it was just me again. Is there anything notable about your ST setup? I wonder if a global setting is affecting it.
OK the pasting might be a tricky issue.
I have these User keybindings:
{ "keys": ["ctrl+shift+v"], "command": "paste_from_history" },
{ "keys": ["ctrl+v"], "command": "paste_and_indent" },
{ "keys": ["ctrl+shift+v"], "command": "paste" },
{ "keys": ["ctrl+alt+v"], "command": "paste_from_history" },
So my ctrl+v
overrides the plugins keybinding:
Default (Windows).sublime-keymap:12: { "keys": ["ctrl+v"], "command": "sly_term_paste",`
So the right command to execute is sly_term_paste
(which does work) and we can do that with adding a second keybinding with a context that checks for the terminal. I don’t know if it is at all possible to override the normal paste action in the terminal (which would be what happens if you drag or right-click-paste).
Actually, I just copy the plugins binding into my user file and it takes effect again.
{ "keys": ["ctrl+shift+v"], "command": "paste_from_history" },
{ "keys": ["ctrl+v"], "command": "paste_and_indent" },
{ "keys": ["ctrl+shift+v"], "command": "paste" },
{ "keys": ["ctrl+alt+v"], "command": "paste_from_history" },
{ "keys": ["ctrl+v"], "command": "sly_term_paste",
"context":
[
{ "key": "setting.sly_term_view" },
{ "key": "setting.sly_term_view.nature_clipboard" }
]
},
Now paste works with ctrl+v
at least.
Yep, that’s the problem for me as is the fix. Looks like I’ve copied the key map file wholesale then changed what I wanted and that is not the right way to do it.
As noted above it still needs an override on the Edit and context menu paste commands though.
There is only one thing missing from this tool to allow it to fully replace the built-in build system, making that functionality interactive, is the file_regex
function from there. Even if the double-click to jump to the error line is too hard to implement, the error phantoms and next/prev error navigation would be super useful.
Although most people might not see the benefit of interactively building via a terminal, I also use the error functionality for debug logging. So when I log something from my code it outputs the file name and source line as well and the log messages appear right in the code, which is a huge productivity boost.
You should be able to take the code pretty much verbatim from exec.py
in Default, but one thing I would request if you did this is an option to display message phantoms alongside the line instead of underneath. This reduces clutter substantially. It’s a simple two-line change which I can give you.
Another argument for replacing the built-in build system, besides interactivity, is persistence and complex build environments.
Some people may want to launch build commands in a different CLI environment. For instance I could ssh into a remote server in the shell, log in once and then launch build commands as required. This is what I do when I’m building cross platform code, but I have to fiddle with slow and finicky tools that pass commands to the remote servers and capture the output.
In another scenario, there may be a lot of setup required in the environment before the build commands are executed and the setting up and tearing down of that could be avoided.