Siag Office

Supporting Environment




This text editor is based on Xed 1.3 by Randolf Werner. It is part of Siag Office and intended as a lightweight text editor which can easily be configured away.


  • File:
    • Open Load a textfile
    • Insert Insert a textfile at current cursor position
    • Save Save actual textfile
    • Save as Save actual textfile with different name
    • Save Selection Save actual selected text
    • Print Print actual textfile
    • Print Selection Print actual selected text
    • Exit Exit xed
  • Edit:
    • Cut Cut current selection in Cut_Buffer0
    • Paste Paste Cut_Buffer0 at current cursor position
    • Shift Selection right Indent current selection 1 Tab
    • Shift Selection left UnIndent current selection 1 Tab
  • Jump:
    • Line Goto linenumber
    • Begin Goto textbeginning
    • End Goto textending
    • Selection Start Goto startposition of current selection
    • Selection End Goto endposition of current selection
  • Search:
    • Find bracket Select a textblock containing currently selected bracket an coresponding bracket. (Valid brackets are {,},[,],(,),/*,*/)
    • Check brackets Check hierachy of brackets
  • Special:
    • Options Set Wrapmode, Tabsize, Autoindent and Autofill
    • Call sed Execute an sed command
    • Help Show this page
    • About Info about xed
  • Commands:
    • Command Execute a Unix command
    • User Commands Execute a predefined Unix command
  • Pipe:
    • Pipe Execute a Unix pipe command
    • User Pipes Execute a predefined Unix pipe command


Standard Textwidget selection style is used:
  • Click left button 1 times : Set cursor position
  • Click left button 2 times : Select word
  • Click left button 3 times : Select line
  • Click left button 4 times : Select paragraph
  • Click left button 5 times : Select all
  • Press left button and drag pointer : Select area
  • Click right button : Expand current selection
  • Click middle button : Insert Cut_Buffer0 at current cursor position


