Home Download Buy Blog Forum Support

SublimeREPL

SublimeREPL

Postby wuub on Sun Sep 04, 2011 3:10 pm

SublimeREPL
SublimeREPL is a plugin for Sublime Text 2 that lets you run interactive interpreters of several languages within a normal editor tab.

If you have problems with SublimeREPL please open issue on github https://github.com/wuub/SublimeREPL/issues instead of posting in this thread. :)

Image

Last news:
SublimeREPL 2.0.0 is slowly taking form. Package Control release should happen very soon.
Initial ST2/PY2 -> ST2+3/PY2+3 was surprisingly easy, but it took over 5 months to fight off all the bugs and incompatibilities.

If you're using SublimeREPL this is a good moment to checkout https://github.com/wuub/SublimeREPL/tree/master, try it (using portable version of ST), and let me know ASAP about any critical bugs :)

Changelog:
  • NEW: Compatibility with Sublime Text 3 and Sublime Text 2 with single codebase
  • NEW: documentation improvements
  • NEW: 'Restart' command in context menu (even with ghost views after full ST restart)
  • NEW: option to open REPLs in next view group (e.g. side-by-side)
  • NEW: add option to show evaluated code (#106 and #84)
  • BUGFIX: huge output will no longer cause Sublime to become unresponsive (#23... wow :))
  • BUGFIX: closing bracket are now removed automatically (ST3 only, #182)
  • NEW: hanlde cases when external_id differs from source.x (think: source.lisp -> scheme repl) (#161, #165 and #167)
  • -------
  • NEW: [Python] iPython on Windows
  • NEW: [Python] automatically remove "#! coding: ..." comments from evaluated code (#187)
  • NEW: [Python] iPython plot() support (qt, wx, *not* inline!)
  • BUGFIX: [Python] fix pager in IPython (#170)
  • -------
  • NEW: [Ruby] Pry autocomplete support
  • BUGFIX: [Ruby] REPL does not eval at top level (#194)
  • -------
  • NEW: [Haskell] automatic let binding injection for top level functions
  • NEW: [Haskell] let now support top level functions with any kind of parameterization
  • BUGFIX: [Haskell] typo in SublimeiHaskellRepl.write(), Code called wrong superclass
  • NEW: [Haskell] cabal/cabal-dev depending on SublimeHaskell settings
  • -------
  • NEW: ClojureScript REPLs
  • NEW: Rails REPL
  • NEW: Knitr support in R REPL (#165)
  • NEW: Maxima REPL
  • NEW: Racket REPL
  • NEW: Petite Chez Scheme REPL
  • REMOVED: Execnet REPL (for now, waiting for community input, anyone uses this?)
  • -------
  • NEW: change persistent history db from buzhug to PyDbLite (py3)
  • BUGFIX: repl could become unresponsive after code evaluation (#159)
  • BUGFIX: traceback in is_visible() on context menu
  • BUGFIX: AttributeError in update_view_loop
  • BUGFIX: fix enter handling with "auto_complete_commit_on_tab": true
  • BUGFIX: [F#] The mono command for F# interactive is fsharpi.
  • BUGFIX [PowerShell] update pattern for chcp_encoding detection



---- ORIGINAL POST ----

I just released a first public (beta) version of SublimeREPL.

ImageImageImageImage

Installation:
Use Package Control

Code, documentation:
https://github.com/wuub/SublimeREPL

EDIT:
Terminal emulation is on the way: viewtopic.php?p=22223#p22223, please vote http://sublimetext.userecho.com/topic/93643-/
Last edited by wuub on Thu Jul 18, 2013 9:07 am, edited 6 times in total.
wuub
 
Posts: 218
Joined: Wed Aug 10, 2011 8:16 am
Location: Poland

Re: SublimeREPL

Postby wuub on Mon Sep 05, 2011 11:06 am

sublimator wrote:Donated. Thanks for this :)


Muchas gracias :)
SublimeREPL via Package Control & SublimePTY dev/pre-alpha. Donations are appreciated, but not required :) Twitter: @wuub
wuub
 
Posts: 218
Joined: Wed Aug 10, 2011 8:16 am
Location: Poland

Re: SublimeREPL

Postby FalconNL on Mon Sep 05, 2011 2:06 pm

Fantastic stuff. One question though: I added a menu option for a Haskell REPL and that works fine. However, by default it doesn't load the current file I'm working in. Of course I can just type :load filename once I'm in the REPL, but it'd be nice to be able to automate this. I tried to do so by changing the command to

Code: Select all
"cmd": ["ghci", "$file"],


But this passes "$file" as a literal string, which obviously doesn't work. Is there a simple way to accomplish this in the menu or do I need to create a Python script to build the command dynamically?
FalconNL
 
Posts: 67
Joined: Thu May 29, 2008 8:17 pm

Re: SublimeREPL

Postby wuub on Mon Sep 05, 2011 2:33 pm

FalconNL wrote:
Code: Select all
"cmd": ["ghci", "$file"],


Pull the newest revision and it should work as expected :)
SublimeREPL via Package Control & SublimePTY dev/pre-alpha. Donations are appreciated, but not required :) Twitter: @wuub
wuub
 
Posts: 218
Joined: Wed Aug 10, 2011 8:16 am
Location: Poland

Re: SublimeREPL

Postby FalconNL on Mon Sep 05, 2011 2:51 pm

wuub wrote:
FalconNL wrote:
Code: Select all
"cmd": ["ghci", "$file"],


Pull the newest revision and it should work as expected :)


Thank you good sir :)

For the sake of completion, here is the full command for a Haskell REPL (feel free to incorporate it):

Code: Select all
{"command": "repl_open",
"caption": "Haskell",
"mnemonic": "h",
"args": {
    "type": "subprocess",
    "encoding": "utf8",
    "cmd": ["ghci"],
    "cwd": "$file_path",
    "syntax": "Packages/Haskell/Haskell.tmLanguage"
    }
}


One more suggestion: it would be great if SublimeREPL could automatically split the view vertically and put the REPL in the bottom group.
FalconNL
 
Posts: 67
Joined: Thu May 29, 2008 8:17 pm

Re: SublimeREPL

Postby wuub on Mon Sep 05, 2011 3:09 pm

Thanks for the bug report.

FalconNL wrote:For the sake of completion, here is the full command for a Haskell REPL (feel free to incorporate it):


Already in the repo. I'm using ["ghc", "--interactive"] instead of ["ghci"], because when killed, ghci leaves a spawned child process for some reason (at least on windows).

FalconNL wrote:One more suggestion: it would be great if SublimeREPL could automatically split the view vertically and put the REPL in the bottom group.


It is on the todo list. Stay tuned :)
SublimeREPL via Package Control & SublimePTY dev/pre-alpha. Donations are appreciated, but not required :) Twitter: @wuub
wuub
 
Posts: 218
Joined: Wed Aug 10, 2011 8:16 am
Location: Poland

Re: SublimeREPL

Postby joaodrp on Mon Sep 05, 2011 5:10 pm

there is some Ruby option?
joaodrp
 
Posts: 31
Joined: Fri Jul 29, 2011 11:29 am

Re: SublimeREPL

Postby aparajita on Mon Sep 05, 2011 6:03 pm

Awesome as always. One thing though, SublimeLinter is linting the input panel according to the language it is running, which is obviously not ideal. I'm wondering if there is some way I can identify the view as a SublimeREPL view so I can automatically turn the linter off for that?
aparajita
 
Posts: 177
Joined: Sun Jul 24, 2011 10:42 pm

Re: SublimeREPL

Postby wuub on Mon Sep 05, 2011 6:18 pm

(...) just have a normal document and `push lines` the current line or non empty selection to the interpreter. (..)


Pushing code from views to REPLs is definitely one of the things that I want to add very soon.

there is some Ruby option?


Working on it right now.

I'm wondering if there is some way I can identify the view as a SublimeREPL


view.settings().get("repl") will return True for REPL views and None for everything else.
SublimeREPL via Package Control & SublimePTY dev/pre-alpha. Donations are appreciated, but not required :) Twitter: @wuub
wuub
 
Posts: 218
Joined: Wed Aug 10, 2011 8:16 am
Location: Poland

Re: SublimeREPL

Postby wuub on Tue Sep 06, 2011 11:23 am

sublimator wrote:That project has an FSM based tty emulator. Nifty. Seems there's a few libs available for this type of thing.


I've been playing with pexpect based REPL yesterday. It's still incomplete when compared to the subprocess one(eg. expanding $file/$filepath in env and cwd), but initial tests show that it will be a great addition and should resolve lots of issues with bash/irb/... and other isatty() checking bastards :)
http://code.wuub.net/sublimerepl/changeset/c4b362242e40

On the other hand winpexpect (py) andr Expect for Windows (tcl) are not working as well as I would like them to. Wrapping powershell is still an open problem.
SublimeREPL via Package Control & SublimePTY dev/pre-alpha. Donations are appreciated, but not required :) Twitter: @wuub
wuub
 
Posts: 218
Joined: Wed Aug 10, 2011 8:16 am
Location: Poland

Next

Return to Plugin Announcements

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 10 guests