Sublime Forum

How to align output panel vertically?

#1

hey beautiful peoples,

i am using the awesome terminus plugin to get powershell.exe in sublime text 3 build 3176

it would be awesome if i could get the Terminus: Open Default Shell in Panel to show panel on right or left side instead of showing at bottom

how can i do this

cheers?

0 Likes

#2

Panels can only be displayed at the bottom of the window; it’s not possible to move them. If you want to display Terminus in a vertical layout you need to split the window vertically and then use Terminus: Open Default Shell in View to open Terminus in a tab.

0 Likes

#3

Sorry for digging up skeletons, but I was looking for this too and came up with a solution.
Use the following to open a panel vertically rather than horizontally:

    {
        "keys": ["ctrl+alt+t"],
        "command": "terminus_open",
        "args": {
            "config_name": "Default",
            "pre_window_hooks": [
                ["set_layout", {
                    "cols": [0.0, 0.5, 1.0],
                    "rows": [0.0, 1.0],
                    "cells": [[0, 0, 1, 1], [1, 0, 2, 1]]
                }],
                ["focus_group", {"group": 1}]
            ]
        }
    }
0 Likes

#4

with @OdatNurd solution i created a sublime build which open the tab on right with oregami or window post hook i think, but whenever i run the code it create another tab on right and i have to close it again.

my question is
how can i set oregami in build system that it closes the previous tab and opens a new one.

0 Likes

#5

There are a couple of solutions to solve this in this video; which one you might need depends on what your build is currently doing to move the tab and how you want it to behave.

0 Likes

#6

thank you, exactly what i needed,
i m new to this, does it have any documentation related to this?

0 Likes

#7

I think the closest thing is the README for Terminus (there is documentation on build systems in general though).

0 Likes

#8

ok now that I have tired this on sublime text 4, it doesn’t seems to work!


“target”: “terminus_open”,
“auto_close”: false,
“title”: “Python_Tab”,

"pre_window_hooks": [
	["window_focus", {"store":true}],
	["close_termius_view_by_title",{"title":"Python_Tab"}],
	["window_focus", {"store":false}],	
],
"post_window_hooks":[
	["carry_file_to_pane", {"direction": "right"}],
	["window_focus", {"store":false}],
],
0 Likes

#9

If I recall correctly, the way focus changes when tabs are closed changed in AT4 ; I think you want the plugin to look something like this instead:

import sublime_plugin

class CloseTerminusViewCommand(sublime_plugin.WindowCommand):
    def run(self, title):
        for view in self.window.views():
            if view.name() == title:
                view.run_command('terminus_close')

This is mostly the same as the one in the video that’s intended for ST3, but it doesn’t have the two lines that try to restore the focus after the Terminus tab closes.

Making this change might work a little better for you.

0 Likes

#10

thanks, its the same as before thogh

0 Likes

#11

Sublime should add this basic feature built-in.
Having panel on bottom take a lot of horizontal space of screen,
and vertical panel would be good to for wide ratio screens.

0 Likes