mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Rename FileFinder to FuzzyFinder, which will make more sense when we can also use it to fuzzy-find on open buffers
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
window.keymap.bindKeys '*'
|
||||
'meta-t': 'file-finder:toggle'
|
||||
|
||||
window.keymap.bindKeys ".file-finder .editor",
|
||||
'enter': 'file-finder:select-file',
|
||||
'escape': 'file-finder:cancel'
|
||||
6
src/app/keymaps/fuzzy-finder.coffee
Normal file
6
src/app/keymaps/fuzzy-finder.coffee
Normal file
@@ -0,0 +1,6 @@
|
||||
window.keymap.bindKeys '*'
|
||||
'meta-t': 'fuzzy-finder:toggle'
|
||||
|
||||
window.keymap.bindKeys ".fuzzy-finder .editor",
|
||||
'enter': 'fuzzy-finder:select-file',
|
||||
'escape': 'fuzzy-finder:cancel'
|
||||
@@ -4,12 +4,12 @@ fuzzyFilter = require 'fuzzy-filter'
|
||||
Editor = require 'editor'
|
||||
|
||||
module.exports =
|
||||
class FileFinder extends View
|
||||
class FuzzyFinder extends View
|
||||
@activate: (rootView) ->
|
||||
@instance = new FileFinder(rootView)
|
||||
@instance = new FuzzyFinder(rootView)
|
||||
|
||||
@content: ->
|
||||
@div class: 'file-finder', =>
|
||||
@div class: 'fuzzy-finder', =>
|
||||
@ol outlet: 'pathList'
|
||||
@subview 'miniEditor', new Editor(mini: true)
|
||||
|
||||
@@ -17,15 +17,15 @@ class FileFinder extends View
|
||||
maxResults: null
|
||||
|
||||
initialize: (@rootView) ->
|
||||
requireStylesheet 'file-finder.css'
|
||||
requireStylesheet 'fuzzy-finder.css'
|
||||
@maxResults = 10
|
||||
|
||||
@rootView.on 'file-finder:toggle', => @toggle()
|
||||
@rootView.on 'fuzzy-finder:toggle', => @toggle()
|
||||
|
||||
@on 'file-finder:cancel', => @detach()
|
||||
@on 'fuzzy-finder:cancel', => @detach()
|
||||
@on 'move-up', => @moveUp()
|
||||
@on 'move-down', => @moveDown()
|
||||
@on 'file-finder:select-file', => @select()
|
||||
@on 'fuzzy-finder:select-file', => @select()
|
||||
|
||||
@miniEditor.buffer.on 'change', => @populatePathList() if @hasParent()
|
||||
@miniEditor.off 'move-up move-down'
|
||||
Reference in New Issue
Block a user