51

I saw this project that basically opens a new terminal window from sublime text-2.
What I'm looking for is a way to open the terminal inside sublime text 2 via console.
Does anyone knows how can I do that?

messivanio
  • 2,263
  • 18
  • 24
Sagiv Ofek
  • 25,190
  • 8
  • 60
  • 55

6 Answers6

34

SublimeREPL does what you want

https://github.com/wuub/SublimeREPL/

Of course, there are some limitations because the window of Sublime Text 2 is not originally designed for continuous running buffer of stdin input.

Mikko Ohtamaa
  • 82,057
  • 50
  • 264
  • 435
  • From the git page: Is this a terminal emulator? No. Shell (cmd.exe/bash) REPL can be used for simple tasks (file creation, git init etc.) but anything terminal like (mc, vim) will not work! – fkoessler Aug 17 '13 at 07:32
  • 1
    Yes. You can only do few things with it and it is severely limited. Thus, I suggest stick with a real terminal. – Mikko Ohtamaa Aug 19 '13 at 07:24
  • 29
    Why is this upvoted? This is a completely different thing from a terminal like the OP asked for. The answer may be "you can't" but this still isn't correct as a "next best thing" –  Feb 20 '14 at 15:40
14

+ 2 years (sorry) - but my solution in ubuntu was to open both sublime and my (real) terminal in the same window, shrink and stretch the terminal to cover the lower portion of the screen, then right click on the terminal and select "keep on top" - works a treat.

SaminOz
  • 457
  • 5
  • 11
13

EDIT 04/23/2019: Terminus extends TerminalView & adds:

  • Windows support
  • Continuous history
  • Easily customizable themes (see Terminus Utilities)
  • Unicode support
  • 256 colors support
  • Better xterm support
  • Terminal panel view
  • imgcat support (also works on Linux / WSL)

Bind key shortcut to open shell on file path (e.g. ctrl+alt+t to open):

{ 
  "keys": ["ctrl+alt+t"], "command": "terminus_open", "args": {
    "cwd": "${file_path:${folder}}"
  }
}

enter image description here

enter image description here


Original Answer:

I've tried pretty much every terminal package around, what you want is TerminalView:

enter image description here

To bind a key shortcut, simply add it to your user key bindings file:

{ "keys": ["ctrl+alt+t"], "command": "terminal_view_open" },
Syden
  • 8,425
  • 5
  • 26
  • 45
  • 3
    Wow, this is perfect - handles everything, even interactive apps. Should be the accepted answer. – Steve Bennett Sep 07 '17 at 06:39
  • 1
    Indeed, this works perfectly (and, looking at the commit history, development on this started only in 2017, while the original question was asked in 2012). – aspiring_sarge Feb 17 '18 at 02:28
4

Use Glue. It is a plugin that provides an interface to your shell from the Sublime Text. So basically it a terminal for Sublime Text.

https://packagecontrol.io/packages/Glue

Snykri
  • 580
  • 1
  • 9
  • 15
2

Like @mikko I also decided that due to the limitations of the shell add-ons for sublime to stick with a real terminal window - I've got too used to the F2-F4 workflow of geany.

So really the issue for me is quickly flip-flopping between the two windows easily. To that end, I knocked this up - to be fired from F12 (or whatever you want) in your desktop manager (XFCE in my case)

Note, I launch sublime a from shortcut with terminator -T st3_bash & st3 so I've got a known bash window title for switching focus to.

https://gist.github.com/robertpearce/8725224

I know this code is really, (really) bad, and it'll fail if you have multiple sublime's open, but i don't ever have that anyhow.

Feel free to fork and improve it.

Razib
  • 10,965
  • 11
  • 53
  • 80
Sirex
  • 219
  • 4
  • 22
0

I have always wanted a way to open terminal inside sublime text. After trying out different options I have come to a solution of installing guake terminal as a work around on linux systems, follow the steps below.

  1. Run the command sudo apt-get install guake
  2. Press F12 (for opening terminal)

Now you can use the terminal without leaving sublime.

For windows :

  1. Install Conemu
  2. Have the Quake settings as shown in the pic below
  3. Press ctrl + ~ (for opening terminal)

Note: This is just a workaround. Guake is basically a terminal package for ubuntu-like linux systems.

Quake settings of Conemu

Moh .S
  • 1,920
  • 19
  • 19