The best way to learn the editor is to use it. ZionEdit is designed to be inituitive so you don't have to spend a lot of time learning it. The editor likes to get out of your way, but be close at hand when you need it's powerful features. Simply right click and you'll get the powerful context menu (or pop-up) with most editor commands right at hand.
Since ZionEdit starts up with half screen width, it is perfect for opening up
two ZionEdit windows side-by-side. Here's how to set that up.
Drag a shortcut of zion.exe to the Quick lauch bar, twice. Right-Click on the leftmost icon and select "Properties". In the "Target" field append " -L" . (There is a space before the -L). Example: D:\Apps\Zion\zion.exe -L Click OK. Do the same for the rightmost icon, but this time append " -R".
Found an issue in Windows: When the path name is includes spaces the whole path is quoted. This causes Windows to not recognize command-line arguments separate from the executeable name and will not allow the command line args. Therefore it is best to use a simple program directory name like Apps.
Hot key combinations are listed in the menus. Take a look at them before you click. Hot keys are the fastest way to activate a menu action. It's worth learning them.
Ctrl+Shift+[key] has generally been reserved for the Mode (i.e. Computer Language mode) specific menus.
For example: Ctrl+Shift+M will create a comment all modes except Plain Text.
Other Notable Hot Keys:
Home – On the first press, the Home key will take you to the first non-whitespace char. on the line. On the second press, it will take you to the beginning of the line.
Ctrl+D quickly duplicates the current line if there is no selection. If there are a number of lines selected, then that block will be duplicated – very convenient!
Vertical Selection – Pressing the ALT key BEFORE the start of a drag (left mouse button) will activate vertical selection mode.
Ctrl+ (Numpad)+ , (Numpad)- – Zooms In and Zooms Out respectively. If you get carried away with zooming and forget where "normal" is then press Ctrl+ Numpad /.
A default startup Zoom Level can be set in the Global Options tab of the Settings Dialog.
F11 – Toggles Full Screen
F12 – toggles all AutoCompletion and Call Tip functions at once. This is great if there is a particular place where these features get annoying.
For all find functions, if a string was previously selected, that string will become the new find string.
With a string selected, pressing F2, F3 and F4 will immediately find the first occurence if one exits.
F3 – Find the next occurence in the current file ( Will wrap ).
F4 – Find the previous occurence in the current file (Will not wrap).
F2 – Find all occurences in the current file. The search can be "tweaked" from the Find All Results dialog by changing the text in the text field at the top and pressing Enter in the text field, or by clicking on a "Find Flag"
FindAll also has a handy replace mode available. Double click an occurence in the upper listbox to replace it with a string entered in the replacement field. If you have made other changes to the file since the appearance of the FindAll Results dialog, you should first refresh the list by pressing enter in the upper text entry field (ie. the "find" field).
Also, it is a good idea to single-click to verify the highlighted string is what you want, before the double click to replace.
For convenience, all strings that are searched for are saved in that window.
Each time a new string is saved that "Find String" is propagated to other open windows. The entire history is not sent, so as to reduce clutter. Ditto for replace.
The find history is available from all Find Dialogs.
The button labeled F<=>R in the Find/Replace Dialog (Ctrl+R), is a synchronize button. It synchronizes find and replace histories within the local window.
F6 – Find in All Files is perhaps the most powerful feature of ZionEdit.
Find In All Files will search for a string in all files of known extension starting from a specified directory and recursing downwards through the directory tree.You can preselect a string to preload the dialog. The list of known extensions is specified in Options | Settings | Ext. Map (Tab).
A powerful Global replace feature is available from the Find in All Files results dialog. Options should be self-explanatory, but noteable: Tweak on flags will give you the option of making fine adjustments on the search before the replace. From the global replace feature, we can replace ALL matching occurrences in a particular file.
If you desire finer control to pick and choose which occurences to replace [safer!], click on a file in the Find in All Files dialog which will open up a FindAll Results dialog. Remember that changes in a global replace cannot be undo'd and so may not be easy to reverse because the file is saved and closed immediately after changes are made.
If all these options seem confusing, remember that you will learn them as you use them. They will be there when you are ready to do some powerful editing.
What is Preserve Replaced Case anyway?
Preserve Replaced Case tries to maintain the case of the string about to be replaced – that is, it temporarily changes the case of the replacement string to match what is being replaced.
The alogrithm makes a decision on case based only on a few conditions.
In the string to be replaced,
Easy! Right Click on the element on the screen who's color you want to change. Then go to town tweaking styles.
(Please see the local help file for further info due to limitations of the markdown system here.)
To place a pair of tags around a string or block just select it first then choose a tag from the HTML menu. The majority should work like that including anchors.
You can turn off "Tag Auto Complete" from the HTML menu (when in HTML mode) by unchecking the menu item. This change will be made persistent, so the HTML window must have a Style Lock. (See the IPC section).
You can bypass Tag Autocomplete for the tag you are about to close by pressing Ctrl+Shift+> before pressing the final Shift+>.
Ctrl+K will skip the current position to just past the next >
Ctrl+Shift+K will skip to the left, in front of the next <
Ctrl+Enter will give a <BR>, but if you are typing a lot of formatted sentences, you may want to turn on "Auto <BR>". You don't want to leave it on for too long as it could get annoying.
By default Autocomplete is turned on. It will automatically try to complete a word from the internal list of language keywords plus any user keywords/functions.
Autocomplete settings can be changed under Settings | Global Options.
If Autocomplete is turned off you can still manually complete a word by pressing Ctrl-J.
Autocomplete can also be toggled off with all other completion and call tip functions with F-12
ZionEdit will parse standard Scintilla type call tip files, but in true ZionEdit style adds a few nifty extensions of its own.
The simplest syntax to parse is the standard C like function call:
MyFunction( int a, int b ) Does something with 'a' and 'b'
There are a few things to note here:
The function declaration is listed without the return type. (Return type can be listed in the description)
The first ')' will indicate the end of the function and the beginning of the description.
Descriptions can include basic pre-HTML4.0 tags, definitely no styles or XHTML allowed. See the supported tags (compliments of wxHTML) below:
Since it's HTML based, descriptions should not include HTML chars such as '>' and '<'. Rather use ">" and "<" respectively.
ZionEdit object completion features are very, very, very sweet.
One is a function declaration, and the other a property or object member declaration. Zion will automatically list both when "document." is typed! Sweet, but not very sweet? Check this out: Zion allows you to list object members in short cut form like this:
Getting impressed? There's more:
The first line will supply all the standard html color names via the pseudo word "htmlColors". Now instead of expanding out all 147 colors for all color type attributes, we create ALIASES to the one attribute "color" and now whenever you type lets say:
document.alinkColor = cornflowerblue
it was typed all with autocomplete help!
There is a CAUTION: For multi-level functions and properties list the grandparent only once to establish the relationship, but don't list it again or some methods/properties may not be mapped.
Example: In "js.api"
document.getElementById( string id ) establishes
getElementById's relationship to document.
will cause previous definitions of
attachEvent() to be lost.
Don't do this:
document.getElementById( string id ) Return the element object with id "id"
So here's the rule again:
ONCE A RELATION TO A GRANDPARENT OBJ IS ESTABLISHED,
DO NOT LIST THAT GRANDPARENT AGAIN IN ANY OF THE CHILD OBJ DEFINITIONS.
One way to learn how Call Tips / Auto Complete are done is by looking at the example API files provided. My listings are not meant to be exhaustive, though a few (like html tags) maybe, but are meant to cover all the different types of Call Tips / AutoComplete supported by ZionEdit.
Another useful exercise is to choose Help | Dump CallTip Structs from Zion's menu. This will dump all the data hashes used for Call Tips and AutoComplete to the current edit window. When compared with your api file, you can see how (and if :-) your intended Call Tip got parsed and stored.
Consider the following declaration:
**wxString.Empty()** RETURN: void. Makes the string empty...
An object is never actually used in the form of it's class declaration, but rather like this:
`wxString str = "Blah, blah";
The editor cannot automatically know that
str corresponds to
wxString – not without scanning the file and performing some kind of interpretation. That is what Microsoft does in its Visual Studio IDE. Well God bless them. They also come up with a 50 odd Meg calltip file, and the constant scanning is quite distracting. I guess it has it's place if you have some deep debugging to do.
Anyway, ZionEdit being a general purpose, "light" editor will never do that. We will rely on a pre-established alias.
!wxString.str,myStr,token wxString.Empty() Blah blah description wxString.Append() description
It's not perfect, but is a reasonable solution. And it works!
Again, see the included API files for examples. Don't worry if you mess them up, the latest API files are always available at zionedit.com | Download Tab.
One window (usually the first one you start up) acts as a server and all other windows are clients.
Clients must contact the server before making most permanent changes. The server coordinates requests to write to zion.ini, so that there are no multiple unexpected updates and that all other client windows know about updates when they do happen.
If your server tells you that "Another window has the lock for style changes" then look for the window with the process id given and save settings in that window. If that still doesn't work, click Help | IPC Status and see if there are any windows showing to have "Style Lock". Close them and try again. If all else fails, close all windows and reopen as needed.
The number in the title-bar is the process id of the current window and is used as an identifier in IPC.
Just f.y.i., if the server window is closed, a reconvergence takes place and another window is selected to be server. If you'd like to know which one became server check Help | IPC Status in any window.
It's true. ZionEdit was started after working through the David Beech Tutorial - no longer available in September 2005.
I was planning on learning Python, then thought I needed a good GUI Toolkit for that, so I started to investigate wxPython.
The examples I saw seemed a bit cumbersome with the DOS window and all – and then the thought of the GUI being interpreted! Uhhh! So I thought, how hard would it be to learn wxWidgets straight up.
I had toyed a little with the Fox Toolkit under Linux and was hoping one day to really get into it deep. It just didn't happen. When I started to check out David's tutorial, I was in for a BIG SURPRISE! WxWidgets was easier to learn than the Fox Toolkit and the documentation, oh yes, the documentation is WORLD CLASS!!!. WxWidgets superior documentation was one big reason I was able to progress this fast and this deep into wxWidgets. Also after a year and half of working with wxWidgets I found only one minor bug (in a listbox refresh, ver. 2.6.1) that was fixed in version 2.6.3.
Reality Check: Indeed there is a LOT of hype out there concerning scripting languages and other esoteric tools, but C++ is one powerful, beautiful and simple language that will be around for a long, long, time! Take it from a guy who never really did anything more than a paragraph of C++ code before Sept. 2005!
Why the Name Zion? Okay, I am not a Jew, just a Christian. The name Zion was chosen for it's biblical roots:
"By the rivers of Babylon, there we sat down, yea, we wept, when we remembered Zion." — Psalms 137:1
Zion is a place of refreshing, a place we long to get back to, a place where God is.
|**_ filename _**||Opens the specified file|
|**-n**_nnn_||Opens the specified file to **line number** _nnn_|
|**-q**_nnn_||Opens the specified file to **row number** _nnn_. Must be specified in conjuction with the **-n** option|
|**-t**||Opens a window in the **top** half of the screen|
|**-b**||Opens a window in the **bottom** half|
|**-l**||Opens a window in the **left** half|
|**-r**||Opens a window in the **right** half|
|**-tl**||Opens a window **top left** of the screen|
|**-tr**||Opens a window **top right**|
|**-bl**||Opens a window **bottom left**|
|**-br**||Opens a window **bottom right**|
|**-c**||Opens a window **centered** on the screen|
|**-m**||Opens a **maximized** window|
|**-x**_nnn_||Sets window position _nnn_ pixels from left|
|**-y**_nnn_||Sets window position _nnn_ pixels from top|
|**-w**_nnn_||Sets window width|
|**-h**_nnn_||Sets window height|
|**-p**_string_||Must be combined with the -f option. Replace all occurences specified in the find string with this string. Save and automatically close the window. If the file is already opened writeable in another window, this will popup a dialog then exit. This is used by the Global Replace feature of Find In All Files|
|**-f**_string_||Find all occurences of the string on startup|
|**-g**_nnn_||Decimal search flag to use with the above search
|**-i**_pathname_||Sets the startup folder/dir for zion.ini - ZionEdit's startup file|
List of wxHTML tags supported by API Description A NAME=[string] HREF=[url] TARGET=[target window spec] ADDRESS AREA SHAPE=POLY SHAPE=CIRCLE SHAPE=RECT COORDS=[coords] HREF=[url] B BIG BLOCKQUOTE BODY TEXT=[color] LINK=[color] BGCOLOR=[color] BR ALIGN=[alignment] CENTER CITE CODE DD DIV ALIGN=[alignment] DL DT EM FONT COLOR=[color] SIZE=[fontsize] FACE=[comma-separated list of facenames] HR ALIGN=[alignment] SIZE=[pixels] WIDTH=[percent|pixels] NOSHADE H1 H2 H3 H4 H5 H6 I IMG SRC=[url] WIDTH=[pixels] HEIGHT=[pixels] ALIGN=TEXTTOP ALIGN=CENTER ALIGN=ABSCENTER ALIGN=BOTTOM USEMAP=[url] KBD LI MAP NAME=[string] META HTTP-EQUIV="Content-Type" CONTENT=[string] OL P ALIGN=[alignment] PRE SAMP SMALL STRIKE STRONG SUB SUP TABLE ALIGN=[alignment] WIDTH=[percent|pixels] BORDER=[pixels] VALIGN=[v_alignment] BGCOLOR=[color] CELLSPACING=[pixels] CELLPADDING=[pixels] TD ALIGN=[alignment] VALIGN=[v_alignment] BGCOLOR=[color] WIDTH=[percent|pixels] COLSPAN=[pixels] ROWSPAN=[pixels] NOWRAP TH ALIGN=[alignment] VALIGN=[v_alignment] BGCOLOR=[color] WIDTH=[percent|pixels] COLSPAN=[pixels] ROWSPAN=[pixels] TITLE TR ALIGN=[alignment] VALIGN=[v_alignment] BGCOLOR=[color] TT U UL
Created with ZionEdit