betterSIS Text Editor Code Documentation

BETTERSIS.TEXTEDITOR: A simple text editor for betterSIS.

Features:

  • edit (and save) files

  • syntax highlighting

class bettersis.texteditor.SimpleTextEditor(t_file)[source]

Opens the <t_file> file with the a simple CLI text editor.

Parameters

t_file (str) – file to open with the text editor

get_statusbar_right_text()[source]

Shows the cursor position on the bottom right of the screen.

Return str

string with cursor position

get_statusbar_text()[source]

Shows control hotkeys.

If the user saved the file with Ctrl-S show “Saved to file” instead.

Return str

string with the control commands

class bettersis.texteditor.SisLexer[source]

Defines a lexer for the text editor.

lex_document(document)[source]

Reads document to parse each line.

Parameters

document – document to parse

Return function get_line

function that parses lines