仅使用键在Sublime Text中将选项卡从一列移动到另一列

问题描述 投票:19回答:4

有谁知道这个捷径?我在网上寻找它,但我似乎无法找到它

sublimetext2 text-editor sublimetext sublimetext3
4个回答
37
投票

移动它是CTRLSHIFT1移动到组0,CTRLSHIFT2移动到组1,依此类推 - 这是在Linux,Windows和OSX上。

文本缓冲区也可以移动到它们的相邻组:

  • Linux,Windows: CTRLk + CTRLSHIFTLEFT CTRLk + CTRLSHIFTRIGHT
  • OSY 超级+超级电梯 Superk + SuperShiftrigt

这是我的Default (Linux).sublime-keymap的整个组部分--Windows键完全相同,而OSX键在顶部相同但底部不同,下面我放置了一个解释性注释。

// The keys BELOW are for Linux, Windows, and OSX.

{ "keys": ["ctrl+1"], "command": "focus_group", "args": { "group": 0 } },
{ "keys": ["ctrl+2"], "command": "focus_group", "args": { "group": 1 } },
{ "keys": ["ctrl+3"], "command": "focus_group", "args": { "group": 2 } },
{ "keys": ["ctrl+4"], "command": "focus_group", "args": { "group": 3 } },
{ "keys": ["ctrl+5"], "command": "focus_group", "args": { "group": 4 } },
{ "keys": ["ctrl+6"], "command": "focus_group", "args": { "group": 5 } },
{ "keys": ["ctrl+7"], "command": "focus_group", "args": { "group": 6 } },
{ "keys": ["ctrl+8"], "command": "focus_group", "args": { "group": 7 } },
{ "keys": ["ctrl+9"], "command": "focus_group", "args": { "group": 8 } },
{ "keys": ["ctrl+shift+1"], "command": "move_to_group", "args": { "group": 0 } },
{ "keys": ["ctrl+shift+2"], "command": "move_to_group", "args": { "group": 1 } },
{ "keys": ["ctrl+shift+3"], "command": "move_to_group", "args": { "group": 2 } },
{ "keys": ["ctrl+shift+4"], "command": "move_to_group", "args": { "group": 3 } },
{ "keys": ["ctrl+shift+5"], "command": "move_to_group", "args": { "group": 4 } },
{ "keys": ["ctrl+shift+6"], "command": "move_to_group", "args": { "group": 5 } },
{ "keys": ["ctrl+shift+7"], "command": "move_to_group", "args": { "group": 6 } },
{ "keys": ["ctrl+shift+8"], "command": "move_to_group", "args": { "group": 7 } },
{ "keys": ["ctrl+shift+9"], "command": "move_to_group", "args": { "group": 8 } },
{ "keys": ["ctrl+0"], "command": "focus_side_bar" },

// The keys BELOW are for Linux and Windows only.
//
// The OSX keys all use 'super' instead of 'ctrl'.
//
// e.g. In the top command use: ["super+k", "super+up"]
// e.g. In the bottom command use: ["super+k", "super+shift+right"]

{ "keys": ["ctrl+k", "ctrl+up"], "command": "new_pane" },
{ "keys": ["ctrl+k", "ctrl+shift+up"], "command": "new_pane", "args": {"move": false} },
{ "keys": ["ctrl+k", "ctrl+down"], "command": "close_pane" },
{ "keys": ["ctrl+k", "ctrl+left"], "command": "focus_neighboring_group", "args": {"forward": false} },
{ "keys": ["ctrl+k", "ctrl+right"], "command": "focus_neighboring_group" },
{ "keys": ["ctrl+k", "ctrl+shift+left"], "command": "move_to_neighboring_group", "args": {"forward": false} },
{ "keys": ["ctrl+k", "ctrl+shift+right"], "command": "move_to_neighboring_group" },

希望这可以帮助。


7
投票

如果你的意思是重新排列同一组中的选项卡,那么有一个很好的插件叫做MoveTab

我的键绑定Sublime Text --> Preferences --> Key Bindings (User) -->

{
    "keys": ["super+alt+shift+["],
    "command": "move_tab",
    "args": { "position": "-1" }
},
{
    "keys": ["super+alt+shift+]"],
    "command": "move_tab",
    "args": { "position": "+1" }
}

允许CMD+Shift+Option+[CMD+Shift+Option+]


如果你有Package Control,你可以通过CMD+Shift+P --> Install Package --> MoveTab安装


0
投票
import sublime, sublime_plugin

class DualViewMoveTo(sublime_plugin.WindowCommand):
    def run(self):
            self.window.run_command('set_layout', { "cols": [0.0, 0.5, 1.0], "rows": [0.0, 1.0], "cells": [[0, 0, 1, 1], [1, 0, 2, 1]] })
            self.window.run_command('focus_group', { "group": 0 })
            self.window.run_command('move_to_group', { "group": 1 })

0
投票

Sublime Text本身提供了一个非常出色的插件,名为Origami,它允许您从窗格到窗格创建新窗格(列),删除窗格,移动和克隆视图(选项卡)。您可以使用此插件轻松地在拆分视图之间切换选项卡。此外,如果您只是在单个窗格中重新排序选项卡,那么Sublime Text会提供另一个名为Move​Tab的好插件。

© www.soinside.com 2019 - 2024. All rights reserved.