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:
Nathan Sobo
2012-06-28 11:35:30 -06:00
parent 3cce8f9afd
commit ed48622a3a
6 changed files with 48 additions and 48 deletions

View File

@@ -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'

View 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'

View File

@@ -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'