Sublime Forum

SublimePTY [pre-alpha]

#26

Right now itā€™s the only way to go if you want custom colors, but we (you and I) are not so smart! Go see this - on-the-fly theme generation for #rrggbb css highlight. Itā€™s insane! :smiley: On the other hand, my 484.945 kb .sublime-keymap is a bit bananas as well :>

Thanks. Although I doubt Jon will add it :neutral_face: .

99% itā€™ll be ready on Monday. Most of the code is already in from day 1 (click1, click2 an click3). I just need to tie it all together.

I donā€™t know. Underneath SublimePTY is a bit like screen/tmux - youā€™ll be able to have more than one view attached to a process Attaching a output panel and trying it out should not be very difficult.

(todo: look into VT mouse codes, ā€¦)

0 Likes

#27

Hmmm thinking ahead, this could allow for interactive build systems. If we could somehow send it commands via keyboard shortcuts. :smile:

So much potentialā€¦

NOW GET BACK TO WORK!

0 Likes

#28

If anyone wondered, it had nothing to do with OSX bash and everything to do with the fact, that ST2 on OSX uses python that still is has this problem: bugs.python.org/issue4978 It was silently failing underneath, after removing some try blocks it finally surfaced.

SublimePTYā€™s pyte is now fixed and everything seems to be working correctly!
Total time wasted: Ā± 4h
Total changes required to fix: 6****bytes
Word per minute: 0.1257 :mrgreen:

0 Likes

#29

Hi all,

Thanks to share this great plugin to the community ! Itā€™s a ā€œmust haveā€ for me. Thank you very much :wink:

Iā€™m using Sublime Text 2 Build 2181 with SublimePTY v0.06 and Iā€™ve got a few question on itā€™s behavior:

  • only the upper half of the screen is used: the shell prompt is always at the half height of the buffer. Is it the normal behavior ?
  • it looks like it doesnā€™tā€™ support colors in its output like with a ā€˜ls --colorā€™
  • all Sublime key bindings are disabled when in a PTY. How can we access Sublime key bindings ?

Thank you very much and have a nice day
Cheers

Francois

0 Likes

#30

As you can probably see, I didnā€™t have time to touch any of my plugins in over 2 months now. They are not abandoned though, iā€™m just super busy @work for several more weeks.

My plan is to have SublimePTY automatically resize terminal to the full available area. Itā€™s number one entry on the TODO but still not there.
Right now ROW/COLS are hardcoded here: https://github.com/wuub/SublimePTY/blob/master/process.py#L31. Feel free to adjust it for now.

It did (sort of) at pre^(n)-alpha stage userecho.com/FYWX But without a way to get rid of those cell borders colored output was more distracting than helpful.

Unfortunately yes. And for a reason. I am sending all keystrokes to the process running inside terminal, so they donā€™t get to the ST2. At some point in the future I would like to find a better solution or at least have an ā€œescapeā€ sequence (think ctrl+alt in VMWare) but thatā€™s further down the line.

0 Likes

#31

Thanks wuub for your detailed explanations. :smile:
As we can see the future of SublimePTY is in great hands.

Congratulations for your awesome work.
Cheers
FranƧois

0 Likes

#32

Anyone other than castle_* interested in the win32 version?

0 Likes

#33

lol, am i the only loser left on windows?

0 Likes

#34

No, I am as well. After 3 months of crunch mode and changing jobs, Iā€™ll be getting out of my cave soon. :wink:

0 Likes

#35

I am.

0 Likes

#36

Put me on the list of interested parties. FWIW I just sent you a small token of my appreciation for your work.

0 Likes

#37

Just to let you all know, Iā€™ve overcome most of the obstacles and prototype version is ā€œworkingā€ correctly (I can run and control FarManager). I still need to wire it correctly to SublimePTY side with a communication channel other than STDIO (reason explained few posts above), but thatā€™s really not an issue now.

http://i.imgur.com/Y1y7f.png

Iā€™ll try to release something ASAP, early May being the worst case scenario.

THANK YOU! :mrgreen:
Most of the time my only interactions with people on the other side of my code is through github issues. Donā€™t get me wrong, itā€™s great that those problems are reported, it means someone is actually using my stuff. But when Iā€™m fixing another platform/tool specific bug, the line between my hobby and day-job can get very, very blurry.
And then someone like you decides to buy me a (case of :wink:) beer, and the fact that you didnā€™t have to makes it the best feeling a programmer can experience! :smile:

So thank you again (and others who have already donated: Nicholas, Charlie).

0 Likes

