The Eddi Project Team

The Eddi Editor - Manual

The Eddi Editor - Manual

Contents

1  Introduction
2  Basic usage
    2.1  Editing
    2.2  The File Menu - Opening and Saving Files
    2.3  Printing
    2.4  The Edit Menu - Copying, Pasting and other nice things
    2.5  Search and replace
    2.6  Goto - relocating yourself
    2.7  The button bar
3  The insert menu
4  Macros
    4.1  Recording Macros
    4.2  Executing Macros
    4.3  Saving your macrose
5  Project files
    5.1  Creating a project file
        5.1.1  Adding the file to the project
        5.1.2  Saving the project
        5.1.3  Loading a saved project
        5.1.4  Removing files from a project
6  Extentions
    6.1  Compiling
    6.2  Tcl/Tk
7  Options - configuring eddi
    7.1  File Options
        7.1.1  Auto indent
        7.1.2  Show corresponding brackets
        7.1.3  Use extended file info
        7.1.4  Show bookmarks
        7.1.5  Syntax highlighting
    7.2  Defaults
    7.3  Global Options
    7.4  Browser...
    7.5  Text...
    7.6  Printer...
    7.7  Save options
8  Help
9  Commands
    9.1  The commands
        9.1.1  compile
        9.1.2  file
        9.1.3  goto
        9.1.4  help
        9.1.5  insert
        9.1.6  macro
        9.1.7  mark
        9.1.8  move
        9.1.9  project
        9.1.10  search
        9.1.11  selection
        9.1.12  susave
        9.1.13  tcl
        9.1.14  wssel
    9.2  The rest...
Index

Abstract

This is the eddi manual, intended for eddi users.
This manual is free, you can make copy's of it and distribute it, or even change or sell it as much as you like, as long as this statement is included in the copy.

1  Introduction

Eddi is a very powerfull and easy to use editor for X. It was originally was orginally written by Holger Schanz, but is now maintained by a team of developers that can be found at http://eddi.sf.net and http://sf.net/projects/eddi.

The big advantage off eddi over other editors is that it combines power with easyness to learn and use. While there are easy to use editors for X, and there are powerfull editors like emacs and vim, most don't combine these two things. Holger fealt sad about that and decided to write his own editor, that was so good that we decided to take over now that he has dissapeared.

Among other things, eddi supports easy to use macro's, powerfull syntax highlighting, build filter acces, projects files,... This makes it the perfect editor for everyone who does want a very good editor but doesn't want to take the time to learn vim or emacs. There are even persons that used vi for about 10 years and have now taken the step to eddi.

2  Basic usage

Basically eddi is very easy to use, that's why it is so great. If you are already familiar with editor's you might probably just as well skip this section.

2.1  Editing

You can start eddi with the command eddi (or with ./eddi.tcl in the directory where eddi is located), you can add a filename as argument, this way, the file in question will be opened by default. If you mention several files, or you use an expression that represents several files (eg file?.html for file1.html, file2.html,...), all that files will be opened.

