marijnh/CodeMirror2 — Issue #430: Tab in the middle of a line
Author: SeBuDesign
Created: 2012-03-07 11:32:00+00:00
State: open

Hi,

when i press tab it will move the whole line by placing a tab at the biginning of the line. I tried to set tabMode but it didn't make a difference.

The following code is the code that u use to configure the codemirror editor:

editor = CodeMirror.fromTextArea(document.getElementById("input_content"), {
mode: "smarty",
lineNumbers: true,
lineWrapping: false,
electricChars: false,
indentUnit: 4,
indentWithTabs: true,
extraKeys: {
"Ctrl-Alt-Space": function() {
fullscreen();
},
"Esc": function() {
fullscreen();
}
},
onCursorActivity: function() {
editor.setLineClass(hlLine, null);
hlLine = editor.setLineClass(editor.getCursor().line, "activeline");
}
});

The querstion is: Is it possible to get a tab where your curser is at that moment