Home Download Buy Blog Forum Support

Piping process output to scratch buffer continuously?

Piping process output to scratch buffer continuously?

Postby miohtama3 on Sat May 12, 2012 10:36 am

I have been studying a little bit more how to make Sublime to interact a continuously running web server.

Basically I hope to have a View which acts a special terminal Window

  • A new (web server) process is started, running continously. E.g. it is not a batch run
  • The output of this process is piped in scratch, read only, Sublime View
  • Language / regions are applied on the output
  • Plug-in is responsible to cleaning up upper lines of the buffer-like View when it beings to fill up
  • When View is closed the associated process is also killed


Would the arrangement described above be possible? The one thing I am little worried is scroll behavior... how much control one has over scrollbar and moving the cursor to the end of scratch buffer?
miohtama3
 
Posts: 33
Joined: Fri Apr 27, 2012 1:46 pm

Re: Piping process output to scratch buffer continuously?

Postby xeno.by on Sat May 12, 2012 10:49 am

Take a look at exec.py in sublime's distribution.

Speaking of the scroll, you can easily position cursor wherever you want. Check out how exec.py handles it.
xeno.by
 
Posts: 106
Joined: Mon Jan 30, 2012 10:03 am
Location: Lausanne, Switzerland

Re: Piping process output to scratch buffer continuously?

Postby miohtama3 on Sat May 12, 2012 10:56 am

Also jut found out about this

https://github.com/wuub/SublimeREPL
miohtama3
 
Posts: 33
Joined: Fri Apr 27, 2012 1:46 pm


Return to Plugin Development

Who is online

Users browsing this forum: Majestic-12 [Bot], vlakarados and 4 guests