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

时间:2014-07-31 17:53:43

标签: sublimetext2 text-editor sublimetext sublimetext3

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

4 个答案:

答案 0 :(得分:35)

在Sublime Text 3 ...

移动它是["ctrl+shift+1"]移动到"组0",["ctrl+shift+2"]到"组1"等等 - 那个' s在Linux,Windows和OSX上。

["ctrl+k", "ctrl+shift+left"]["ctrl+k", "ctrl+shift+right"]移至Linux和Windows上的相邻群组,而在OSX上,密钥为["super+k", "super+shift+left"]["super+k", "super+shift+right"]

这里是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" },

希望这有帮助。

答案 1 :(得分: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

进行安装

答案 2 :(得分: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 })

答案 3 :(得分:0)

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