Add support for save all via meta-S

This commit is contained in:
Kevin Sawicki
2012-09-19 16:53:24 -07:00
parent a269eb39d0
commit f7670dc1a0
3 changed files with 35 additions and 0 deletions

View File

@@ -7,3 +7,4 @@ window.keymap.bindKeys '*'
up: 'move-up'
pagedown: 'page-down'
pageup: 'page-up'
'meta-S' : 'save-all'

View File

@@ -64,6 +64,7 @@ class RootView extends View
@on 'increase-font-size', => @setFontSize(@getFontSize() + 1)
@on 'decrease-font-size', => @setFontSize(@getFontSize() - 1)
@on 'focus-next-pane', => @focusNextPane()
@on 'save-all', => @saveAll()
afterAttach: (onDom) ->
@focus() if onDom
@@ -217,3 +218,5 @@ class RootView extends View
catch error
console.error "Failed to load `#{atom.configFilePath}`", error.stack, error
saveAll: ->
editor.save() for editor in @getEditors()