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 203
  • Win 148
  • Mac 41
  • Linux 14
May 14 May 13 May 12 May 11 May 10 May 9 May 8 May 7 May 6 May 5 May 4 May 3 May 2 May 1 Apr 30 Apr 29 Apr 28 Apr 27 Apr 26 Apr 25 Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 Apr 2 Apr 1 Mar 31
Windows 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 0 0 0 0 0 0 1 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 1 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 1 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. :)