#38

Oh, Far Manager works!! Very sweet.

0 Likes

#39

[quote=ā€œwuubā€]

Just to let you all know, Iā€™ve overcome most of the obstacles and prototype version is ā€œworkingā€ correctly (I can run and control FarManager). I still need to wire it correctly to SublimePTY side with a communication channel other than STDIO (reason explained few posts above), but thatā€™s really not an issue now.

http://i.imgur.com/Y1y7f.png

Iā€™ll try to release something ASAP, early May being the worst case scenario.

THANK YOU! :mrgreen:
Most of the time my only interactions with people on the other side of my code is through github issues. Donā€™t get me wrong, itā€™s great that those problems are reported, it means someone is actually using my stuff. But when Iā€™m fixing another platform/tool specific bug, the line between my hobby and day-job can get very, very blurry.
And then someone like you decides to buy me a (case of :wink:) beer, and the fact that you didnā€™t have to makes it the best feeling a programmer can experience! :smile:

So thank you again (and others who have already donated: Nicholas, Charlie).[/quote]

Tried to clone from github.com/wuub/SublimePTY, and it didnā€™t work at all. Showed me a bunch of stars, and thatā€™s it. Is there a way to collect diagnostic information if that would be useful to you?

0 Likes

#40

Windows version is still not fully ready. My vacations were a bit longer than I expected, but I managed to write a bit on the train :wink:

However if you clone the repo now, AND have Twisted+pywin32 installed you should be able to:

  1. Start: SublimePTY/console/console_server.py (as a standard python app)
  2. From Sublime run Command Palette -> SublimePTY

Expect some console windows flashing and broken handling of anything that is not a char, i.e. as of now itā€™s not functional, but you should be able to see where things are going.
For anyone wondering: I will probably remove Twisted dependency soon and/or maybe pack everything with py2exe.

0 Likes

#41

Thanks! Very inspiring. Will try to take a detailed look, once I get some free time.

0 Likes

#42

[quote]However if you clone the repo now, AND have Twisted+pywin32 installed you should be able to:

  1. Start: SublimePTY/console/console_server.py (as a standard python app)
  2. From Sublime run Command Palette -> SublimePTY[/quote]

SublimePTY sort of works on Windows now :smile: (in an alpha/prototype kind of way, meaning if you can get it running and step lightly, you should be able to at least try performing some real world tasks with it).

0 Likes

#43

Yay! Iā€™ve been able to run Far Manager, and it DID work with doskey. Terrific!!

Sure, thereā€™s a lot of stuff that needs to be taken care of (wild jumps of the cursor, transparent hiding of the underlying console window, colors - yeah, by the way, youā€™re going to support colors, right?), but thatā€™s a very good start. Would be an excellent replacement for my current wrapper over cmd.exe ran as a REPL.

0 Likes

#44

Some impressions:

  1. Height of the console window doesnā€™t seem to match the height of the pty area in Sublime. Width seems to match.

  2. Far.exe run with /W is generally okay. In the server window Iā€™m able to scroll the underlying console with PgUp/PgDn. However, when I press PgUp/PgDn in Sublime, nothing happens. No I didnā€™t rebind these keys.

  3. Would it be possible to send mouse clicks to Far? No idea how they detect clicks, but apparently I use clicking pretty often, since I immediately started missing this feature when alpha-testing PTY.

0 Likes

#45

Yeah, something is broken :wink:

PgUp (VK_PREVIOUS) & PgDown (VK_NEXT) are not simply not present in KEYMAP yet :smile:

I will definitely try to add mouse support once basic functions are working correctly. Fortunately .sublime-mousemap give me all the power I need to implement clicks and scrolling. EDIT: (this might be a bit more difficult than I thought, as mousemap seems to ignore ā€œcontextā€ argument. ) EDIT2: And thanks to quarnster/SublimeGDB we should be able to have a bit hacky mouse support :wink:

Cursor is ignored in win32 version ATM. But Iā€™ve already solved it in OSX/Linux PTY and it should be a 5 minutes feature.

Itā€™s for debugging only. Also at one point in time I would like to be able to attach multiple Sublime views to the same console process. Having a separate window to interact with lets me check if current implementation correctly handles updates that did not originate in a sublime view.

Yup. Because of this: sublimetext.userecho.com/users/9 ā€¦ /feedback/ Iā€™m planning 3 easily switchable modes:
no_color, some_color (paint only things that are not standard fg/bg), full_hd_with_fabulous_pink_grid ( (http://i.imgur.com/Dh4io.png))

0 Likes