Inside my Javascript file I have the following lines of code:
editor.focus(); // To focus the ace editor
var n = editor.getSession().getValue().split("\n").length - 2;
editor.gotoLine(n);
This focuses the ACE editor, moves to the last line, and goes up two lines. When it goes up those two lines it also moves the cursor to the front of that line. Simulating someone pressing the Home key.
Q: How do I move the cursor to the end of the line? Or simulate the End Key?