🐧 Add keymap implementation to reorder tabs in linux

Esse commit está contido em:
Ardeshir Javaherchi
2014-11-08 15:03:36 -08:00
commit de Ben Ogle
commit ff80545285
3 arquivos alterados com 16 adições e 0 exclusões
+2
Ver Arquivo
@@ -12,6 +12,8 @@
'ctrl-alt-s': 'application:run-all-specs'
'ctrl-alt-o': 'application:open-dev'
'ctrl-shift-o': 'application:open-folder'
'ctrl-shift-pageup': 'pane:move-item-to-left'
'ctrl-shift-pagedown': 'pane:move-item-to-right'
'F11': 'window:toggle-full-screen'
# Sublime Parity
+2
Ver Arquivo
@@ -119,6 +119,8 @@ atom.commands.add 'atom-pane',
'pane:show-item-7': -> @getModel().activateItemAtIndex(6)
'pane:show-item-8': -> @getModel().activateItemAtIndex(7)
'pane:show-item-9': -> @getModel().activateItemAtIndex(8)
'pane:move-item-to-right': -> @getModel().moveItemToRight()
'pane:move-item-to-left': -> @getModel().moveItemToLeft()
'pane:split-left': -> @getModel().splitLeft(copyActiveItem: true)
'pane:split-right': -> @getModel().splitRight(copyActiveItem: true)
'pane:split-up': -> @getModel().splitUp(copyActiveItem: true)
+12
Ver Arquivo
@@ -289,6 +289,18 @@ class Pane extends Model
else
@activateItemAtIndex(@items.length - 1)
# Public: Move the active tab to the right.
moveItemToRight: ->
index = @getActiveItemIndex()
rightItemIndex = index + 1
@moveItem(@getActiveItem(), rightItemIndex) unless rightItemIndex > @items.length - 1
# Public: Move the active tab to the left
moveItemToLeft: ->
index = @getActiveItemIndex()
leftItemIndex = index - 1
@moveItem(@getActiveItem(), leftItemIndex) unless leftItemIndex < 0
# Public: Get the index of the active item.
#
# Returns a {Number}.