Text File Editor and Format Converter

MEGA includes a Text File Editor, which is useful for creating and editing ASCII text files. It is invoked automatically by MEGA if the input data file processing modules detect errors in the data file format. In this case, you should make appropriate changes and save the data file.

The text editor is straightforward if you are familiar with programs like Notepad. Click on the section you wish to change, type in the new text, or select text to cut, copy or paste. Only the display font can be used in a document. You can have as many different text editor windows open at one time and you may close them independently. However, if you have a file open in the Text Editor, you should save it and close the Text Editor window before trying to use that data file for analysis in MEGA. Otherwise, MEGA may not have the most up-to-date version of the data.

The Text File Editor and Format converter is a sophisticated tool with numerous special capabilities that include:

·      Large files –The ability to operate on files of virtually unlimited size and line lengths.

·      General purpose –Used to view/edit any ASCII text file.

·      Undo/ReDo –The availability of an unlimited depth of undo/redo options

·      Search/Replace –Searches for and does block replacements for arbitrary strings.

·      Clipboard – Supports familiar clipboard cut, copy, and paste operations.

·      Normal and Column blocks – Supports regular contiguous line blocks and columnar blocks. This is quite useful while manually aligning sequences in the Text Editor.

·      Drag/Drop – Moves text with the familiar cut and paste operations or you can select the text and then move it with the mouse.

·      Screenshots –Creates screen snapshots for teaching and documentation purposes directly from the edit window.

·      Printing –Prints the contents of the edit file.

 

The Text Editor contains a menu bar, a toolbar, and a status bar.

The Menu bar

Menu

Description

File menu

The File Menu contains the functions that are most commonly used to open, save, rename, print, and close files. (Although there is no separate "rename" function available, you can rename a file by choosing the Save As… menu item and giving the file a different name before you save it.)

Edit menu

The Edit Menu contains functions that are commonly used to manipulate blocks of text. Many of the edit menu items interact with the Windows Clipboard, which is a hidden window that allows various selections to be copied and pasted across documents and applications.

Search menu

The Search Menu has several functions that allow you to perform searches and replacements of text strings. You can also jump directly to a specific line number in the file.

Display menu

The Display Menu contains functions that affect the visual display of files in the edit windows.

Utilities menu

The Utilities Menu contains several functions that make this editor especially useful for working with files containing molecular sequence data (note that the MEGA editor does not try to understand the contained data, it simply operates on the text, assuming that the user knows what (s)he is doing.

Toolbar

The Toolbar contains shortcuts to some frequently used menu commands.

Status Bar

The Status bar is positioned at the bottom of the editor window. It shows the position of the cursor (line number and position in the line), whether the file has been edited, and the status of some keyboard keys (CAPS, NUM, and SCROLL lock).

 

Hotkeys and Shortcut keys

Many menu items have a hotkey and/or a shortcut key. These are special key combinations that are helpful for people who are more comfortable using a keyboard than the mouse. Hotkeys are identified by an underscore character in the name of the menu item, e.g., "File", "New". These allow you to hold down the Alt-key, which is usually found next to the space bar on the keyboard, then hit the underlined letter to produce the same action as if you clicked that name with the mouse. We show this using the notation <Alt>+key – e.g., the hotkey for the file menu item is shown as <Alt>+F. Be sure that you depress both keys together, holding the <Alt> key down a little bit longer than the letter key. (Some people try hitting both keys simultaneously, as if they’re hitting two keys on a piano keyboard. Quite often, this approach does not produce the desired results.)

For instance, you could create a new file by clicking the mouse on the "File" menu item, then clicking on the "New" item beneath it. Using hotkeys, you could type <Alt>+F followed by <Alt>+N. Or, more simply, while you’re holding down the <Alt> key, hit the ‘F’ key followed by the ‘N’ key, then release the <Alt> key.

You might notice that several menu items, e.g., the New Item on the File menu, show something to the right that looks like ‘Ctrl+N’. This is called a Shortcut key sequence. Whereas executing a command with hotkeys often requires several keystrokes, shortcut keys can do the same thing with just one keystroke. Shortcut keys work the same as hotkeys, using the <Ctrl> key instead of the <Alt> key. To create a new file, for example, you can hold down the <Ctrl> key and hit the ‘N’ key, which is shown as <Ctrl>+N here. (In the menus, this appears simply as ‘Ctrl+N’.)

Not all menu items have associated shortcut keys because there are only 26 shortcut keys, one for each letter of the alphabet. Hotkeys, in contrast, are localized to each menu and submenu. For hotkeys to work, the menu item must be visible whereas shortcut keys work at any time. For instance, if you are typing data into a text file and want to create a note in a new window, you may simply hit the shortcut key sequence, <Ctrl>+N to generate a new window. After you type the note, you can hit <Ctrl>+S to save it, give it a file name, hit the enter key [this part doesn’t make sense]; then you can hit the <Alt>+F+C hotkey sequence to close the file (there is no shortcut key for closing a file).