mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Add support for save all via meta-S
This commit is contained in:
@@ -7,3 +7,4 @@ window.keymap.bindKeys '*'
|
||||
up: 'move-up'
|
||||
pagedown: 'page-down'
|
||||
pageup: 'page-up'
|
||||
'meta-S' : 'save-all'
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user