Standard Textwidget key bindings are used. These are patterned after those in the EMACS text editor:
  • Ctrl-a Beginning Of Line
  • Ctrl-b Backward Character
  • Ctrl-d Delete Next Character
  • Ctrl-e End Of Line
  • Ctrl-f Forward Character
  • Ctrl-g Multiply Reset
  • Ctrl-h Delete Previous Character
  • Ctrl-j Newline And Indent
  • Ctrl-k Kill To End Of Line
  • Ctrl-l Redraw Display
  • Ctrl-m Newline
  • Ctrl-n Next Line
  • Ctrl-o Newline And Backup
  • Ctrl-p Previous Line
  • Ctrl-r Search/Replace Backward
  • Ctrl-s Search/Replace Forward
  • Ctrl-t Transpose Characters
  • Ctrl-u Multiply by 4
  • Ctrl-v Next Page
  • Ctrl-w Kill Selection
  • Ctrl-y Unkill
  • Ctrl-z Scroll One Line Up
  • Meta-b Backward Word
  • Meta-f Forward Word
  • Meta-i InsertFile
  • Meta-k Kill To End Of Paragraph
  • Meta-q Form Paragraph
  • Meta-v Previous Page
  • Meta-y Insert Current Selection
  • Meta-z Scroll One Line Down
  • Meta-d Delete Next Word
  • Meta-D Kill Word
  • Meta-h Delete Previous Word
  • Meta-H Backward Kill Word
  • Meta-< Beginning Of File
  • Meta-> End Of File
  • Meta-] Forward Paragraph
  • Meta-[ Backward Paragraph
  • Meta-Delete Delete Previous Word
  • Meta-Shift Delete Kill Previous Word
  • Meta-Backspace Delete Previous Word
  • Meta-Shift Backspace Kill Previous Word
In addition some special keybindings are used:
  • Shift Cursor up : Page up
  • Shift Cursor down : Page down
  • Shift Cursor left : Previous word
  • Shift Cursor right : Next word
  • Ctrl Cursor up : Textbeginning
  • Ctrl Cursor down : Textending
  • Ctrl Cursor left : Begin of line
  • Ctrl Cursor right : End of line
There are some default keybindings for calling menus, which overwrite some of the above defaults in the textwindow. These may be changed by changing Resources in your "~/.Xdefaults":
  • Meta-o : Open file
  • Meta-i : Insert file
  • Meta-s : Save file
  • Meta-e : Exit
  • Meta-f : Find Panel
  • Meta-l : Goto line
  • Meta-m : Toggle between Insert and Overwrite mode
Esc erases the text in a popup text field like Line, Search, Sed, ...


UNIX commands can be execute using a user pipe or command. If there is some output of a user command it is displayed in another xed. Results of a pipe command replace the current text selection. Before a command is executed, the current selection and the current text are saved in temporary files. The following variables are set and may be used in a command:
    $selection: Filename of the temporary file containing the current selection
    $tempfile : Filename of the temporary saved text file
    $filename : Filename of the edited file
    $stripped : Stripped Filename (without postfix and path) of the edited file
The user may specify his own commands by specifying RESOURCES:
Each command has the format "<Menu entry><Tab><Command string>". Here are some short examples. These examples are setup in the default resource file. You may change them for your own purpose in your ".Xdefaults" file:
	XedPlus*commands: LatexPS	latex $stripped; dvips $stripped.dvi -o $stripped.ps; ghostview $stripped.ps &\n\
	LatexDVI	latex $stripped; xdvi $stripped.dvi &\n\
	Make	make\n\
	CC	cc $stripped.c -o $stripped\n\
	NewXed	1>/dev/null 2>/dev/null xed &\n\
	Manual	mantitle=`head $selection`;man $mantitle | sed "s/.//g"
	XedPlus*pipes: Date	date
KEYBINDINGS FOR CALLING MENUS You may define keybings for calling menus by changing the XedPlus.insertranslations and XedPlus.overwritetranslations resources. For calling a menu entry you can use the Action "xedCallMenu". In oder to call a specific menu entry, you have to know the widget name of the menu entry. A complete list of the widget names can be found in the default resourse file (see below). For example the default keybinding for calling the menus are setup in the default resource file in the following manner:
	Meta<Key>i: xedCallMenu(filemenu.insert) \n \
	Meta<Key>o: xedCallMenu(filemenu.load) \n \
	Meta<Key>s: xedCallMenu(filemenu.save) \n \
	Meta<Key>e: xedCallMenu(filemenu.quit) \n \
	Meta<Key>l: xedCallMenu(jumpmenu.line) \n \
	Meta<Key>f: xedCallMenu(searchmenu.search) \n \
If you like to see the hotkey for calling a menu entry in the menu entry name, you can define you own menu entry names. This is the default setting in the default resource file:
   	XedPlus.filemenu.load.label:	Open          o
	XedPlus.filemenu.insert.label:	Insert        i
	XedPlus.filemenu.save.label:	Save          s
	XedPlus.filemenu.quit.label:	Exit          e
	XedPlus.jumpmenu.line.label:	Line          l
	XedPlus.searchmenu.search.label:	Search          f 
The widget name of a user command or pipe is defined by the menu entry name. For example the widget names of the above examples for user commands and pipes are:
So these menu entries may be bind to some hotkeys by calling:
Be carefull when choosing the name of a menu entry for user commands or pipes. You may run into troubles if you use special characters or the same name for different menu entries.


    XedPlus.EnableBackups	      : Make backupfile before saving (Boolean)
    XedPlus.BackupNameSuffix      : Suffix for backupfilename (String)
    XedPlus.PrintCommand	      : Command for printing file (String) 
    XedPlus.AutoIndent            : AutoIndent (Boolean)
    XedPlus.Tabsize               : Tabsize (Int)
    XedPlus*editWindow.autoFill   : Autofill (Boolean)
    XedPlus*editWindow.wrap       : Wrapmode (String) (never, word, line)
    XedPlus.textwidth             : Width of the textwindow in number of characters (Int)
    XedPlus.textheight	      : Height of the textwindow in number of characters (Int)
    XedPlus.MaxScrollbreak        : Specifies how many cursor events with the
                                same serial number will be ignored (Int)
    XedPlus.commands	      : User command strings (String)
    XedPlus.pipes		      : Users pipe strings (String)
    XedPlus.insertranslations     : Keybindings in Insert mode
    XedPlus.overwritetranslations : Keybindings in Overwrite mode
The default resource file is not installed, but compiled into the executable file. Global resource files are evil. You may copy it into your "~/.Xdefaults" and modify it for your own purpose.

Ulric Eriksson 1999-06-24