sublime_text icon indicating copy to clipboard operation
sublime_text copied to clipboard

Allow Tab Cycling Between Panels

Open Unknow0059 opened this issue 2 years ago • 1 comments

Problem description

From ST3 to ST4, #3216 regressed this behavior.

I used it frequently.

Preferred solution

A. An option in Settings that allows choosing whether cycling through panes is allowed, like previously, or not, like in #3216.

Alternatives

B. Keep the enhancement. C. Revert the enhancement.

Additional Information

No response

Unknow0059 avatar Aug 28 '22 06:08 Unknow0059

ST basically supports cycling through groups/panes via focus_neighboring_group command very much like it supports cycling through tabs in group/pane via next_view/prev_view.

The main usability issue, IMHO is, that cycling through tabs via ctrl+pageup/pagedown differs much from the binding ctrl+k, ctrl+left and ctrl+k, ctrl+right to cycle through groups/panes.

I personally therefore added the following custom bindings:

	{
		"keys": ["alt+pagedown"],
		"command": "focus_neighboring_group"
	},
	{
		"keys": ["alt+pageup"],
		"command": "focus_neighboring_group",
		"args": {"forward": false}
	},
	{
		"keys": ["shift+alt+pagedown"],
		"command": "move_to_neighboring_group"
	},
	{
		"keys": ["shift+alt+pageup"],
		"command": "move_to_neighboring_group",
		"args": {"forward": false}
	},

Additionally created https://github.com/deathaxe/MoveView which provides move_to_neighboring_index command (inspired by core move_to_neighboring_group command):

	{ 
		"keys": ["ctrl+shift+pageup"],
		"command": "move_to_neighboring_index", 
		"args": { "forward": false } 
	},
	{ 
		"keys": ["ctrl+shift+pagedown"],
		"command": "move_to_neighboring_index"
	}

As a result cycling through tabs or moving tabs around within and across groups/panes is possible with pageup and pagedown keys in combination with ctrl+ (within group), alt+ (across groups) and shift+ (move) modifiers.

I personally find it even faster to cycle through groups in the first place followed by cycling though tabs of the active view, especially if groups contain dozens of views.

deathaxe avatar Sep 02 '22 13:09 deathaxe

In spite of workarounds I'd still prefer if there was a built-in solution which enabled the ST3 behaviour if so desired.

thoran avatar Nov 03 '22 05:11 thoran