Menu

Home

zionmaster

An intuitive, very configurable, uncluttered programmer's editor based on the awesome Scintilla component & wxWidgets supporting Ruby, Java, C#, HTML(JavaScript,PHP etc), SQL, CSS, Python, Perl, Lisp, Fortran, Assembly, Batch, Makefile --for Win32

General Help

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.

  • The most frequently used functions are available with just a right-click.
  • Watch the **statusbar** for: **Menu hints**/Explanations, Line number of last find, plus various other status and diagnostic messages ### Install Help 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 Keys 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. Most general menu actions are available with Ctrl+[key]. A few others with Ctrl+Alt+[key]. 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. Indentation can be increased or reduced by pressing **[TAB]** or **[SHIFT-TAB]** respectively. To affect multiple lines, select those lines first. **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. ### Finding and Replacing 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, 1. If the first char is lower case, the replacement is set to all lower case. unless there is an upper case char in the rest of the string, then the replacement is used unchanged. (Mixed case is assumed as in: myString ) 2. If the first char is uppercase, the first char of the replacement is set to uppercase. If the second char is uppercase, the rest of the replacement is set to uppercase. ### Changing Fonts and Colors - Styles 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.) ### HTML Tips **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](help.html#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. ### Auto Complete 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** ### API (CallTips and AutoComplete) Howto ZionEdit will parse standard Scintilla type call tip files, but in true ZionEdit style adds a few nifty extensions of its own. #### C Style Call Tips 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: 1. The function declaration is listed without the return type. (Return type can be listed in the description) 2. The first ')' will indicate the end of the function and the beginning of the description. 3. Function listings are line-based. The entire declaration and description must be placed on one line. 4. Descriptions can include basic pre-HTML4.0 tags, definitely no styles or XHTML allowed. See the supported tags (compliments of wxHTML) [below](#supTags): 5. Since it's HTML based, descriptions should not include HTML chars such as '>' and '<'. Rather use "&gt;" and "&lt;" respectively. 6. Once a call tip is displayed, **clicking on the call tip itself** (not the arrows) **will pop up the description**. #### LOCAL OBJECT COMPLETION ZionEdit object completion features are very, very, very sweet. Lets use the JavaScript API file for examples. Consider the following two lines: `docoument.close() document.alinkColor` 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: `document.activeElement,alinkColor,bgColor` Getting impressed? There's more: `=color:htmlColors !color.bgColor,backgroundColor,alinkColor` 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. Listing `getElementById.blur()` as `document.getElementById.blur()` will cause previous definitions of `addBehavior()` to `attachEvent()` to be lost. Don't do this: ` **document.getElementById**( string id ) Return the element object with id "id" getElementById.addBehavior() getElementById.addEventListener() getElementById.addRepetitionBlock() getElementById.addRepetitionBlockByIndex() getElementById.appendChild() getElementById.applyElement() getElementById.attachEvent() **document.getElementById**.blur() getElementById.clearAttributes() ` 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. #### Additional Notes * **Multiple API Files can be included simultaneously.** Zion uses the concept of a master or "toplevel" call tip file for each Syntax Mode. For example, the toplevel api file for HTML mode is **_html.api_**. This master file can include other sub api files. Sub api files can be quickly commented out with a "#" placed at the very start of the line. This is very useful for HTML mode in particular that can included so many other programming languages. In fact for **performance reasons it is best to comment out of the toplevel file any included API files you do not use.** * **Comments are only allowed at the very start of a line.** * To see the top-level api file for your language mode choose **Options|Settings**. It will be listed just below the checkboxes. * 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. #### Limits of Static Call Tips, Auto Complete 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"; **str.Empty()**;` 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. ### Inter Process Communication (IPC) 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. ### A Little History It's true. ZionEdit was started after working through the [David Beech Tutorial - no longer available](http://www.bzzt.net/~wxwidgets/icpp_wx1.html) 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. ### Startup Options
    • Options are entered on the command line separated by spaces.
    • Options cannot be combined together, but must be entered singly, each starting with a dash (**-** ).
    • If an option takes a parameter, there must be _**no space**_ between the option letter and the parameter. If the parameter must contain spaces, the parameter must be surrounded with quotes.
    • Options are themselves are _not_ case-sensitive.
    **_  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
    Match Whole word0x2
    Match Case0x4
    Preserve Case0x01000000
    Regex0x00200000
    **-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 [[download_button]] [[project_screenshots]] [[project_admins]]