UltraEdit

Contents

Description
Where to Find UltraEdit
UltraEdit: Instructions
Common Problems
Other Resources
If You Still Need Help

Description

UltraEdit is an MS-Windows editor for data and programming. It is particularly useful for handling large data files and for column-oriented data entry operations. It is available in a 16-bit version for Windows 3.x and a 32-bit version for Windows 95. The features of both products are nearly identical.

Contents

Where to Find UltraEdit

UltraEdit can be used in the Research Data Management Services (RDMS) Data Center (accessible from 002 Smith Hall), or can be downloaded directly from the UltraEdit Home Page. UltraEdit has a free 45-day trial period. After that you should register your copy with IDM Software. Registration cost is currently $30.

Contents

UltraEdit: Instructions

UltraEdit contains many useful features for creating numerical data files and for programming. A brief list is included below. Many of these capabilities may be invoked via "hot keys" (a sequence of keys pressed at one time) or by clicking the right mouse-button.

Simple Example of Data Entry

Advanced Features Useful for Data Entry

Special Features for Programmers

Contents

Simple Example of Data Entry

This example shows you how to create a data file. It uses the following UltraEdit features:

Step 1. Creating the working environment

  1. Select View / Display Ruler to display the column indicator.
  2. Set the line number viewer by choosing View / Display Line Numbers.

Step 2. Entering and saving data

  1. Begin typing your data:

  2. Save your file by choosing File / Save.

Although this example only uses columns 1-25 for its sample data, UltraEdit can edit files of unlimited line width without wrapping or splitting the lines.

Step 3. Editing your data file

  1. Inserting a new line


  2. Deleting line(s)

    • Single lines

      • Move your cursor to the line to be deleted
      • Select Edit / Delete Line, or press CTRL-E. The lines below automatically shift up to fill the gap.

    • Multiple lines

      • Go to the beginning of the first line to be deleted.
      • Holding down the left mouse button, drag the cursor straight down the file until every line that is to be deleted is selected. UltraEdit automatically selects the entire line (unless you are in column mode).
      • Press the DELETE key.

  3. Searching

    • Choose Search / Find.
    • Enter the string, character or number you wish to search for.
    • Select which direction to search and finish choosing your options.
    • Click on OK. If the program finds your field, it will highlight it and prompt you whether to find the next one, the previous one, or to stop searching.

  4. Replacing

  5. Sorting


  6. Moving around
    UltraEdit does not have as many shortcuts for getting around as many other data editors, but supports typical windows cursor movement mechanisms.

  7. Undoing changes

UltraEdit Instructions
Contents

Advanced Features Useful for Data Entry

Advanced Searches

UltraEdit is equipped with a number of advanced search abilities, including:

NOTE: It is not currently possible to perform a Prompted Search and Replace while in column mode. It is, however, possible to perform a Replace All .

UltraEdit remembers your previous ten searches (configurable). It also lets you use "regular expressions" as part of the search string to specify the search string more precisely.

Regular Expressions

"Regular expressions" are a combination of search strings and special characters, such as wildcards, spaces or other bits of information that may make your search more specific. For example, the "?" character is a wildcard representing any one letter or number. Therefore the Find expression m?n matches "man", "men", and "min" but not "moon".

For information on more complex regular expressions, select Help / Index / Search from the pulldown menu bar, then type find in the dialogue box.

UltraEdit Instructions
Contents

Bookmarking

Bookmarking refers to the practice of placing markers at various locations in a document so that you may quickly return to them. Marking lines in this way enables you to move easily through very large files. It also lets you save the location of a search result so that you don't have to repeat a previous Find to return there. Bookmarks are displayed as highlighted lines in the file. You cannot bookmark columns, but you can use column numbers or markers to keep track of your place in column mode. UltraEdit allows an unlimited number of bookmarks.

To create a bookmark in your file, simply

The line indicated should now be highlighted. You may repeat this process as many times as you wish, and each time the former bookmarks will remain highlighted.

To move from bookmark to bookmark, press F2. Alternatively, choose the Search / Next Bookmark menu items.

To remove a bookmark, move your cursor to the bookmark you wish to remove and repeat the process you used to create it. The CTRL-F2 is a toggle that turns bookmarks on and off.

NOTE: Bookmarks do not persist after you exit UltraEdit. You will have to reset them every session.

UltraEdit Instructions
Contents

File Sorting

UltraEdit supports a number of file sorting options, including:

To run a Sort,

The data should now be sorted according to your specifications.

UltraEdit Instructions
Contents

File Insertion

You can insert the contents of one file into the file you are currently editing. To do this,

NOTE: The file is actually inserted one line above where you place the cursor.

TIP:

Note that the file being imported may have some of its formatting altered. For example, inserting some source code (e.g., Fortran, C)into the top of, say, the columnar numeric output file it created will cause the source code to lose its formatting and become one long line of codes, tab stops and special characters.

  1. The easiest solution is to try reversing the roles - insert File B into File A instead of File A into File B. In the above example, if you insert the output into the source code, the formatting remains correct. You may need to experiment a bit to get this right.
  2. Another possibility is to try to clean up the results using some of the formatting features (Format menu), such as Reformat Paragraph and Convert CR/LF's to Wrap. This approach will probably require quite a bit of work.

UltraEdit Instructions
Contents

Macros

Macros provide a means of automating small, specialized procedures that you may frequently perform. For example, macros could automate a search-and-replace operation used often.

Macros in UltraEdit work much like macros in Excel and many other applications. Rather than requiring you to program the functions and operations directly, the macro editor allows you to record the sequence of keystrokes and locators that are used to perform a task, and assign that sequence to a single keystroke combination (e.g., CTRL-SHIFT-F1). Whenever you want to do perform that operation, all you have to do is press the appropriate combination of keys.

Macros may

To create a macro:

Now save your macro for future use:

You can now invoke your macro simply by pressing the assigned key combination. It is often best to use a group of three keys, such as CTRL-SHIFT-F1, to distinguish your macro from system key combinations and to ensure against accidentally invoking a macro during normal text editing.

Hot key selection

If the selected Hot Key is already assigned to something else (e.g., an UltraEdit command), your new definition will override it. Always check your key combination choice against the list of UltraEdit Hot Keys by selecting Help / Index / Keyboard Commands.

UltraEdit Instructions
Contents

Column Mode

UltraEdit can be thought of as existing in two modes: line mode and column mode. When performing deletions, jumps, searches, replacements, etc., you must tell UltraEdit in which mode to conduct these operations. The default is line mode. To toggle column mode, select Column / Column Mode from the pulldown menu. If you return to this menu, you will see that the options that were previously grayed out are now available.

In column mode you can:

WARNING: Column mode affects several aspects of UltraEdit's operation, even disabling certain ones (e.g., Edit / Delete Line). It is usually wise to toggle column mode off when you are finished working in it. To do this, select Column / Column Mode.
UltraEdit Instructions
Contents

Viewing More than One File at a Time

UltraEdit features a number of ways to open multiple windows of data at once. They are all available under the Window pulldown menu.

Tabs (default) Tile Horizontal Tile Vertical Cascade

To return to the default display, click on the

maximize button

at the top right corner of the window you want maximized.

UltraEdit Instructions
Contents

Format Conversions

In going from one platform to another, it is sometimes necessary to convert the formatting of your data file, or to be able to view your documents in hexadecimal for debugging. It is also helpful to be able to convert line feeds (LF) and carriage returns (CR) to line wrapping and vice-versa and to be able to trim trailing spaces. UltraEdit supports all of these features.

Supported conversions (two-way):


How to . . .

Perform conversions

To perform any of these conversions pulldown, choose the File / Conversions pulldown menu item. The OEM to ANSI conversion is mostly used for converting DOS format to Windows format. EBCDIC is the file format for IBM mainframes.

Hex edit

Enter hex edit mode by choosing Edit / Hex Edit from the pulldown menu, or press CTRL-H.

Convert line feeds & carriage returns to wrapping

Choose Convert CR/LF's to Wrap or Convert Wrap to CR/LF's (whichever is appropriate) from the Format pulldown menu.

Trim trailing spaces

Choose Format / Trim Trailing Spaces from the pulldown menu.

UltraEdit Instructions
Contents

Special Features for Programmers

Keyword Color Coding

UltraEdit permits you to define a series of words and characters that will be used to color-code the contents of a file. Assigning special colors to certain words helps discern the organization of the file contents. This is especially useful to programmers writing and editing code.

UltraEdit's color coding is based on instructions located in a file called WORDFILE.TXT. This file is comprised of six "slots", each one containing instructions for one type of file; each slot may be replaced with another at any time. The instructions in the WORDFILE slots tell UltraEdit

Many programming languages are based on sets of words that share the same basic function; for example, four common sets are statements, strings, declarations, and comments. While UltraEdit does not support functional highlighting per se, it is possible to achieve the equivalent effect by creating a WORDFILE class that represents all of the instances of that function. In other words, you cannot tell UltraEdit to color all of the declarations blue, but you can give it every example of a declaration statement in your programming language and tell it to color-code those words.

Each WORDFILE set may be configured to display a different color for each of the following groups of words:

To recapitulate: there is one WORDFILE, which supports six formatting slots; for example, slot 1 could be used for C++ syntax, slot 2 for Fortran, etc. Each slot, supports five keyword categories to be highlighted, plus comments and normal text.

The file extension determines which slot in the WORDFILE will be used by UltraEdit in deciding which keywords to highlight in the open file. Below is an example of the format code from a slot that recognizes the file extensions C, CPP, H, HPP, and AWK to highlight C and C++ code. In the following example, /C1 marks the beginning of the first keyword group, /C2 marks the beginning of the second, etc. Each group is assigned a different color.

/L1"C/C++" Line Comment = // Block Comment On = /* Block Comment Off = */ String Chars = "' File Extensions = C CPP H HPP AWK /Delimiters = ~!@%^&*()-+=|\/{}[]:;"'<> , .?
/C1
auto
break
case char const continue
...
__asm __fastcall __self __segment __based __segname __fortran __cdecl __huge __far __saveregs __export __pascal __near __loadds __interrupt __inline #define #error #include #elif #if #line #else #ifdef #pragma #endif #ifndef #undef
/C2
class
...
virtual
__multiple_inheritance __single_inheritance __virtual_inheritance

Based on these instructions, UltraEdit produces the following color-coding of a C++ file:

You may define their own wordfiles, or download sample wordfiles from the UltraEdit Home Page. Once you have your wordfile, you must tell UltraEdit where to look for it and what colors to use.

  1. For safety, begin by making a backup of the system WORDFILE (WORDFILE.TXT).

  2. Append your WORDFILE file's contents to the system WORDFILE file. The first line of your file should have a number indicating which slot in the system WORDFILE it is intended to occupy. For example:

    /L5 Nocase FORTRAN_LANG Line Comment = ! Nocase File Extensions = FOR F90 F FTN

    indicates that Fortran 77 and Fortran 90 occupies your fifth (L5) language slot. Further, this indicates that this slot will be used for files whose filenames end in .FOR, .F90, .F, and .FTN. Note that languages added in this way should be placed in slot five or six.

  3. From the pulldown menu, select Advanced / Configuration... You will see a number of option categories, each with its own tab. Click on the Syntax Highlighting tab. You should see a menu that looks like this:

    Image of UltraEdit Configuration menu

    (click thumbnail to view full image)

    If not already shown in the window, enter the path for the wordfile you are using. The Color Selection window at the top of the menu lets you select which colors will be used to display each of the word groups for your language. To change the defaults, select which language slot you are using and click on the color you wish to change. This will bring up the color menu. Select the appropriate color and click OK. The new color should now appear in the appropriate slot. Continue until you are satisfied with your selections.

You can now open a file using one of the language slots and have the appropriate color coding take place automatically. It may be necessary to restart UltraEdit for these changes to take effect. Be sure to save the changes when prompted to do so.

NOTE: HTML, Fortran and LaTeX/TeX are special cases which may not conform completely to this template. See the UltraEdit Home Page for further details.

UltraEdit Instructions
Contents

Spawning DOS Commands

UltraEdit features the ability to execute DOS commands and capture their output automatically. This has a variety of applications, but it primarily useful for compiling programs. To spawn a DOS command,

UltraEdit will automatically capture the output written to your screen and store it in a file called Command Output. An example of this is shown below:

Image of DOS call output
 screen

(Click thumbnail to view full image)

UltraEdit also allows you to repeat the last DOS command issued. This is useful for debugging code when the DOS command runs a compiler. To repeat the last DOS command, simply choose Last DOS Command from the Advanced menu, or press CTRL-F9.

Command line:

A dialog box is presented in the DOS Command box that allows the command line to be specified. This should be the full path of the file to be executed, unless


Wildcards and Sequences

The DOS command can be constructed so that the active file's name is passed to the program to be executed. For example:

You set up a command to run a compiler and you want to invoke the compiler with the file you are currently editing. If you change files you want the compiler to be invoked with the new file. For example, suppose the compiler is C:\comp\compiler.

Specify the following command in the dialog box:

C:\comp\compiler %F

When the command is executed, the %F will be replaced by the full directory path, filename and extension of the active window, The file will be saved before the command is executed.

The following commands may be used to pass a portion of the fully qualified filename:

%P%N%E is equal to %F which is "C:\project\test\test.c" in the example above.

NOTE - If the %f, %p, %n, or %e are typed in lower case the file names are passed as long file names and should be put in quotation marks, (e.g., "%f" or "%p%n" ) . If the %F, %P, %N, %E are typed in upper case the file name and path will be converted and passed as the "8.3" short filename specification for compatibility with DOS programs.

Working directory:

A working directory is only supported by UltraEdit-32. The working directory should be the full path of the working directory, or left blank if not required.

Additional notes:

Output from a DOS program is sometimes saved in a temporary location by the operating system. Therefore spawning a DOS command from UltraEdit may not work correctly with a program that requires interaction while it is executing. For example, prompts may not appear on the screen at the correct time and you may wonder why there is no activity. The output will always be captured. Thus, if the program generates no screen output, then the captured output may indeed be empty (and UltraEdit will therefore show an empty window).

UltraEdit Instructions
Contents

Common Problems

  1. I'm running a DOS command from UltraEdit, and all I get back from captured output is a blank screen.

    UltraEdit always captures the output to the screen. Thus, if the Command Output file is empty, then there is a strong likelihood that the output may itself be empty, or that the output was written to a device other than the screen.

  2. How can I do a multiple-field sort, as in Excel?

    You can't. UltraEdit does not support multiple-field sorting.

  3. I'm trying to import the contents of one file into another, but the formatting gets messed up.

    Try reversing the order of the import - insert File B into File A instead of File A into File B. For example, if you were to insert the output of a program into the file containing the program source code, you would find that the format remains intact; if you were to try it the other way around, however, the file may become incorrectly formatted. It may be necessary to experiment a bit to get this right. For more information on this topic, click here.

    Contents

    Other Resources

    There are currently no manuals or other such materials for UltraEdit. However, UltraEdit's on-line help and the web-based question-and-answer file contain many effective suggestions. Registered users who find these inadequate should contact IDM Software directly.

    Please send a copy of the question and the response to RDMS so that we may include it in our help pages.

    Contents

    If You Still Need Help

    If you need help quickly, call the Help Center at 831-6000 between 8 a.m. and 5 p.m., Monday through Friday. Or, you can submit a question through e-mail.

    Contents

    Last modified: October 17, 1997
    This page maintained by N. S. Gerbis.
    Copyright © University of Delaware 1997.