mirror of
https://github.com/atom/atom.git
synced 2026-02-08 21:55:05 -05:00
Meta-s triggers save event with the new css-based keymap.
This commit is contained in:
@@ -18,6 +18,7 @@ class Editor extends Template
|
||||
@aceSessions = {}
|
||||
@buildAceEditor()
|
||||
@setBuffer(new Buffer)
|
||||
@on 'save', => @save()
|
||||
|
||||
shutdown: ->
|
||||
@destroy()
|
||||
|
||||
@@ -23,9 +23,9 @@ class RootView extends Template
|
||||
initialize: ({url}) ->
|
||||
@globalKeymap = new GlobalKeymap
|
||||
@globalKeymap.bindKeys '*'
|
||||
'meta+s': 'save'
|
||||
'meta+w': 'close'
|
||||
'meta+t': 'find-files'
|
||||
'meta-s': 'save'
|
||||
'meta-w': 'close'
|
||||
'meta-t': 'find-files'
|
||||
|
||||
@editor.keyEventHandler = @globalKeymap
|
||||
|
||||
|
||||
@@ -25,7 +25,8 @@ windowAdditions =
|
||||
$(window).unbind('blur')
|
||||
|
||||
bindMenuItems: ->
|
||||
@bindMenuItem "File > Save", "meta+s", => @rootView.editor.save()
|
||||
# we want to integrate this better with keybindings
|
||||
# @bindMenuItem "File > Save", "meta+s", => @rootView.editor.save()
|
||||
|
||||
bindMenuItem: (path, pattern, action) ->
|
||||
@menuItemActions[path] = {action: action, pattern: pattern}
|
||||
|
||||
Reference in New Issue
Block a user