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.
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.
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.
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.
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.
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.
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).
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.
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.
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.
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,...
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.
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.
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).
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.
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
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.
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.
The following commands are available:
compile, delete, file, goto, insert, help, macro, mark
, move, project, search, selection, tcl, wssel.
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:
Option | Explanation |
char | Delete next character. |
back | Delete previous character. |
word | Delete the current word. |
wordstart | Delete from the start of the word to current cursor position. |
wordend | Delete from cursor position to word end. |
prevword | Delete the previous word. |
nextword | Delete the next word. |
line | Delete the current line. |
linestart | Delet from the line start to the current cursor position. |
lineend | Delete from the current cursor position the end of line. |
Command | Explanation |
file close | Closes the active file |
file closeall | Closes all files |
file exit | Close eddi |
file insert filename | Inserts the file after the cursor as if it was typed there. |
file mode mode | Set the filemode to this mode (one of the modes in the drop down |
list in the second button bar | |
file new | Create a new file |
file next | Go to the next file (tab) |
file open filename | Open a file |
file prev | Go to the previous file (tab) |
file print | Print the file |
file reopen | Reopen the file |
file save | Save the file |
file saveall | Save all files |
file saveas | Save file as |
file write filename | Write file to... |
Command | Explanation |
goto bookmark bookmark | Goto to the specified bookmark, if no bookmark is |
specified, show up a dialog to select one from. | |
goto file filename | Goto 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 n | Goto file number n of the current project. |
goto line n | Goto specified linenumber. |
goto panel | Show up a dialog box to enter a line number in to go to. |
Command | Explanation |
insert bookmark bookmark | Insert a bookmark |
insert char | Insert a special character |
insert cutbuffer | Paste the cutted/copied text |
insert exec command | Insert the output of command If no command is |
mentioned, you are asked for it. | |
insert filter filter | Filter the selected text, eg with sort (or any other |
unix command that takes input from stdio and writes | |
output to stdout). | |
insert newline | Insert a new line. |
insert redo | Redo, the opposite of undo. |
insert tab | Insert a tab. |
insert text text | Insert the text following the command (you can insert |
multiple words by placing them between double quotes). | |
insert undo | Undo the previous action. |
Command | Explanation |
macro exec macroname | Execute the macro. |
macro load | Load macro's from disc. |
macro save | Sla een macro op. |
macro start macroname | Start recording a macro. |
macro stop | Stop recording the macro that is being recorded. |
macro wrap | Make sure the action that follows is not included in the macro. |
Command | Acts like: |
mark down | You pressed the down key |
mark fileend | You went to the end of the file |
mark filestart | You went to the start of the file |
mark left | You pressed the left arrow key |
mark lineend | You pressed the end key |
mark linestart | You pressed the home key |
mark nextpar | You went to the beginning of the next paragraph |
mark nextword | You went to the next word |
mark pagedown | You pressed PageDown |
mark pageup | You pressed PageUp |
mark prevpar | You went to the previous paragraph |
mark prevword | You went to the previous word |
mark right | You pressed the right arrow key |
mark setend | Set the end of the selection (in combination with setstart) |
mark setstart | Set the start of the selection |
mark up | You pressed the up arrow key |
Command | Explanation |
add | Add the current file to the project. |
delete | Remove the current file from the project. |
exit | Close the project. |
save | Save the project. |
saveas | Save the project as... (A dialog will be opened). |
Apart from this, you can use the commands search panel and search exit to make the search panel appear and disappear.
Command|Explanation | |
selection copy | Copy the selection. |
selection cut | Cut the selection. |
selection delete | Delete the selection. |
selection indent | Indent the selection. |
selection paste | Paste a copied or cutted text. |
selection reindent | reindent the selection. |
selection send | Send to a tcl/tk interpreter. |
You can also use wssel del to delete the selected text.
|
|
|
1In fact,
it hardly ever works.