Skip to content

Instantly share code, notes, and snippets.

@if540
Forked from anonymous/Default (OSX).sublime-keymap
Last active December 17, 2015 18:09
Show Gist options
  • Save if540/5651400 to your computer and use it in GitHub Desktop.
Save if540/5651400 to your computer and use it in GitHub Desktop.
Default (Windows).sublime-keymap - Windows環境下的按鍵設定檔
[
{ "keys": ["ctrl+super+left"], "command": "move_tab", "args": {"mod": -1} },
{ "keys": ["ctrl+super+right"], "command": "move_tab", "args": {"mod": 1} }
]
#http://www.sublimetext.com/forum/viewtopic.php?f=2&t=5897
import sublime_plugin
class MoveTab(sublime_plugin.TextCommand):
def run(self, edit, mod):
view = self.view
window = view.window()
group_index, tab_index = window.get_view_index(view)
view.window().set_view_index(view, group_index,
(tab_index + int(mod)) % len (
view.window().views_in_group(group_index)) )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment