diff --git a/spec/atom/window-spec.coffee b/spec/atom/window-spec.coffee index f1e8ece3f..3a8fac668 100644 --- a/spec/atom/window-spec.coffee +++ b/spec/atom/window-spec.coffee @@ -46,8 +46,3 @@ describe "Window", -> it "adds a Save item to the main menu after startup", -> expect(OSX.NSApp.mainMenu.itemWithTitle('File').submenu.itemWithTitle('Save')).not.toBeNull() - describe 'meta+s', -> - it 'saves the buffer', -> - spyOn(window.rootView.editor, 'save') - window.keydown 'meta+s' - expect(window.rootView.editor.save).toHaveBeenCalled() diff --git a/src/atom/root-view.coffee b/src/atom/root-view.coffee index b5c8c9b18..d59927098 100644 --- a/src/atom/root-view.coffee +++ b/src/atom/root-view.coffee @@ -20,6 +20,11 @@ class RootView extends Template @subview 'editor', Editor.build() viewProperties: + initialize: -> + @bindKey 'meta+s', => @editor.save() + @bindKey 'meta+w', => window.close() + @bindKey 'meta+t', => @toggleFileFinder() + addPane: (view) -> pane = $('