Sublime Forum

Way to integrate terminal and file picker in sublimetext?

#1

Is there a way in SublimeText 3 to integrate a terminal into the editor? outside of using the Glue plugin which doesn’t do exactly what is needed for what I want (just a straight up embedded terminal)? Also, is there a way to set a hotkey to select and open a file in SublimeText? Similar to the Rubymine open and select command.

0 Likes

#2

As far as I know, there’s no way to just have a window with an interactive console in it, which is why the Glue plugin works the way that it does. The Terminal plugin can bridge the gap by opening a new native terminal window in the appropriate folder, but that’s about as good as it gets (that I’ve found so far).

For your other question, it is definitely possible to bind a key shortcut to open a file. For example:

{ 
    "keys": ["ctrl+shift+o"], 
    "command": "open_file", 
    "args": {
        "file": "${project_path}/WebRequest/WebRequest.cs"
    }
}

This example opens a file that’s in the current project, but you can also specify the full path to any file that you want even if it’s not inside the project. If the file is already open, this just switches to the tab that contains it.

See the command list entry on this command for more information (for example. how to insert text into the tab if the file can’t be opened and how relative file names work)

0 Likes