Add keymap for 'ctrl-tab ^ctrl' in order to move item to top of stack when lifting ctrl.

This commit is contained in:
natalieogle
2016-02-16 20:28:58 -08:00
parent 3641cc0296
commit 69a6b9e5c5
5 changed files with 5 additions and 1 deletions

View File

@@ -74,6 +74,7 @@
'ctrl-pageup': 'pane:show-previous-item'
'ctrl-pagedown': 'pane:show-next-item'
'ctrl-tab': 'pane:show-next-recently-used-item'
'ctrl-tab ^ctrl': 'pane:move-item-to-top-of-stack'
'ctrl-shift-tab': 'pane:show-previous-item'
'cmd-=': 'window:increase-font-size'
'cmd-+': 'window:increase-font-size'

View File

@@ -47,6 +47,7 @@
'backspace': 'core:backspace'
'shift-backspace': 'core:backspace'
'ctrl-tab': 'pane:show-next-recently-used-item'
'ctrl-tab ^ctrl': 'pane:move-item-to-top-of-stack'
'ctrl-shift-tab': 'pane:show-previous-item'
'ctrl-pageup': 'pane:show-previous-item'
'ctrl-pagedown': 'pane:show-next-item'

View File

@@ -53,6 +53,7 @@
'backspace': 'core:backspace'
'shift-backspace': 'core:backspace'
'ctrl-tab': 'pane:show-next-recently-used-item'
'ctrl-tab ^ctrl': 'pane:move-item-to-top-of-stack'
'ctrl-shift-tab': 'pane:show-previous-item'
'ctrl-pageup': 'pane:show-previous-item'
'ctrl-pagedown': 'pane:show-next-item'

View File

@@ -333,7 +333,7 @@ class Pane extends Model
@itemStackIndex = @itemStack.length if @itemStackIndex is 0
# Moves the active item to the end of the itemStack once the ctrl key is lifted
stopMovingThroughStackAndMoveItemToEndOfStack: ->
moveItemToTopOfStack: ->
delete @itemStackIndex
@addItemToStack(@activeItem)

View File

@@ -3,6 +3,7 @@
module.exports = ({commandRegistry, commandInstaller, config}) ->
commandRegistry.add 'atom-workspace',
'pane:show-next-recently-used-item': -> @getModel().getActivePane().activateNextRecentlyUsedItem()
'pane:move-item-to-top-of-stack': -> @getModel().getActivePane().moveItemToTopOfStack()
'pane:show-next-item': -> @getModel().getActivePane().activateNextItem()
'pane:show-previous-item': -> @getModel().getActivePane().activatePreviousItem()
'pane:show-item-1': -> @getModel().getActivePane().activateItemAtIndex(0)