Editor Quick Reference

 

Editor Window

back to the top

 

Top Tip
While you can double-click on words and phrases to select them, if you hold down either "Shift" key when double-clicking a user function name (like "main"), you will be taken to that functions definition automatically. Also, Shift/double-clicking system functions will open the help item if one exists in the dictionary. This makes it very easy to get the right help when you need it.

 

Editor Buttons

 

  • Create a new file and open it ready for editing.
  • Load an existing file from disk into the editor.
  • Save a modified file back to disk.

 

  • Cut the highlighted block from the file and save to the clipboard.
  • Copy the highlighted block from the file to the clipboard.
  • Paste the contents of the clipboard back to the cursor position.

 

  • Make the cursor jump to a specified line number.

 

  • Find a specified string in the current file and optionally replace.


  • Show the last Help item that was generated. These items are derived from the dictionary. Clicking this button will show the help item in the editor, although it is not an editable text.



  • Print the current file. The printer device can be changed in the preferences.



  • Navigate backwards to a previously visited file.



  • Navigate forwards to a previously visited file.


  • Show or hide the Line numbers.


  • Show or hide the column ruler.

back to the top

 

 

Overview

The editor window features a "Tab" functionality allowing multiple files to be worked on at the same time without the need to have separate editor windows open. The name of the file is shown in the corresponding tab, and selecting the tab of interest will make that file the currently active one. Cursor and line positions are retained while switching from file to file allowing you instantly jump to a different file and back again without loosing your place.

The tab for the relevant file will also reflect the saved state of the file. If the file has been modified and not saved to disk, a small red flag will be present in the tab for that file, giving you an instant view of which files have yet to be saved back to disk. The same flag will be shown for any project that has been modified and needs saving too.The main program preferences feature an "AutoSave" option, which will save the current file when switching to a new one. You can find out more information in the Preferences section.

 

The editor also features a status line at the bottom of the window, and this gives you an instant view of the current cursor position. The small disk icon will also reflect the current saved state of the file, which, when saved will be a grey image, and unsaved will be a bright blue.

 

 

Page Guide

page_guidepage_guide2The editor also features a page guide which helps to align text to a specific column width. When writing documentation or other reference material, it is sometimes preferable to line-wrap the text at a certain column so that the text does not appear too wide.

When the column ruler is visible, you will notice a small red coloured "handle". You may "grab" this by putting the mouse pointer over it, and pressing the left mouse button. The pointer will change to indicate that you have successfully "picked it up", and you may now move it left or right to place it at the desired column. This will be "dropped" in place when you release the left mouse button.

When saving the preferences, the current column position will be saved. You may also set the default column at which the page guide will appear from the preferences.

 

The editor also supports the use of a right button popup menu giving access to frequently used or context aware functions. These include clipboard handling, jumping to matching braces, "Touch"ing files, the insertion of code constructs, searching, attributes of the current file and more. This menu will be limited in operation when using the free licence version. (See below for further information)

 

back to the top

 

 

Help-as-you-Type function

After creating a dictionary, the contents of it are used as reference material for a live system which monitors what you are typing or have selected. Once the dictionary has been checked, any relevant information is shown in a small window which tracks the editors cursor, which means it will not obstruct the view of the source being edited.

In the case of the AmigaOS4SDK project type, the list presented will contain, but is not limited to, the following types of information.

  • User Functions
    These are functions within your own code that may match with any partial text that may be written.

  • System Functions
    System functions are derived from the information gained from the SDK files. The functions shown may partially or completely match the text under the cursor.

  • User Structures
    These are complex variables that have been defined in your own code. The list will show the structure, and the fields within it. The location of the definition is also shown for your convenience.

  • System Structures
    Again, these will be pulled from the dictionary, and will be generated automatically from the SDK files when building the dictionary. As before, the structure name and the fields within it will be shown, along with the file and line number of the "include" file where it is defined.

The project settings give options on how to refine this data, and include showing the library interface (if any) the function belongs in, and also the prototype for the function.

In our example, placing the cursor over the Printf word results in this window appearing.

A selection from the list can be made by double-clicking it with the mouse, and that selection will replace the word that has caused the match. If an extended description was found in the dictionary, this will cause the Help button to be activated, and it can be shown in the editor as a Read only file. Although this help item cannot be edited, you may copy text from it and use it in your own files.

Keyboard navigation is also possible, and you may press <Shift-TAB> to activate the "Help-as-you-Type" window. Once activated, the first item in the list which can be inserted into the editor will be highlighted for you. You may choose the item you want by using the cursor Up and Down keys, and then make your selection by pressing <Return> or <Enter>. You may also close this window and return to the editor by pressing the <Escape> key.

HAYT_Structure

More information on configuring the "Help-as-you-Type" system can be found in the Project Settings page.

The structures are, again, shown during typing or cursor placement. Typing "Gad" would result in the Gadget structure being shown in the window. The fields shown in the list are Read-only, so unlike functions, these cannot be clicked on to insert them into the text, and are purely for reference purposes only. Any unions or structures embedded within the structure being shown will also be displayed in this "tree" view for ease of reference.

back to the top

 

 

Right button menus (popup)

The editor features a "popup" menu which can be accessed by pressing the right mouse button anywhere inside the editor pane, and gives a convenient way to carry out common operations like cutting and pasting sections of text. There are also some features present in this menu which are not available elsewhere, and that may also change according to the type of project being worked on. We shall cover all the options in the menu that are available with out example project. All C/C++ projects will have the same options available.

 

Here we can see the menu and its options. The first three are simply yet another way to perform clipboard operations.

The Block item gives us various options on what we can do with the currently highlighted text. Currently we can perform Indent and Outdent operations and also convert the block to upper or lower case characters. The Disable and Enable operations will comment or un-comment the entire block of text respectively in a way suitable for the project.

In our example project, this would mean that every highlighted line would be prefixed with a "//" to signify a comment. A DOS or PHP script would have ";" prefixed, and so on. Enabling the block simply looks for the comment character at the start of the line and removes it. There is no limit to the amount of lines that can be highlighted, making this a very useful and versatile function.

The "Jump to matching" item simply mirrors the same option in the main Editor menus.

"Touch" is again just a mirror from the main Project menus.

 

The "Insert" item allows various blocks of code to be inserted at the current cursor position. These should be self explanatory, and the blocks of code are structured extremely simply to allow them to be used with the minimum of effort. One point worth noting here is that inserting an "Autodoc entry" is best achieved by placing the cursor on the line above a function definition. This will allow the AutoDoc comment to include information about the function, like its name and prototype.

The "Search" item gives the option to search all files for the currently highlighted block of text. While a block is highlighted, you can use the "Next" and "Previous" items to conveniently search in the current file without opening the search window.

Lastly, we can view the attributes of the current file by selecting the "File Attributes..." item, and this is mirrored in the Editor menus, and the Project window popup menu.

back to the top

 

 

Editor Search function

The search system runs in different ways depending on which window it was launched from, and the editor window will tell the search system to search the currently open files for your required criteria, while the Find system will always search the current file being worked on. More information about all the functions of the search system can be found here.

back to the top