pull/1/head
ninabreznik 7 years ago committed by yann300
parent a5635e41f0
commit 6b39219da1
  1. 1
      src/app.js
  2. 15
      src/app/editor/editor.js

@ -297,6 +297,7 @@ function run () {
txlistener.startListening()
// ----------------- editor ----------------------------
this._components.editor = new Editor({}) // @TODO: put into editorpanel
window.EDITOR = this._components.editor
var editor = self._components.editor // shortcut for the editor
// ---------------- ContextualListener -----------------------

@ -6,6 +6,7 @@ var csjs = require('csjs-inject')
var ace = require('brace')
var Range = ace.acequire('ace/range').Range
require('brace/ext/language_tools')
require('brace/ext/searchbox')
var langTools = ace.acequire('ace/ext/language_tools')
require('./mode-solidity.js')
var styleGuide = remixLib.ui.styleGuide
@ -225,6 +226,10 @@ function Editor (opts = {}) {
editor.gotoLine(line + 1, col - 1, true)
}
this.find = function (string) {
editor.find(string)
}
// Do setup on initialisation here
editor.on('changeSession', function () {
event.trigger('sessionSwitched', [])
@ -236,7 +241,15 @@ function Editor (opts = {}) {
// Unmap ctrl-t & ctrl-f
editor.commands.bindKeys({ 'ctrl-t': null })
editor.commands.bindKeys({ 'ctrl-f': null })
// editor.commands.bindKeys({ 'ctrl-f': null })
editor.commands.addCommand({
name: "myCommand",
bindKey: { win: "Ctrl-L", mac: "Command-L" },
exec: function() {
editor.insert("Key binded!");
}
});
editor.resize(true)
}

Loading…
Cancel
Save