Resizing Panes Keyboard Shortcuts


#1

It would be awesome if I could resize my split view via my keyboard much like the way terminator (https://launchpad.net/terminator)

AND it would be even more awesome if i could just use my keyboard to make the split panes to begin with, also much like terminator lol


#2

So it looks like this should be possible using the Keybindings setting however I have set for example

move_term_panedown = Ctrl-Shift-Down

I am thinking that should move the current pane down am I correct? if so it doesnt work with a terminal window


#3

This can’t be done with Keybinding settings alone since it also requires implementing commands in js.
move_term_panedown is for tmux panes and is not useful here
but movetabright command is somewhat related https://github.com/c9/c9.ide.behaviors/blob/master/tabs.js#L875
you could use init script to add new commands like this

services.commands.addCommand({
    name: "make_current_pane_larger",
    bindKey: {win: "alt-x g"},
    exec: function() {
        var tab = services.tabManager.focussedTab;
        tab.pane.width = "60%"
   }
})

#4

Awesome thanks :slight_smile: can’t wait to try this out.


#5

So I have been trying to implement what you showed me but I am finding keybindings don’t work when I am in a terminal window… I am trying to read the docs to figure out how to access the panes with terminals open but can’t seem to really figure anything out.


#6

It probably doesn’t work because terminals use hardcoded whitelist of global commnds. We’ll need to make terminal keybindings customizable similar to other keybindings.


#7

Ah ok cool, thanks :slight_smile:


#8

Is it possible to execute a function within the init script externally? So would I be able to bind a command in the terminal that executed a script that called the function with the init script?