mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Move find-in-file event and specs to command panel
This commit is contained in:
@@ -22,6 +22,7 @@ class CommandPanel extends View
|
||||
|
||||
@rootView.on 'command-panel:toggle', => @toggle()
|
||||
@rootView.on 'command-panel:execute', => @execute()
|
||||
@rootView.on 'command-panel:find-in-file', => @show("/")
|
||||
@rootView.on 'command-panel:repeat-relative-address', => @repeatRelativeAddress()
|
||||
@editor.addClass 'single-line'
|
||||
|
||||
|
||||
@@ -6,4 +6,5 @@ window.keymap.bindKeys '.command-panel .editor',
|
||||
enter: 'command-panel:execute'
|
||||
|
||||
window.keymap.bindKeys '.editor',
|
||||
'meta-g': 'command-panel:repeat-relative-address'
|
||||
'meta-g': 'command-panel:repeat-relative-address'
|
||||
'meta-f': 'command-panel:find-in-file'
|
||||
|
||||
@@ -2,7 +2,6 @@ window.keymap.bindKeys '*'
|
||||
'meta-s': 'save'
|
||||
'meta-w': 'close'
|
||||
'alt-meta-i': 'show-console'
|
||||
'meta-f': 'find-in-file'
|
||||
|
||||
window.keymap.bindKeys '.editor',
|
||||
'meta-s': 'save'
|
||||
@@ -32,4 +31,4 @@ window.keymap.bindKeys '.editor',
|
||||
'meta-[': 'outdent-selected-rows'
|
||||
'meta-]': 'indent-selected-rows'
|
||||
'meta-{': 'show-previous-buffer'
|
||||
'meta-}': 'show-next-buffer'
|
||||
'meta-}': 'show-next-buffer'
|
||||
|
||||
@@ -21,8 +21,6 @@ class RootView extends View
|
||||
initialize: ({ pathToOpen, projectPath, panesViewState }) ->
|
||||
@on 'toggle-file-finder', => @toggleFileFinder()
|
||||
@on 'show-console', => window.showConsole()
|
||||
@on 'find-in-file', => @commandPanel.show("/")
|
||||
|
||||
@one 'attach', => @focus()
|
||||
@on 'focus', (e) =>
|
||||
if @editors().length
|
||||
@@ -36,7 +34,7 @@ class RootView extends View
|
||||
else if pathToOpen?
|
||||
@project = new Project(fs.directory(pathToOpen))
|
||||
@open(pathToOpen) if fs.isFile(pathToOpen)
|
||||
else if not panesViewState
|
||||
else if not panesViewState?
|
||||
@activeEditor().setBuffer(new Buffer)
|
||||
|
||||
@deserializePanes(panesViewState) if panesViewState
|
||||
|
||||
Reference in New Issue
Block a user