randy3k / terminus Goto Github PK
View Code? Open in Web Editor NEWBring a real terminal to Sublime Text
Home Page: https://packagecontrol.io/packages/Terminus
License: MIT License
Bring a real terminal to Sublime Text
Home Page: https://packagecontrol.io/packages/Terminus
License: MIT License
First of all: Thanks for your efforts. Really cool to see this plugin.
Played around with it a little bit. Works very well already. Even Midnight Commander via bash (WSL) works. Funny to see MC in ST :-)
As the title says I found some key bindings, which do not work.
Shift+8 is used for (
on german keyboard layout and AltGr+8 is used for [
.
Same with Shift+Β΄
AltGr+e should type β¬
.
Hi,
running "command": "terminus_open", "args": {"config_name": "Bash", "panel_name": "Terminus"}
launch a terminus terminal with bash but .bashrc is not taken in account since some env variable declared in are not present inside terminus.
If I run bash
inside terminus, it solves the problem
If this plugin set a conspicuous environment variable by default, such as TERMINUS_SUBLIME=1
, we could all make use of that when adding things that are only for Terminus to our regular bash_profile
etc files.
For example, the word-movement stuff:
# ...
if test -n "$TERMINUS_SUBLIME"; then
bind '"\e[1;3C": forward-word'
bind '"\e[1;3D": backward-word'
fi
# ...
I am trying to get Terminus to open git-bash instead of the windows command prompt with absolutely zero luck. Any one know how this can be done?
How can i enable syntax colouring in Terminus? Thanks
it seems that cmd.exe has a different logic to wrap line comparing to mac/linux
Presumably, the last working directory my shell was in is cached someplace within Terminus. Unfortunately, that directory now no longer exists. Now, launching Terminus leads to this error in the console:
File "/Users/bphunter/Library/Application Support/Sublime Text 3/Packages/Terminus/terminus/commands.py", line 239, in <lambda>
lambda x: on_selection_method(x, config_name)
File "/Users/bphunter/Library/Application Support/Sublime Text 3/Packages/Terminus/terminus/commands.py", line 245, in on_selection_method
self.run(config_name)
File "/Users/bphunter/Library/Application Support/Sublime Text 3/Packages/Terminus/terminus/commands.py", line 163, in run
raise Exception("{} does not exist".format(cwd))
Exception: /Users/bphunter/<mydir> does not exist
Not an issue, just very impressed!
@randy3k Randy, hiya, I've tried to install your new package on windows7+ST3156 but it won't be listed.
Any idea why is that? Ty
Hi, I have posted a question regarding this package on sublime forum, but I think I did not explained it very clearly there. So, like many other people, I like to keep the trailing spaces activated while coding.
I use your package Terminus (formerly Console and SublimelyTerminal) and must say that it is a must for sublime users.
Formerly with the package when was named Console, it supported only the tab view mode, it was highlighting the trailing spaces in the Console tab. I managed to remove the trailing slashes for the tab view by adding "highlight_trailing_whitespace": false,
to the Plain text
syntax specific settings:
When the package was named SublimelyTerminal, you added the panel view to the package. It works great, but I can't figure out how to disable the trailing whitespaces for the panel view which looks quite unconsistent with the tab view mode:
My question is, is there any way to disable the highlighting trailing spaces while in the panel view mode, so that people can use Terminus consistently in both the modes.
Terminals like conemu allows you to select & delete text quite easily, example here, any chance to implement it on terminus?
I tried to run terminus from a plugin but it immediately closes, is there a way to keep it open? I have provided a small example of what I'am trying to do.
import sublime
import sublime_plugin
class HelloWorldCommand(sublime_plugin.TextCommand):
def on_select(self, item):
window = self.view.window()
item = self.items[item]
window.run_command(
"terminus_open", {
"config_name": "Default",
"cmd": ["echo", item]
}
)
print(item)
def run(self, edit):
window = self.view.window()
self.items = ["hello", "world"]
window.show_quick_panel(self.items, self.on_select);
Thanks for a great plugin btw!
after running approximately 10k lines of code the terminal gets progressively slower.
Tested with R and rtichoke both last versions on mac os.
Closing the terminal and relaunching it solves the problem
Any reason why the following cwd
doesn't change to the current working directory
{ "keys": ["alt+`"],
"command": "toggle_terminus_panel",
"cwd": "${file_path:${folder}}"
},
First, thanks for putting this package together. Very exciting.
I see that you've added some options for customizing Terminus's behavior via keybindings, but it would be great to provide similar functionality in a .sublime-commands file (like TerminalView does). I'd love to be able to create commands that open Terminus windows straight to Rtichoke or iPython, for example.
To illustrate, here's what one simple command looks like in my TerminalView.sublime-commands
file:
[
{
"caption": "Terminal View: Open R (Rtichoke) Console",
"command": "terminal_view_open",
"args" : {
"title": "R Console (Rtichoke)",
"cmd": "/bin/bash -l -c rtichoke",
"cwd": "${folder}",
"syntax": "TerminalView.sublime-syntax"
}
}
]
In case it's not clear, this command opens Rtichoke, and sets the working directory to the first folder in the project. (Note also that I've created a special (and empty) TerminalView syntax file, which allows me to set preferences (like rulers, spell check, etc) for terminal windows.) It would be great to have similar functionality in Terminus.
After using Terminus for any significant period of time (say, more than 30 minutes), I eventually get a pop-up message saying "plugin_host has exited unexpectedly, plugin functionality won't be available until Sublime Text has been restarted."
Not sure what info would be helpful here, but to start, I'm running ST3 (build 3176) on MacOS 10.13.5. Happy to provide whatever additional details would be of use.
I installed the Terminus package through packagecontrol on a fresh Sublime. I can find no trace of Terminus after installation however. Nothing under any menu item, nor does the package appear under package preferences. The alt+`
hotkey has no effect either. In the Sublime console I see one line regarding Terminus reloading plugin Terminus.main
.
I run Sublime on Windows 7x64. If I can provide you with more details I will gladly do so.
This behavior is different than I experience in Ubuntu 16.04 in terminal. Typically when I scroll up, the command keeps outputting text and doesn't pull me to the bottom as text is output. It's very helpful to be able to inspect text while the command continues to run and not be forced to the latest output. To reproduce, scroll up while running a long command that continuously outputs and let off the mouse buttons and/or scroll wheel.
I use terminal history autocomplete from my ~/.inputrc. Is there a way to include this in terminus?
Awesome work by the way! - especially combined with sendcode. Between the anaconda
package and your packages, sublime an ideal IDE for python dev.
After installing the package I get the following messages in Sublime's console:
Traceback (most recent call last):
File "/opt/sublime_text/sublime_plugin.py", line 1066, in run_
return self.run(edit, **args)
File "/home/aap/.config/sublime-text-3/Packages/Console/console.py", line 826, in run
console.open(**kwargs)
File "/home/aap/.config/sublime-text-3/Packages/Console/console.py", line 390, in open
self.process = ConsolePtyProcess.spawn(cmd, cwd=cwd, env=_env, dimensions=size)
File "/home/aap/.config/sublime-text-3/Packages/ptyprocess/all/ptyprocess/ptyprocess.py", line 256, in spawn
max_fd = resource.getrlimit(resource.RLIMIT_NOFILE)[0]
File "/home/aap/.config/sublime-text-3/Packages/ptyprocess/all/ptyprocess/resource.py", line 9, in getrlimit
soft_limit = int(subprocess.check_output(['ulimit', '-Sn']))
File "./python3.3/subprocess.py", line 576, in check_output
File "./python3.3/subprocess.py", line 819, in init
File "./python3.3/subprocess.py", line 1448, in execute_child
FileNotFoundError: [Errno 2] No such file or directory: 'ulimit'
Traceback (most recent call last):
File "/opt/sublime_text/sublime_plugin.py", line 1066, in run
return self.run(edit, **args)
File "/home/aap/.config/sublime-text-3/Packages/Console/console.py", line 476, in run
screen = console.screen
AttributeError: 'Console' object has no attribute 'screen'
The terminal is black with a blinking cursor, and it does not seem to be responsive.
I'm running Ubuntu 18.04 LTS.
When closing the terminus tab, Sublime Test asks to save the file.
Can you put an option to allow us to close it without warning?
Thank you!
This happens with Sublime Text 3 (Build 3176) with x86_64-apple-darwin15.6.0 (64-bit) running under macOS High Sierra 10.13.6. Copying and pasting (
works.
This happens with Sublime Text 3 (Build 3176) when copying the code in the Terminus panel and view or using SendCode. I report the R session hereunder even if I don't believe R is causing the problem since if i use SendCode with R-Gui or R-Studio this problem does not appear
sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.6
Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.5.1
On windows7 the view rendering is quite slow, to prove you that, try running this:
ptime python -c "import time;s=time.time();[print(i) for i in range(100000)];print(time.time()-s)"
Now, check out the final result at the end of the video... Time measured by ptime and python process is ~4.5/~4.7 while rendering the whole output has taken ~1min10s!!!!
Any chance to optimize this one?
class enteride(sublime_plugin.WindowCommand):
# enter python
def run(self, ide):
global already_in_ide
if not already_in_ide:
self.window.run_command("toggle_terminus_panel")
self.window.run_command("terminus_send_string",
{"string": "{}\n".format(ide),
"tag": None}
)
already_in_ide = True
else:
if ide == "python":
exit_cmd = "exit();"
elif ide == "node":
exit_cmd = "process.exit();"
self.window.run_command(
"terminus_send_string",
{
"string": "{}\nclear\n".format(exit_cmd),
"tag": None # or the tag which is passed to "terminus_open"
}
)
already_in_ide = False`
try to use new api Terminus Command Palette in v0.1.4 to enter and exit ide by double clicking shortcuts ,but in my bash.exe everytime it open a new tab,and i can't use toggle_terminus_panel it to open it,so i make my own python script like this,but i still has many bugs like already_in_ide not ensure and exit command not same in many ides like node,python....sorry for my english
If the lost focus, there is no way to go back to it. for example you loose your current ipython "session".
new panel close the current panel.
the idea would be for new panel command :
if "output.Terminal" in window.panels:
window.run_command("show_panel", args={"panel":"output.Terminus"})
else:
window.run_commad("terminus_open", args={"config_name": "Default", "panel_name": "Terminus"})
i'll do the pr if you want
great plugin anyway
Jimmy
Ubuntu 18.04 here.
I use Ctrl+(PageUp|PageDown) to navigate between tabs, but when in terminus tab that shortcut doesn't work (it writes some characters).
Need some kind of command, like 'do-nothing' to put in the terminus shortcuts file and overwrite the default action.
I'm trying to add a new path to the env
var but I'm having a problem. If use:
"env": {"new_path"}
I got an parse error because a dictionary needs a key
and a value
, the question is, what should I use as key?
The feature list says that Terminus supports color schemes but I couldn't find any documentation for it.
When layout columns are resized on Ubuntu 16.04 and macOS Mojave, text disappears until there's interaction with the terminal. Below are images of the issue on Ubuntu 16.04 and ST v3.1.1 Build 3176. Steps to reproduce are 1) create or add a column, 2) run commands in terminal to generate text, 3) resize the column so that text is obscured, 4) resize and expect text to show again, 5) press arrow key up and run command again and text appears. This is particularly difficult to deal with when running a long command while trying to view its text stream.
Thanks for the terminal!
How do I add a configuration to the terminal list so that the terminal connects to the remote via ssh with port forwarding?
My OS windows 10 and i use pageant.
For instance, when pressing ctrl+c on cmd.exe or similar terminals (conemu, cygwin, msys, ...) you'd get a behaviour like this, is there any chance to emulate the same behaviour with terminus?
I very like Terminus. Could you help me to create keybindings for windows splitting after it's opened?
right click "open URL" doesn't work properly if the URL is too long and breaks into two lines
basically we need to re-implement OpenContextUrlCommand which understands the continuation marker
When I open terminus and i.e. list files/directory on every line just after the text there is white empty space to the end of the line. Every line.
The cursor is also white.
I've tried every theme, color scheme, terminus-theme, different shells. Always the same effect.
when pressing up key, the entered text disappears, but the previous line doesn't show up.
EDIT:
my mistake, that is a pipenv shell issue
it would be nice to have an adaptive console theme which depends on the user color scheme. Check Wramberg/TerminalView#53 for an attempt in TerminalView.
Hi,
Is there a way to specify the number of lines Terminus saves in the scrollback history? I've noticed that the terminal starts to slow down after a long period of use (and especially after displaying a lot of output), and I'm assuming this has to do with the size of the buffer. It would be nice to have a bit of control over this.
First of all, I got to know about this package on Sublime Text forum. I honestly have to tell you that this is a very useful package.
Everything is beyond expectations here, but there are some quirks (I am on Windows 10):
Hitting Ctrl+Delete and Ctrl+BackSpace does erase the whole word on right and left of cursor respectively, this does not work here. (Hitting plain Delete and BackSpace works though.)
I generated my own custom theme, but can't activate it now.
The ANSI color sequences does not show up out-of-the-box. I have to manually activate the utility I use called Ansicon to display them correctly. (I have 256colors
setting turned on).
Cannot use copy-paste from the Console view.
Anyways, I must tell you that this is a great plugin π.
i try to modify Terminus.sublime-settings like this but it open a new window for git-bash,can git-bash work on windows? thank you
git-bash: https://git-scm.com/downloads
{
"name": "git-bash",
"cmd": "git-bash.exe",
"env": {},
"enable": true,
"default": true,
"platforms": ["windows"]
},
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.