ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Force​Move​To​Group

by tkotosz ST3

Sublime Plugin to force move view to group

Details

Installs

  • Total 219
  • Win 158
  • Mac 45
  • Linux 16
Dec 21 Dec 20 Dec 19 Dec 18 Dec 17 Dec 16 Dec 15 Dec 14 Dec 13 Dec 12 Dec 11 Dec 10 Dec 9 Dec 8 Dec 7 Dec 6 Dec 5 Dec 4 Dec 3 Dec 2 Dec 1 Nov 30 Nov 29 Nov 28 Nov 27 Nov 26 Nov 25 Nov 24 Nov 23 Nov 22 Nov 21 Nov 20 Nov 19 Nov 18 Nov 17 Nov 16 Nov 15 Nov 14 Nov 13 Nov 12 Nov 11 Nov 10 Nov 9 Nov 8 Nov 7
Windows 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Mac 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

SublimeForceMoveToGroup

Sublime Plugin to force move view to group

By default sublime has key binding to switch between groups:

ctrl+1: focus group 0

ctrl+2: focus group 1

… and so on until ctrl+9

in addition to this it has key binding to move the current view (tab) to a group:

ctrl+shift+1: move to group 0

ctrl+shift+2: move to group 1

… and so on until ctrl+shift+9

The problem is that ctrl+shift+num only moves the file to the given group if the groups exists. Also if you move the last file out of the group then it still leaves the group open. There are key bindings for creating a new group or closing one, but using 4 different key binding for create, close, move and switch sounds a bit weird.

So this SublimeForceMoveToGroup command automates group create and close for you.

For example you can setup the following key-bindings:

{ "keys": ["ctrl+shift+1"], "command": "force_move_to_group", "args": { "group": 0 } },
{ "keys": ["ctrl+shift+2"], "command": "force_move_to_group", "args": { "group": 1 } },

This will override the default “move_to_group” bindings. Then you are good to go.

If you have a few tabs open then just pick one then “ctrl+shift+2”, then that tab will move to new group so you can view it side-by-side with other files. You can switch between the left and right group with ctrl+1 and ctrl+2 (default key bindings) and you can move any tab from left to right with “ctrl+shift+2” and from right to left with “ctrl+shift+1”. I think it is much easier to remember “ctrl+num” for navigating between groups and “ctrl+shift+num” to move tabs between groups. Oh and also if you you move the last tab from right to left (so no more tab left in group 2) then it will automatically close that empty group. :)