overleaf/services/web/public/coffee/search/SearchManager.coffee

19 lines
435 B
CoffeeScript
Raw Normal View History

2014-02-12 05:23:40 -05:00
define [
'search/searchbox'
], (searchbox) ->
class SearchManager
constructor: (@ide) ->
@ide.editor.aceEditor.commands.addCommand
name: "find",
bindKey: win: "Ctrl-F", mac: "Command-F"
exec: (editor) ->
searchbox.Search(editor)
readOnly: true
@ide.editor.on "showCommandLine", (editor, arg) =>
if arg == "/"
searchbox.Search(editor)
@ide.editor.aceEditor.commands.removeCommand "replace"