mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
FileFinder is toggleable
This commit is contained in:
@@ -32,15 +32,19 @@ windowAdditions =
|
||||
$(window).unbind('blur')
|
||||
$(window).unbind('keydown')
|
||||
|
||||
findFile: ->
|
||||
fileFinder = FileFinder.build(urls: [@editor.buffer.url])
|
||||
window.layout.addPane(fileFinder)
|
||||
fileFinder.input.focus()
|
||||
toggleFileFinder: ->
|
||||
if @fileFinder
|
||||
@fileFinder.remove()
|
||||
@fileFinder = null
|
||||
else
|
||||
@fileFinder = FileFinder.build(urls: [@editor.buffer.url])
|
||||
window.layout.addPane(fileFinder)
|
||||
fileFinder.input.focus()
|
||||
|
||||
bindKeys: ->
|
||||
@bindKey 'meta+s', => @editor.save()
|
||||
@bindKey 'meta+w', => @close()
|
||||
@bindKey 'meta+t', => @findFile()
|
||||
@bindKey 'meta+t', => @toggleFileFinder()
|
||||
|
||||
bindMenuItems: ->
|
||||
@bindMenuItem "File > Save", "meta+s", => @editor.save()
|
||||
|
||||
Reference in New Issue
Block a user