This file contains the lion’s share of APIs and functions used to manipulate the 9ne editor. In general, function names with underscores (my_function) are APIs and can be used in extension functions. If a function has Override: true a mode can override that function when the mode is activated. For example,
var nlptr = window.editor_new_line;
window.editor_new_line = function(){
alert("ha ha I stole your new line");
nlptr();
}
Overrides the editor_new_line function (often tied to “enter”), and extends it to show an alert box.
Copyright
2006 Rohan (robr.nosp@m.ohan@gmai.nosp@m.l.com)
Summary
| This file contains the lion’s share of APIs and functions used to manipulate the 9ne editor. |
| |
| Adds a character to the current cursor position by code |
| Adds a string of text to the current cursor position |
| returns true if mark1 is before mark2 in the text |
| Loops over the divs in the editor_text_area and rebuilds the IDs of the divs (line IDs). |
| Append some text for display in the mini buffer |
| Used in key chords, append the binding to the minibuffer so 9ne knows it’s part of a chord |
| display some text in the mini buffer for one second. |
| Runs a command using the minibuffer. |
| |
| main command to add a new line to the editor. |
| clears the minibuffer text and command buffer |
| evaluates the current line as javascript instruction |
| evaluates the current region as javascript instructions |
| evaluates the current buffer as javascript instructions |
| command to insert a tab at the current position |
| deletes the character infront of the cursor. |
| jumps to the first line / column of the buffer (current file) |
| jumps to the last line / column of the buffer (current file) |
| Moves the caret back one character (does not delete). |
| jumps to the end of the current line |
| jumps to the beginning of the current line (column 0) |
| Moves the caret down one line (not add a new line). |
| |
| Move the caret to up one line used for file navigation |
| |
| Moves the caret forward one character. |
| Deletes the character behind the cursor (backspace). |
| scrolls the view to the active line so the line is within view. |
| repositions the view so the active line is in the middle of the viewable screen |
| Yank the contents of the clipboard. |
| Save the contents of the buffer |
| Gets the full contents of the buffer in plain text |
| |
| delete from the current position to the start of the line |
| kills (closes) the editor. |
| sets a mark as an anchor. |
| |
| deletes from the mark to the point where the kill region function is called, and puts the restuls on the clipboard |