Sublime Forum

SublimePTY [pre-alpha]

#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

#46

Very simple mouse support has been added.
Crtl+Alt+LMB and Ctrl+Alt+RMB are sent to windows console as simple LMB & RMB clicks (no long presses or drag&drop)

EDIT:

  • double click :wink:

EDIT2:

  • console automatically adjusts its size to the available area
0 Likes

#47

(updated first post)
0.2.0

  • most of the functions for beta version on windows are now ready

Known problems:

  • console_server.py still needs to be started/killed manually
  • capitalized letters are broken

Short screencast: http://www.youtube.com/watch?v=eaGBVdlqTko)
I’m was super tired, and didn’t know what I was doing but it should be pretty obvious what works and what doesn’t. Most of the delays are me thinking what to do next or waiting for buffer to resize (ATM resizing is done each 2 seconds or so))

0 Likes

#48

Looks awesome but it would look even better without the region borders :smile:

0 Likes

#49

If you create two regions (one solid, one outline) you can probably get rid of the different color border. That won’t help the rounded issue at the corners, but it would help it look a bit better.

0 Likes

#50

I try to add the repo to package control but it doesn’t work.

If I just download the package from github and install it I got

File “.\sublime_plugin.py”, line 356, in run_
return self.run(edit, **args)
File “.\sublime_keypress.py”, line 11, in run
File “.\process.py”, line 276, in send_keypress
File “.\process.py”, line 290, in read
TypeError: ‘NoneType’ object is not iterable

I am using Sublime dev build and Windows 7 64 bit.

0 Likes

#51

Yeah, getting the same error, though I managed to run it once or twice :smile:

By the way, the end result is quite slow (sporting maximum 1-1.5 redraws per second). Why would that be?

0 Likes

#52

Yeah, I should’ve made it more clear that it’s still rather user hostile :mrgreen: There was absolutely zero work done in the area of graceful shutdown and/or error handling.
If you get it running, then play with it because you’ll have to restart sublime to launch another one (this will obviously be changed before beta to allow multiple consoles, closing processes on tab close, etc. etc.)

TL;DR: Don’t know. I didn’t profile it yet.
I suspect that applying 500-5000+ color regions can be a bit slow but didn’t have time to check yet.
Either way 1-1.5fps seems low. How long is the delay between pressing a key and character showing up in SublimePTY console (w/o far) ?

Yeah, sorry. I updated installation instruction on github.

0 Likes

#53

When I do something in the window that shows up when I launch console_server.py, the feedback is instantaneous

0 Likes

#54

Ok. I’ll be doing some profiling soon, and since I’ve already switched to UDP*, maybe some async goodness will improve responsiveness.

    • to any network programmers: I know that my use case is an abomination and I know UDP can theoretically drop packets even over loopback, but for now its connection-less nature and framing makes so many things easier that I’m willing to accept the risk :smile:

EDIT:
Guess what: _apply_colors() diff refresh and full refresh

0 Likes

#55

Allrighty, now it’s 10 fps. Still not ideal, but very decent! Thank you!

0 Likes

#56

Wow…it works!!!

I am glad that the windows version works. :slight_smile:

0 Likes