Home Download Buy Blog Forum Support

shell-mode

shell-mode

Postby bphunter1972 on Wed Mar 27, 2013 12:07 am

Sorry for yet another n00b question, but can I run a shell in a Sublime window? Couldn't find the answer to this anyplace else.
bphunter1972
 
Posts: 16
Joined: Mon Mar 25, 2013 5:02 am
Location: San Jose, CA USA

Re: shell-mode

Postby lawlist on Wed Mar 27, 2013 6:54 am

Shell Turtlestein plugin

Alternatively, there are two teminal plugins that essentially activate the external OS terminal program.
lawlist
 
Posts: 54
Joined: Thu Feb 21, 2013 6:47 pm

Re: shell-mode

Postby bphunter1972 on Wed Mar 27, 2013 7:31 am

I don't think Shell Turtlestein is what I'm looking for. That just executes a single command, or launches the Terminal program for me (not much help).

Emacs (fwiw) has a shell in its own buffer, so you never have to leave emacs and--most importantly--you have all the same editing abilities in your shell that you do in your editor.
bphunter1972
 
Posts: 16
Joined: Mon Mar 25, 2013 5:02 am
Location: San Jose, CA USA

Re: shell-mode

Postby wbond on Wed Mar 27, 2013 1:35 pm

There is no terminal built into ST, although SublimePTY was an attempt at that. From my experience, launching the OS terminal is usually the best solution since it is a full-fledged terminal program, and the conventions and shortcuts vary between operating systems.
wbond
 
Posts: 528
Joined: Mon Feb 28, 2011 5:33 am

Re: shell-mode

Postby bphunter1972 on Wed Mar 27, 2013 3:29 pm

Being able to use the same search, movement, editing, etc., features in my shell is very useful. Mac OS Terminal doesn't emulate Sublime, nor does csh.

Maybe I'll hack it together someday, if my time ever frees up. Highly unlikely, though... :cry:
bphunter1972
 
Posts: 16
Joined: Mon Mar 25, 2013 5:02 am
Location: San Jose, CA USA

Re: shell-mode

Postby wbond on Wed Mar 27, 2013 3:47 pm

You should look at https://github.com/wuub/sublimepty and talk to wuub before trying to accomplish having a terminal in Sublime Text. From what I understand, it is no trivial task, and there are limitations of the current ST API that prevent it from really working.

If you don't want a full terminal, but just want to be able to type commands and see the output, Xiki (http://xiki.org/) and https://github.com/lunixbochs/SublimeXiki might be worth checking out.
wbond
 
Posts: 528
Joined: Mon Feb 28, 2011 5:33 am

Re: shell-mode

Postby wuub on Wed Mar 27, 2013 4:35 pm

Yeah, PTY was quite fun experiment but it's basically a one big hack on another big hack powered by a third hack ;). Forcing sublime to do things it was never meant to do:

- https://github.com/wuub/SublimePTY/blob ... ime-keymap (capturing all keypresses)
- https://github.com/wuub/SublimePTY/blob ... TY.tmTheme (colorized output)
- and so on :)

There were three main problems:
1) pushing changes on screen was a tiny bit too slow for it to be usable, it "worked" in tech-demo kind of way, but after a few minutes you would just get frustrated with it
2) I was torn between developing windows version (for my day to day work) and linux/osx one (for my hobby projects).
3) Sublime added ugly pinkish border around regions, making final output not really that pleasant to look at.

Since then 3 and 2 have changed somewhat. My new workplace is 100% POSIX compatible ;) and Jon improved region drawing a bit. Also new async API in ST3 could make it easier to fix point 1.

I'll probably try to revive this project soon and see what happens.
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: shell-mode

Postby bphunter1972 on Wed Mar 27, 2013 7:49 pm

Great! In the meantime I discovered the userecho page and +1'd the second-highest requested feature (although, by my reckoning, the code-folding one is basically done).

Thanks! Great user communities make great programs.
bphunter1972
 
Posts: 16
Joined: Mon Mar 25, 2013 5:02 am
Location: San Jose, CA USA


Return to General Discussion

Who is online

Users browsing this forum: demetris and 22 guests