Once eddi is opened, you will see a big white space where you can type, as if it was a word processor, but without font changes and all that stuff. This is where you will be working most off the time. You also see a menu bar, a button bar, a second bar: the option bar and the tabs in which you see the text. If you open several files, they will be opened in extra tabs. You can change tabs by clicking on the tab handle (where the filename, or (Noname) if the file isn't saved yet, is). An other way to change the current tab is pressing Ctrl+PageUp or Ctrl+PageDown for respectively the next or previous file, or by using the Goto menu.

You can type text and delete it like in pratically any other program.

2.2  The File Menu - Opening and Saving Files

You can open a file with the function key F3, the menu entry File - Open or by mentioning it's name on the command line when starting eddi. When you do this, you will get a file dialog box. There you can chose the directory where your file is and see the files in that directory. On the bottom of the dialog, you can select a `filter' so that you only see certain filetypes. Notice the Show Hidden Files checkbox on the right. You can double click on a file or click on it and press ok to open it.

Open Files can be closed with F10 or the menu entry File - Close.

Saving a file can be done in tree ways: normal saving, Supersaving or Saving as...

Normal saving + Saving as...: Choose the menu entry File - Save and you will get a box like for opening a file, but this time you can enter a filename. If the file you chose already existed, you will be prompted wether or not you want to overwrite it, if you choose not to do this, you file will not be saved at all, so you will have to run save again. The difference between Normal Saving and Saving As is that when normally saving a file that has already been saved, you will no longer be asked to choose a file, but instead, eddi will use the previous filename to save, when using Save As... using it's menu entry or Ctrl+F2 you will be prompted for a filename again.

SuperSave is a special function for saving files if you don't have the necessary permissions, but know the username and password of a user that does have this. What it does is simply save the file to a temporary file and the using a combination of the unix command's xterm (for entering the password), su (for getting the right permissions) and cp (to copy) copy the file to the location where it is supposed to be. Since this method does not give the chance to eddi to control wether or not the file has actually been copied to the location where it is supposed to be you should use this funtionality with extreme caution, it is best to keep a backup copy. You can launch SuperSave with the menu entry File - SuperSave. You will get a box where you can enter the filename, you can also use the Browse button to select the file, as you would normally save, but sometimes this is not possible, for example when the file should be saved in a dir where you don't have read permissions. You can choose to save as root or to save as a normal user. Save as a normal user through root is for saving a file using the root account: eddi will launch a command that copy's the temporary file to the location using the permisions of the normal user, but it will use the root's account to launch it, this is usefull when you don't have the user's password. When you press OK, an xterm will open where you can enter the root password, or the user's password if required.

Opening new files (creating them) can be done with F4 or with File - New.

2.3  Printing

Printing a file can be done with the menu entry File - print, this will print using the settings of the options menu which will be described later.

2.4  The Edit Menu - Copying, Pasting and other nice things

In the Edit menu are several things you will use while you are editing. First off all, you have the undo entry. Clicking this (or using Ctrl+Esc) will undo the last action, if possible, most actions can be undone. The redo entry is to redo an action that has been undone.

You also find the Cut, Copy and paste actions in the edit menu. This will operate on selections, so you'll first have to learn to select text. Like in most graphical applications text can be selected using the mouse: click the left mouse button in the text, where you want to begin your selection and holding the button, move your mouse to the other end of the text you want to select. You can also select text by moving to one end of the text you want to select, press the shift key and holding the key pressed, move to the other end of the selection using the arrow keys or buttons like Home, End, PageUp,...

Unlike in most other applications you can still type text and even use the delete and backspace key's without deleting/removing your selection.

You can cut a selected text with the menu entry Edit - Cut (or Ctrl+X), this way, it is stored in a buffer (that can currently only store one selection, so everytime you cut or copy text, what is in the buffer will be removed) and removed from the text.

You can copy a selected text with the menu entry Edit - Copy (or Ctrl+C), this stores the text in the same buffer as cut, but it does not remove the text from the file.

If there is text in the buffer, it can be pasted using the menu entry Edit - Paste (or Ctrl+V), this will place the text after the current cursor position, as if it was typed by you on your keyboard.

There are more things in this menu that will be explained later.

2.5  Search and replace

Eddi has a very advanced and intelligently designed search and replace system. Unlike other graphical editors (and text processing software) it does not popup a dialog box that is always in your way, but it creates an extra `button bar' on the bottom of the editor. You can make this bar appear using the menu entry Search - Search and replace... or Ctrl+s. Once it is on your screen, you can press the red button on the right of the bar to remove it again.

The search bar contains several buttons and entry boxes. The first button with the binoculars on it is used to start a search. The second button, containing the double arrow is a switch button to select the direction in which to search: forward or backward. The next button, containing either the text Exact or Reg. Expr. is used to select wether you want to use tcl/tk regular expressions to search, or just regular text. The next button is used to set the case sensitivity, you can either make a difference between BIG and small characters or not. After that, you find the first entry. Here you can enter the text to look for. This is followed by an arrow that resembles the recycling symbol, this is used to do a search and replace, the next button is also for that purpose, but it replaces without interaction of the user. The last entry is to enter the text to replace the found text with, if you want to replace text.

Searching text is done simply by entering text in the apropriate entry (see above) and press the binoculars button or use the apropriate entry's in the search menu.

Replacing text is done with by entering the text to be replaced in the find entry and enter the replacing text in the replace entry and then press either the replace or replace all button (or use the apropriate menu entrys).

2.6  Goto - relocating yourself

You can use the goto menu to go to a given line number (Goto Line... or Ctrl + l) or to a bookmark, which will be explained later. You can also use it to go to a certain file (that is already opened) but this has already been explained in the beginning of this manual.

2.7  The button bar

Under the Menu bar, there is a button bar containing some buttons, since most of this buttons are used for basic actions, I will expain them now.

The first 4 buttons are used for file actions: Create a new file, Open a file, save the file and print the file.

The next two buttons are for moving to the next and previous file.

Next, you have the buttons for respectively cut, copy and paste.

These buttons are followed by the undo and redo buttons.

Off course, you'll also want to search and replace, so you have 3 buttons for searching: Open the search bar (or bring the cursor to it if it is open already), Search backward and Search forward.

The other buttons are for macro's and project files, this will be explained further in the manual.

3  The insert menu

The insert menu contains some command's to insert text and bookmarks using `special techniques'.

The first menu entry: character (or Ctrl + Shift + c) offers you the chance to insert a special character, eg an é or even more complicated things, mind that it takes a hell lot of time to make this window appear (atleast on my computer), so please be patient when using this.

Bookmarks can be inserted using the Insert - Bookmark entry (or Ctrl + h + `bookmark name - one character'). If you insert a bookmark with the menu entry, you can enter a meaningful name, in stead of just one character. Bookmarks can be made visible or invisible using the 4th switchbutton in the options bar, you can also use the menu entry Options - File - Show bookmarks.

Once a bookmark is created, you can move to it using the menu entry Goto - Bookmark (or if the bookmark has a name of one character, using Ctrl + g + character).

If you want to save bookmarks, you should put on the extended file information (described further in this manual).

The Insert - File menu (Ctrl + F3 if your not in kde) will insert a file as if it's contents was typed by you on the keyboard.

Insert - Execute... (Ctrl + Shift + x + Return) will offer you an entry widget where you can enter a command, the output of this command will be inserted in the text, as if you typed it. Be carefull with this, this will cause problems with interactive programs.

Insert - ...Date inserts the current date. It is take from the unix command date.

The following entry's are for inserting filename related things. The file root name is the name without the extention.

4  Macros

Macros are automatic actions, executed on the request of the user. Eddi supports macros. You can create macros in a very easy way, by simply recording them: eddi records all you actions. Later, when running the macro, these actions will be executed again. Macros are very usefull to do the same action over and over again, on several files or on different lines, paragraphs,...

4.1  Recording Macros

Recording macros is really easy just go to the macro menu and choose Start Recording..., you will get a dialog box where you can enter the name of the macro you want to record. Or you could also do Ctrl + F5 + key (where the key is the name of the macro, 1 character). Now you can do things, all commands will be saved into the macro.

When you want to execute a command that should not be in the macro, just press F6 (or Macro - Wrap Next Command) and then execute the command. Mind almost everything is a command, even typing a character, this makes macros very powerfull.

Once you've finished recording your macro, you can choose the menu entry Macro - Stop Recording (or Ctrl + F6). Now the macro is recorded and ready to be used.

4.2  Executing Macros

Executing Macros is even easier than recording them. Just locate the cursor where you want to execute the macro and then choose the menu option Macro - Execute... and choose the apropriate macro.

4.3  Saving your macrose

Off course some macros are used very often, in that case, it might be usefull to save macros. Once again, this is very easy with eddi. Just choose the menu option Macro - Save macros (or Ctrl + Shift + F5) and they are saved (usually in ~/.eddi/macros).

You can also load the macros using the corresponding menu entry, but this is done automatically when starting eddi, so it's rarely usefull (in fact, only when you change the file in question manually, either by editing it or by overwriting it with another macro file).

5  Project files

When developpers work on programs they usually need to code on several files at the same time. Because it would be stupid to have to open every file by hand every time the concept of project files was invented. A project file is just a file containing a list of files and some settings for the editor. When you use project files you can just load a project file and automatticaly all the files that belong to the project are opened, saving a lot of time.

5.1  Creating a project file

5.1.1  Adding the file to the project

Eddi can have only one project opened at a time, when you start the editor a new empty (and unsaved) project is automatically started. Now, to add files to the project, just open them and then, while they are active (you see the text in the file you want to add, not a different file), use the menu entry Project - Add to project and it's added, do this for all the files in the project.

5.1.2  Saving the project

Once you have created a project, you'll probably want to save it, so that you can actually use it, just go to the menu entry Project - Save and you can save it as if it were a regular text file (with a .prj extention). If you would ever want to save it under another name later you can do that using the menu entry Project - Save as .

5.1.3  Loading a saved project

Now, when you start eddi again, you'll want to take advantage of the project file. Just choose Project - Open and select your project file and all the files from the project will be in the Project menu (at the bottom) and opened, mind that if you close a file, it is still in the project and you can open it again from the Project menu.

5.1.4  Removing files from a project

As projects evolve, files may be added and removed, you can add files as if you were creating a new project. To remove a file from a project, just use the entry Project - Remove from project. Mind that you have to save the project every time you change it!

6  Extentions

Eddi includes a set of extentions, that give it extra capabilities that are not really standard editor functions but are very usefull when editing in many cases. Up to version 1.0.x this number of extentions is fairly small, but from 1.1.0 and onwards, this number will vastly increase through a plugin system.

6.1  Compiling

Using the menu entry Extentions - Compile - Make (or press F9), you can make eddi run make, but be carefull, you have to run the eddi command in the directory where the toplevel Makefile is, otherwise, this won't work.

When you run make, you will see a windows with the output of the command. Eddi will also try to find the errors in the output of make if there are any, and try to locate them in the sources, but this does not always work.1

6.2  Tcl/Tk

Eddi is written in Tcl/Tk and therefore can easily offer some of the capabilities of this impressive language to the user. If you select some text, preferably tcl/tk commands, you can choose the menu entry Extentions - Tcl/Tk - Send selection (or press Ctrl+Shift+y) and then select a runnig tcl/tk interpreter (normally, the eddi interpreter will always be there, if you have more interpreters running, they will also be there). Once you have selected the interpreter, you will have to reselect the text, simply because it has changed (it is now the name of the interpreter). Then you can press Ok to send the command(s). We now that this selection thing is a bit weird and it will be changed in future.

7  Options - configuring eddi

Eddi includes a number of things that can be configured. These options are accesible through the options menu.

7.1  File Options

For every file you use, you can set a number of options, these are all available through the Options - File menu. They can also be found on the second buttonbar.

7.1.1  Auto indent

The option auto indent can be used to automatically indent your source code. Most people will like this to be on.

7.1.2  Show corresponding brackets

This is an option to make eddi highlight the bracket corresponding to the one you are typing, this is very handy to check that brackets are typed in correct pares when typing complicated structures. It will normally be on.

7.1.3  Use extended file info

This is an option that makes all the file options be saved, they are appended to the end of the file as comments.

For the supported languages (the once for which syntax highlighting is available), the correct way of commenting is automatically chosen. For other languages, the # sign is used.

7.1.4  Show bookmarks

This makes eddi show the bookmark names in the text, if this is on, you will see what I mean, switching this on and off while editing gives a pretty strange effect, there's not much we can do about that in the current implementation, sorry.

7.1.5  Syntax highlighting

All the other options in this menu are languages, just select the one you use and you will have syntax highlighting.

7.2  Defaults

Apart from the syntax highlighting, all the options from the Options - File menu are also available in Options - Default. If you set them here, they are used as default values for all the files.

7.3  Global Options

There are also a number of global options. These options are used for eddi. The option to filter print with a2ps is used to print files with the command a2ps rather then directly through lpr. All the other options should be self explainory.

7.4  Browser...

The menu entry Options - Browser... is used to select a html browser. This will be used eg. for viewing the documentation.

7.5  Text...

This is used to add and remove tags that can be inserted in text documents. These tags can be used to configure what colors are used for highlighting and selection. You can also use it to format text, but this formatting can only be seen in eddi and is saved as extented file information, so make sure this option is on.

7.6  Printer...

This menu entry is used to select what printer you want to use for printing.

7.7  Save options

This is the menu entry you have to use to save the options. Mind that you have to run this options every time you have changed the options and you want them to be used after having restarted eddi. Options are not automatically saved when closing eddi.

8  Help

The help menu contains entry's to open the manual, the license (GPL) and a beautiful about dialog.

9  Commands

There are a set of commands wich covers most of the available actions in Eddi. Command can be entered in the information field at the buttom of the editor. They can also be used by other Tcl/Tk applications to execute commands in Eddi, i.e. load files, move to a row, find a text, etc.

Commands are normally used to evaluate the actions in the menus and buttons. Moreover, commands can also be send to eddi using the send command in tcl/tk, for more information on the subject, have a look at the eddi.tcl in your source tree at the proc startup_wrapper (if you don't understand what I mean, don't worry, this is meant for tcl/tk developpers and they will normally understand it.

9.1  The commands

The syntax for commands is:
command option [argument]

The following commands are available:
compile, delete, file, goto, insert, help, macro, mark , move, project, search, selection, tcl, wssel.

9.1.1  compile

With the compile command you can run make on a makefile in the current files directory. The compile command takes no arguments. The following options are available:
make, delerrors, acterror, preverror, nexterror, delete < option > .

The delete comand deletes characters, words, part of a line or the whole line. The delete command takes no arguments. Following options are available:

OptionExplanation
charDelete next character.
backDelete previous character.
wordDelete the current word.
wordstartDelete from the start of the word to current cursor position.
wordendDelete from cursor position to word end.
prevwordDelete the previous word.
nextwordDelete the next word.
lineDelete the current line.
linestartDelet from the line start to the current cursor position.
lineendDelete from the current cursor position the end of line.

9.1.2  file

This command is used for actions on the current file and for changing the active file (tab), for opening and creating files,...

CommandExplanation
file closeCloses the active file
file closeallCloses all files
file exitClose eddi
file insert filenameInserts the file after the cursor as if it was typed there.
file mode modeSet the filemode to this mode (one of the modes in the drop down
list in the second button bar
file newCreate a new file
file nextGo to the next file (tab)
file open filenameOpen a file
file prevGo to the previous file (tab)
file printPrint the file
file reopenReopen the file
file saveSave the file
file saveallSave all files
file saveasSave file as
file write filenameWrite file to...

9.1.3  goto

With the goto command, you can move around in the file:

CommandExplanation
goto bookmark bookmarkGoto to the specified bookmark, if no bookmark is
specified, show up a dialog to select one from.
goto file filenameGoto the specified file, if none is open with that
name, create it. If no filename is mentioned, show up
a dialog box for it.
goto fileno nGoto file number n of the current project.
goto line nGoto specified linenumber.
goto panelShow up a dialog box to enter a line number in to go to.

9.1.4  help

The help command is used to get help: help document shows this document, help copyright shows the GPL.

9.1.5  insert

The insert command is used to insert things.

CommandExplanation
insert bookmark bookmarkInsert a bookmark
insert charInsert a special character
insert cutbufferPaste the cutted/copied text
insert exec commandInsert the output of command If no command is
mentioned, you are asked for it.
insert filter filterFilter the selected text, eg with sort (or any other
unix command that takes input from stdio and writes
output to stdout).
insert newlineInsert a new line.
insert redoRedo, the opposite of undo.
insert tabInsert a tab.
insert text textInsert the text following the command (you can insert
multiple words by placing them between double quotes).
insert undoUndo the previous action.

9.1.6  macro

This command can be used to record, play, load and save commands.

CommandExplanation
macro exec macronameExecute the macro.
macro loadLoad macro's from disc.
macro saveSla een macro op.
macro start macronameStart recording a macro.
macro stopStop recording the macro that is being recorded.
macro wrapMake sure the action that follows is not included in the macro.

9.1.7  mark

This can be used to select text via commands. These commands operate as if shift was pressed and:

CommandActs like:
mark downYou pressed the down key
mark fileendYou went to the end of the file
mark filestartYou went to the start of the file
mark leftYou pressed the left arrow key
mark lineendYou pressed the end key
mark linestartYou pressed the home key
mark nextparYou went to the beginning of the next paragraph
mark nextwordYou went to the next word
mark pagedownYou pressed PageDown
mark pageupYou pressed PageUp
mark prevparYou went to the previous paragraph
mark prevwordYou went to the previous word
mark rightYou pressed the right arrow key
mark setendSet the end of the selection (in combination with setstart)
mark setstartSet the start of the selection
mark upYou pressed the up arrow key

9.1.8  move

This moves around in the file, it takes the same argumens as the mark command, except for setend end setstart wich are obviously not available for move.

9.1.9  project

The project command is used to handle project files

CommandExplanation
addAdd the current file to the project.
deleteRemove the current file from the project.
exitClose the project.
saveSave the project.
saveasSave the project as... (A dialog will be opened).

9.1.10  search

This command is used for searching text in the file, you are strongly adviced to use the apropriate searchbar instead of this command, since they are much easier to use. The search command mainly exists for internal usage. If you want to use the command anyway, read the sourcode, in the file command.tcl look for the proc command:search and that should explain most of the things you need.

Apart from this, you can use the commands search panel and search exit to make the search panel appear and disappear.

9.1.11  selection

This command is used for handling the selected text:

Command|Explanation
selection copyCopy the selection.
selection cutCut the selection.
selection deleteDelete the selection.
selection indentIndent the selection.
selection pastePaste a copied or cutted text.
selection reindentreindent the selection.
selection sendSend to a tcl/tk interpreter.

9.1.12  susave

This runs supersave, there are no arguments.

9.1.13  tcl

Sends the arguments to the tcl interpreter used by eddi, as if it was tcl code in the edditor, watch out with this!

9.1.14  wssel

This is a special selection mode, this selection will be showed in green by default. You place the cursor at the beginning of your wssel array, type wssel begin, go to the end of the array, type wssel end. And then you can move around in the file, and if you are at the place where you want to do something, do: wssel move to move the selection to that place or wssel copy to copy it there.

You can also use wssel del to delete the selected text.

9.2  The rest...

Some commands were left out of this manual, that's mainly because they are not to be used by regular users. However, if you want to code on eddi, they might be of interest to you, in such case, you can have a look at the command.tcl file to find them. The commands left out are part of the selection command or can be seen at the end of this file in the command proc.

Index (showing section)

./eddi.tcl, 2.1

Add to project, 5.1
Auto indent, 7.1

Basic usage, 2.0
bookmarks, 3.0
Browser..., 7.4
button, 2.7

close, 2.2
Commands, 9.0
commands, 3.0
Compile, 6.1
Configuring eddi, 7.0
copy, 2.4
cut, 2.4

Default options, 7.2

Editing, 2.1
emacs, 1.0
Executing macros, 4.2
extended file information, 3.0
Extentions, 6.0
File options, 7.1
file root name, 3.0

Global Options, 7.3
goto, 2.6
goto bookmarks, 3.0

insert bookmarks, 3.0
insert date, 3.0
insert execute, 3.0
insert file, 3.0
insert filename, 3.0
insert menu, 3.0
Introduction, 1.0

Load project, 5.1

Macros, 4.0

new files, 2.2

open, 2.2
Open project, 5.1
Options, 7.0
paste, 2.4
print, 2.3
Printer, 7.6
Project files, 5.0

Recording macros, 4.1
redo, 2.4
replace, 2.5
replacing text, 2.5
root name, 3.0

save, 2.2
save bookmarks, 3.0
Save Options, 7.7
Save project, 5.1
Saving macros, 4.3
search, 2.5
searching text, 2.5
selecting, 2.4
Send Selection, 6.2
Show bookmarks, 7.1
Show corresponding brackets, 7.1
special character, 3.0
supersave, 2.2
Tcl/Tk, 6.2

undo, 2.4
Use extended file info, 7.1

vim, 1.0

Wrap Next Command, 4.1


Footnotes:

1In fact, it hardly ever works.


File translated from TEX by TTH, version 3.04.
On 13 Oct 2002, 18:34.