New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re-use tab when running python code with SublimeREPL #481
Comments
I'd also like to see this implemented, thanks! |
I would also like to see this feature implemented. I've tried getting used to using the "cmd+w" shortcut to close the REPL window everytime I run a program, but on more than one occasion the main code window ends up closing instead. Having a re-usuable REPL window would solve this issue. |
That feature would be awesome. |
More than welcome... |
This would be a great feature. |
SublimeREPL seems to be the only feasible way to run interactive python program within sublime and reusing the tab is the one most natural thing it lacks. |
+1 this would be awesome ! Please develop :) |
Totally agree ! |
+1 ,pls ,thanks! |
+1 |
1 similar comment
+1 |
+1 |
+1 |
2 similar comments
+1 |
+1 |
People, for a while now Github added the ability to add a +1 directly to the comment, instead of adding a new comment saying '+1'. Please stop adding comments saying +1? Just add a 👍 emoji to the top comment by clicking on the smiley face to the top right. |
@Gabriel-p +1 :) |
I'll try to do this when I have the time, but remember we are accepting (and merging) pull requests now. |
+1 |
4 similar comments
+1 |
+1 |
+1 |
+1 |
That would be amazing to have this feature. |
Need this. |
A much needed feature indeed. My quick hack for this was to add the following line in the "repl_python_run" command in SublimeREPL\config\Python\Main.sublime-menu, right before the "external_id": "python" argument: |
@ggstefanov Nice one - works as expected! Give this man a raise! |
@ggstefanov Thanks so much, this worked as expected! Only thing it needs now is to switch to the tab automatically when it's re-run. |
@ggstefanov nice work! |
@ggstefanov <https://github.com/ggstefanov> - Thanks to Stefanov
…On Tue, Jun 6, 2017 at 2:15 AM wangyu ***@***.***> wrote:
@ggstefanov <https://github.com/ggstefanov> nice work!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#481 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ARP_57n3p2RGVoCPtS9UuoMNISWSKzZsks5sBRiggaJpZM4JBPEw>
.
|
Here's my quick hack for automatically switching to the REPL when running it (built on @ggstefanov's solution): in the same file (
I hope this does not affect other features negatively... |
@pe224 Yay! Nice work, this seems to work as expected! |
Thank you guys so much @ggstefanov and @pe224, it works perfectly, amazing! |
@ggstefanov |
Hello, has this been implemented? How can I use this feature? (Python + Sublime Text noob, sorry if the question is stupid). Thanks. |
Seach for the SublimeREPL in your installation drive. finally close everything and restart sublimetext3 and build multiple times, It will stick to on output tab of sublimeREPL. |
Although the solutions that appear here in the comments work pretty well, it is a pain to identify the analogous solution for each language that I work with. And the main reason to use a general purpose text editor like Sublime over specialized IDE like Spyder is exactly being able to handle multiple languages similarly. Therefore, I would ask: is there any chance that this 1-year old requested feature will be officially addressed in the future? Considering that the last SublimeREPL commit was in September 2016, it seems to be the case that it won't be around any time soon. |
Unfortunately I cannot get the mentioned workaround ("view_id": "REPL [python]" etc) working in a recent Sublime Text Build 3143 x64 portable setup. I also tried (REPL[python] , without a space and/or without *) and "view.name() in view_id" but no success. Would appreciate any direction if this is still |
@ggstefanov Thanks again for this little hack. I have no idea how you figured this one out.. Just to take this one step further, I was wondering if anyone knew how to have the REPL start on a new line after a new build instead of outputting immediately to the right of the last output. I hope this question was clear enough and thank you in advance! |
Thank you very much @ggstefanov and @pe224 🐬 |
Thank you @ggstefanov and @pe224 ! Any Idea on how to print to the output, so that it's easier to identify previous results from the new ones?
|
I cannot find the string "external_id": "python" in my copy of sublimerepl.py. Also - that looks like JSON, not Python. Is anyone able to help here? (Windows 10-64, Sublime 3.2.2.3211, Python 3.7.5) |
Now we need close the last Python.exe process, because it is opening again and again everytime we Build again... |
I did it:
|
The hack didn't work in Arch Linux. |
It's already 2020.... |
I can't get this to work in sublimetext version 3.2.2 build 3211. Can anybody confirm that this hack still works? Thank you |
Thankyouverymuch @ggstefanov + @pe224 for your solutions! To clear the output window on each new build, add the following: if view.name() == view_id:
found = view
window.focus_view(found)
window.run_command("repl_clear") # <--- added to clear window
break |
I guess I'm missing something! |
Alright, I fixed the whole thing: |
It's May 2021 and @ggstefanov and @pe224 are still providing the solution that Sublime has not. Thanks, legends! |
I have found a better way to do this using terminus
screenshot of using terminus like repl: https://i.stack.imgur.com/HgfpB.png This will basically create a repl for you without the new tab opening after each build, you can further modify it with origami to show the console on right, left, up, bottom of your screen if you want too. You can also use terminus and run it in the default output console window while accepting inputs and making it interactable too
screenshot of terminus in console: https://i.stack.imgur.com/nj4jj.png I wasted a lot of time trying to find a way to re use tab in repl that's when i found out sublime repl isn't actively maintained anymore. thats how i found terminus which is actively maintained and can do similar things like repl, hope this helps you. |
@pe224 Good job! And I wonder if there is an implementation such that every Python script can be re-executed in different tabs, respectively? Thanks~ |
I have implemented this idea after several days' exploration. Besides, I seem to find a bug that there will occur an error when an REPL view is closed. |
This is a feature request for not creating a new tab every time a code gets executed in a repl, but re-use the existing tab, just as wished in the this stackoverflow question
The text was updated successfully, but these errors were encountered: