mirror of
https://github.com/overleaf/overleaf.git
synced 2024-10-31 21:21:03 -04:00
19 lines
435 B
CoffeeScript
19 lines
435 B
CoffeeScript
|
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"
|
||
|
|