Sphinx‎ > ‎Documentation‎ > ‎Reference‎ > ‎


Ed is a simple full-screen text editor. It displays 13 lines of 40 characters. There is no word-wrap; the whole screen scrolls sideways if the cursor is at the end of a long line. Ed is always in insert mode.
You invoke ed at the Sphinx prompt by typing "ed" followed optionally by a filename.
Ed understand the following key commands:
  • ENTER -- Carriage return  
  • BKSP -- Delete to the left 
  • DEL -- Delete to the right
  • arrow keys -- Cursor movement  
  • HOME -- Go to start of line  
  • CTRL-HOME -- Go to start of file  
  • END -- Go to end of line  
  • CTRL-END -- Go to end of file  
  • PGUP -- Page up
  • PGDN -- Page down  
  • CTRL-O -- Open a file  
  • CTRL-S -- Save to a file
  • CTRL-Q -- Save and quit to Sphinx

The last three commands give you the opportunity to enter or edit a filename. To accept the filename, hit ENTER. To cancel the file operation, hit ESC.

Implementation notes

Ed is a Sphinx-aware program that uses Sphinx keyboard and file I/O, but it uses its own video driver. Sxtv does not provide cursor positioning and other functions that ed needs, so ed contains a modified version of the Parallax tv_text object (which in turn contains the Parallax tv object). Ed uses sxtv.Disable to turn off Sphinx video while it's running. When ed is about to transfer control back to Sphinx, it calls sxtv.Enable to turn Sphinx video back on.