Skip to content

Commit

Permalink
Add keymap for 'ctrl-tab ^ctrl' in order to move item to top of stack…
Browse files Browse the repository at this point in the history
… when lifting ctrl.
  • Loading branch information
natalieogle committed Feb 28, 2016
1 parent 3641cc0 commit 69a6b9e
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions keymaps/darwin.cson
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
1 change: 1 addition & 0 deletions keymaps/linux.cson
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
1 change: 1 addition & 0 deletions keymaps/win32.cson
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion src/pane.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
1 change: 1 addition & 0 deletions src/register-default-commands.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 69a6b9e

Please sign in to comment.