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 208
  • Win 150
  • Mac 42
  • Linux 16
Jul 27 Jul 26 Jul 25 Jul 24 Jul 23 Jul 22 Jul 21 Jul 20 Jul 19 Jul 18 Jul 17 Jul 16 Jul 15 Jul 14 Jul 13 Jul 12 Jul 11 Jul 10 Jul 9 Jul 8 Jul 7 Jul 6 Jul 5 Jul 4 Jul 3 Jul 2 Jul 1 Jun 30 Jun 29 Jun 28 Jun 27 Jun 26 Jun 25 Jun 24 Jun 23 Jun 22 Jun 21 Jun 20 Jun 19 Jun 18 Jun 17 Jun 16 Jun 15 Jun 14 Jun 13
Windows 0 0 0 0 0 0 0 0 0 0 0 0 1 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
Mac 0 0 1 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 1 0 1 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. :)