Last active
December 31, 2015 10:39
-
-
Save thomaswilburn/7974814 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[...] | |
var loadEmmet = true; | |
//one-time startup | |
var init = function() { | |
aceConfig.themes.forEach(function(theme) { | |
var option = document.createElement("option"); | |
option.innerHTML = theme.label; | |
option.setAttribute("value", theme.name); | |
themes.append(option); | |
}); | |
if(loadEmmet) { | |
//we need ace.lib.net to call loadScript, we can't just require Emmet and ask it to load itself | |
//remember that ace.require is basically a sync version of RequireJS. | |
ace.require("ace/lib/net").loadScript("js/ace/ext-emmet.js", function() { | |
editor.session.setMode("ace/mode/html"); | |
editor.setOption("enableEmmet", true); | |
}); | |
} | |
if (userConfig.emulateVim) { | |
ace.require("ace/lib/net").loadScript("js/ace/keybinding-vim.js", function() { | |
editor.setKeyboardHandler(ace.require("ace/keyboard/vim").handler); | |
}); | |
} | |
reset(); | |
}; | |
[...] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment