Add emmet functionality to html views

This commit is contained in:
terakilobyte
2015-06-06 20:10:47 -04:00
parent b210d7226c
commit e5a8c27e07
2 changed files with 10 additions and 1 deletions

View File

@@ -16,6 +16,14 @@ var editor = CodeMirror.fromTextArea(document.getElementById("codeEditor"), {
onKeyEvent: doLinting
});
var defaultKeymap = {
'Cmd-E': 'emmet.expand_abbreviation',
'Tab': 'emmet.expand_abbreviation_with_tab',
'Enter': 'emmet.insert_formatted_line_break_only'
};
emmetCodeMirror(editor, defaultKeymap);
// Hijack tab key to insert two spaces instead
editor.setOption("extraKeys", {