What's New in V16?

 Top Next

New features in Version 16 are:

· Per monitor DPI support (Windows 10 Creators Update 1703 and above). This means that V will automatically adjust itself when moving between monitors of different scaling.
· In CSV mode you can select entire column by Shift+clicking on the column header
· Copy CSV command to copy CSV columns (with delimiter) to clipboard
· Force CSV can now specify a start line (ie, you can ignore the first few lines)
· Support for BZIP2 compression in AWS files
· Added /QUIET command line option to suppress error messages when printing via the command line
· Windows XP and Windows 2000 are no longer supported

Version 16 also fixes the following problems:

· Problem with viewing encrypted .7z files
· You could not print more than 65,535 pages


What's New in V15?

 Top Previous Next

The main new feature in Version 15 is high DPI support.

When running on high resolution monitors, Windows will automatically use a scaling factor (125% or 150% is typical) to increase the size of text and other user interface elements (eg, icons and buttons). Unfortunately, this has the effect of making V look a bit blurry.

With the high DPI support in V15, V recognizes that it is running on a high resolution monitor and adjusts the user interface accordingly. Windows no longer scales the text and V once again looks crisp and sharp!

Version 15 has a new, slightly larger toolbar. If you prefer smaller icons, you can right-click on the toolbar and select Smaller Icons.

V15 also introduces a new Highlight All functionality.

Highlight All

The Highlight All functionality has changed in V15. Previously, only all occurrences of the search string were highlighted. As of V15, all occurrences of the selected text are highlighted. For example, if you double-click on a word, all occurrences of that word will be highlighted.

Notes

The Highlight All selections are not sticky. That is, they will disappear as soon as you click the mouse to clear the text selection.

Highlight All does not work on multiline selections and does not work in Hex mode.


What's New in V14?

The main new feature in Version 14 is the introduction of CSV mode.

V will now automatically recognize most CSV files (Comma Separated Values) and will display them as a table - where all the columns have the same width.


Command Line Options

VIEW is the version of V used by Take Command.

For the purposes of this documentation, V and VIEW are interchangeable, however, when running V from a Take Command command line, you must use VIEW instead of V.

V is not a valid Take Command command - unless you have the full version of V installed or have created an alias for V.

Command line options may be entered on the VIEW command line.

For example,

VIEW FileName [options]

The following options are valid:

/A

View the file in ASCII mode. This is the default mode and will only need to be specified in order to override an existing EBCDIC mode.
/B

View the file in EBCDIC mode.

/CSV[:del[,Line#]]

View the file in CSV mode. Non-standard delimiters can be specified after CSV (eg, /CSV:! or /CSV:#,3)

/E

V will start viewing the file from the end instead of the beginning.

/F

V will check to see if there is any redirected output that it needs to display (such as the output of a DIR command). If there is, it will display the redirected output, otherwise it will display the contents of the current directory.

For example: dir | v /F

/FLAT

Enables Flat Text Mode

/GB

Enables Greenbar Mode

/H

This will force the file to be viewed in Hex mode.

/I

A new instance of V will be started

/ICRCR

Enables the Ignore Consecutive CRs option

/IFF

Enables the Ignore Form Feed option

/L

V will display the last file that it viewed. This will be the first file in the Recent Files list.

/L:nn

V will start displaying the file from line number nn

/LEN:nn

Sets the wrap length to nn

/O:xxxx

V will start displaying the file from offset xxxx

/P

Indicates that the specified file(s) are to be printed. Click here for further printing options.

/R

When started with no parameters, V will browse the current directory. By specifying the /R option, V will display the directory that it last browsed. Note that this option is automatically added to all shortcuts that V creates for itself.

/T

Enable File Tailing

/TEXT

This forces a file to be opened in text mode (opposite of /H)

/VFONT

See Font Options

/VH

The file will be viewed in Vertical Hex Mode

/OEM

V will display the file using the DOS/OEM character set (if available).

/OEMP

V will use the DOS/OEM character set when printing.

/ANSI

V will use the default character set.

Further command line options are explained in the following sections:

/Delete Option
/Fix Option
Font Options
Printing Options
Text Only Printing Options
EBCDIC Options

Notes

The options may also appear before the file name(s)

The options are not case sensitive.

You can use an equals (=) instead of a colon (:). For example, /L=20 instead of /L:20


/Delete Option

The /delete option is used to tell V to delete the file once it has finished viewing it.

This option may be necessary if you are using V as an external file viewer. When using external file viewers, programs usually create temporary files and then launch the file viewer to display the temporary file. It is up to the program that launches the file viewer to delete any temporary files it has created.

However, not all programs are well behaved and it is sometimes not possible to delete the file because V may still have the file open. If you know that the program in question always creates temporary files before it passes them to V, you should use the /delete flag.

*** Please use this option with caution ***


/Fix Option

The /FIX option tells V to fix the columns when viewing the specified file(s).

The column position may also be specified on the command line.

For example,

V TABLE.TXT /FIX:6

If no column position is specified, the most recent fixed column position is used.

To disable fixed columns, specify a column position of zero. That is,

V TABLE.TXT /FIX:0


Font Options

You may specify the display font on the command line by using the VFONT option as follows:

/VFont:"Font Name",size

For example:

V Filename /VFont:"Courier New",10

Notes

The size option is optional. If not specified, it will default to 10 point.

The /FONT option is used to specify what font will be used when printing.


Viewing Redirected Output

When using a Command Prompt, it is awkward to view the output of a command (like DIR or GREP) when that command outputs more lines than can fit on the screen.

Sometimes, the Command Prompt allows you to scroll back through the output. However, you still can't search, or select and copy the output.

Typically, the more command is used as a filter to pause the output a screen at a time. However, it is still very limited - you can't scroll back or search.

You can solve all the above problems by using V to view the redirected output. You will be able to scroll and search the output, and even save it to a file.

To use V to view redirected output, you must use the /f option.

For example, dir | v /f

The /f option instructs V to look for redirected output. If you forget to include it, V will ignore the output and simply display the contents of the current directory.

Alternatively, if you enable the "Check STDIN on startup" option in the File Options section of Preferences, V will automatically look for redirected output when it starts.

This has been made an option because there may be some overhead in looking for redirected output. I did not want to adversely affect the load time.


Printing Options

The /P option is used on the command line to print the specified file(s). V will immediately start printing the file (in a minimized state), and will exit when it has finished. If you have V installed in the tray, a separate instance of V will be launched to do the printing.

The Print Dialog box will not appear when printing from the command line (unless the /PD option is specified). All the current print settings will be used for printing. Most of these settings can be overridden by specifying them on the command line. The following command line options are available:

/Portrait

/Landscape

/2up

If one of the above 3 options is used, the /P option is implied and does not need to be specified.

/Font:"Font Name",size eg, /Font:"Courier New",10
/Printer:"Printer Name" eg, Printer:"HP LaserJet III"

/AM:0.5 Set ALL margins to 0.5 inches
/LM:0.5 Left margin
/RM:0.5 Right
/TM:0.5 Top
/BM:0.5 Bottom

/Header:"Header Text" /Header:"%f;;Page %p"

/Footer:"Footer Text"

/Copies:2

/From:2 /To:3                                Print From Page 2 to Page 3

/L1:1 /L2:200                                Print From Line 1 to Line 200

/Pagelen:60 Override Page Length

/Wrap Wrap Long Lines
/Wrappage Wraps long lines onto a new page instead of onto a new line
/EOL Print End of Line
/PLN Print Line Numbers
/IFFP Ignore Form Feeds
/ODD Only print odd numbered pages
/EVEN Only print even numbered pages

/PX Use Text Only printing
/PB Use Raw/Binary printing
/PGB Enables Greenbar printing
/Profile:"Profile Name" Use the settings stored in the specified printer profile
/QUIET No message is displayed if there is an error in printing

You may also specify the /PD option which will cause the Print Dialog box to be displayed, allowing the user to override any print options.

If your printer supports duplexing (double sided printing), you may also specify one of the following options:

/dups                                Enable duplexing with short edge binding

/dupl                                Enable duplexing with long edge binding

If you do not specify a print setting, the current (most recent) setting will be used. To disable a setting, prefix the corresponding option with NO.

For example, if the default setting was to print a Header, you would have to specify the /NOHEADER option to disable the header. You can also use, NOFOOTER, NO2UP, NOWRAP, NOEOL, NOPLN and NOPAGELEN.

/NOP option

When the /P option is used (or implied), V will immediately start to print the file. However, if you would like the user to be able to view the file before it is printed, you need to specify the /NOP option. V will retain the command line parameters and use them when the user decides to print the file.

/PAGELIMIT:xxx option

The /PAGELIMIT option is used to specify the maximum number of pages that can be printed. This can be used to prevent users from accidentally printing the entire contents of very large files.

Notes

Case is not important (ie, /Font or /font can be used).

Make sure that there is no space before or after the ":" in each option, and no space before or after the comma separating the font name and font size.

The header text, printer name and font name should be enclosed in "quotes".

If not specified, the default margins will be used. However, if one margin is specified on the command line, they must ALL be specified. Any margin not specified will default to ZERO.


Text Only Printing Options

The Text Only Printing options can be entered on the command line.

They correspond to the options in the Text Only dialog box, and are as follows:

/TOAM:nn Set *all* margins to nn

/TOLM:nn

/TORM:nn

/TOTM:nn

/TOBM:nn Set left, right, top and bottom margins

/TOW:nn Set page width to nn
/TOH:nn Set page height to nn (ie, page length)

/TOLD:n Set the Line Delay to n
/TOPD:n Set the Page Delay to n
/TODISABLE To disable Text Only printing

/TOSOF:xxx String to send before the start of file is printed
/TOEOF:xxx String to send at end of file
/TOEOL:xxx String to send after each line
/TOEOP:xxx String to send after each page

To include control characters in a string, you must specify their 2 character hex code prefixed by a "%". For example to send a CR/LF at the end of each line and a FF (form feed) at the end of each page, you would specify the following options:

/TOEOL:%0d%0a /TOEOP:%0c


EBCDIC Options

You can specify the EBCDIC record format and record length by using the RECFM and LRECL options.

/RECFM=xxx

Use this to specify the record format. The record format can be one of V, VB, F or U. If the file uses carriage control, you can also specify the type of carriage control by appending one of A, M or Z. An S may be appended to signify that the file contains ASCII characters (instead of EBCDIC).

/LRECL=nn

Use this to specify the record length for fixed length files (RECFM=F). This is not required for RECFM=V/VB/U.

Examples

V Filename /RECFM=F /LRECL=132

V Filename /RECFM=FM /LRECL=80

V Filename /RECFM=VBA

V Filename /RECFM=VS

Click here for further details on EBCDIC record formats

Note

V can usually auto-detect RECFM=V/VB files, so it is not necessary to specify these formats on the command line. However, V cannot detect if the file contains carriage control. If it does, you will need to use the RECFM option to specify the type of carriage control (eg, /RECFM=VA).


Sending Error Reports

If V crashes, it will display a message saying that it encountered an unexpected problem and that it cannot continue.

Press the Send button to send a detailed report to fileviewer.com for analysis.

Error reports can also be sent to fileviewer.com by selecting Send Error Report from the Help menu

You will be presented with a list of crash files (Crash-xxxx.dat) and a log file (V.log). Simply select the files that you want to send and press the Send button.

Please include a description of what you were doing just before the crash.


The Basics

The File View

The File View displays the contents of the file. The view may be in Text or Hex mode, and can be customized further by displaying line numbers, wrapping text lines and displaying a ruler. Files may also be viewed as EBCDIC instead of ASCII.

Rapid viewing of selected files is made possible by using the Previous and Next file commands, and positions in files can be bookmarked for later retrieval. The File List allows you to view other files in the current directory without having to go back to the Directory View.

When in doubt - right click or press F1

If you are not sure how to go about doing something in V - right click. This will usually display a menu of all the available commands.

Pressing F1 will display the Help file. Use the Index or Find tab to search for help on the topic you are interested in.


More Basics

Colors

The colors that V uses to display various items can be customized by selecting Change Colors from the View menu.

Click here for further details.

Always on Top

The main V window may always be kept in the foreground by selecting Always On Top from the View menu or View->Options menu (or by pressing Ctrl+Shift+T).

Number Entry

In most places where V asks for a number to be entered, the number may either be entered in decimal or it can be entered in hex by prefixing the number with 0x

For example, 0x100 is the same as 256.


Menu and Toolbar

Like most Windows programs, V has a main menu and a toolbar which allow you to select the appropriate commands.

The toolbar may be removed by selecting Options from the View menu (and then unchecking Toolbar). The menu can not be removed.

Note that the menu and toolbar are different for the three different views (Directory, File and Zip).

Customizing the Toolbar

Right-clicking on the toolbar will display a menu with three options - Customize, Smaller Icons (or Larger Icons) and Default.

V15 introduced a new, slightly larger toolbar. If you prefer a smaller toolbar, select Smaller Icons. If you want to revert to the larger/default size, select Larger Icons.

Select Default to return the toolbar to its default (uncustomized) state. By selecting Customize, a dialog box will appear with the currently used toolbar buttons on the right hand side and the available buttons on the left.

To remove a button from the toolbar, select it and press the "Remove" button. The button will be placed in the "Available buttons" list where it may be reinserted into the toolbar.

To move a button to a different position, select it and press the "Move Up" or "Move Down" button. To add a button to the toolbar, select it from the available buttons and press the "Add" button. It will be inserted before the currently highlighted toolbar button.

Press the "Reset" button to cancel any changes that you may have made.

Notes

You may only rearrange and/or remove icons from the toolbar. You cannot add your own custom icons.

It is not possible to customize the dropdown toolbar on some of the main toolbar buttons (like Tools).

The default toolbar size can only be made smaller (not larger). If you want a larger toolbar, you will need to change the Windows scaling factor (in the Windows Display settings).


File Management Commands

All these commands may be accessed in a number of different ways - from the toolbar, main menu, right click menus and keyboard shortcuts. Further commands, which do not necessarily act on a particular file, are grouped together under Tools.

These commands are:

Copy

Copies a file(s) to another directory. You will be asked to select a directory where the selected file(s) will be copied to.

Move

Similar to Copy, except the files are removed from the original directory. The Copy and Move commands will also work with directories instead of files.

Attributes

This command displays several file properties (size, date, long name, short name) and allows you to modify the file (or directory) attributes. For example, this command could be used to make all files in the directory read-only (by setting the read-only attribute). If this command is selected while a file is open (and in text mode), details of the line lengths in the file will also be displayed.

Properties

This is the same as the Properties option in Explorer. Depending on the file type, several tabs of information may be displayed. If you select this option for a directory, the total number of files that the directory contains (and their total size) will be displayed.

Send

This will construct an email message using your email client and will attach the selected file(s). Note that this will only work if MAPI (or Windows Messaging) is installed on your system.

Recent Files

This displays a list of the most recently viewed files. Click here for further details.

Print

Prints the file(s).

Editor

V is not an editor. That is, you cannot modify the contents of a file with V. In order to edit a file, you need to specify an editor. The Editor command will launch the specified editor and load the selected file(s).

User Command

This will execute the default User Command. Click here for further details. Further commands may be selected from the UserCommands menu.


Recent Files

When V views a file, it adds it to the Recent Files List.

You can then re-view the file by selecting it from the Recent Files menu which is displayed by selecting Recent Files from the File menu (or various right-click menus).

By default, the last 9 files are displayed in the Recent Files List. This may be modified by setting a new MRU Size in theMore Options section of Preferences (the maximum size is 50). The Recent Files List can also be disabled by disabling Enable MRU File List.


Keyboard Shortcuts

Keyboard shortcuts usually consist of some Alt or Ctrl key combination, and are used in preference to the menu or toolbar. For example, Ctrl-D deletes a file. V displays the keyboard shortcut for a command next to that command in the File Menu (at the top of the program).

Note that in many cases V has more than one keyboard shortcut assigned to a particular command.

Many of the default keyboard shortcuts can be modified and new keyboard shortcuts can be created. See the Keyboard Customization section for further details.


Tools

The Tools menu contains some general purpose commands which do not necessarily apply to a file (or group of files).

Word/Line Count

This counts the number of words and lines in the current file. Click here for further explanation.

Hex Converter

This launches a simple Hex Converter which lets you quickly convert between hex and decimal

Explorer

This command launches Windows Explorer. The right hand side of Explorer will display the contents of the current directory. This is useful in the case where V cannot perform an operation that Explorer can.

If the Ctrl key is pressed when selecting this command (or if you press Ctrl+Alt+O), a rooted Explorer is displayed. That is, the root of the Explorer tree is the current directory.

Command Prompt

This launches a Command Prompt (or DOS Box) in the current directory. Click here for further details.

Map Network Drive

This lets you assign a drive letter to a shared network resource. Note that you cannot assign a drive letter to a local directory - unless the local directory has also been shared.

Disconnect Network Drive

This removes a network drive letter assignment.

ASCII Chart

Click here for explanation


Command Prompt

A Command Prompt may be launched in the current directory by pressing Alt+C, or by selecting "Command Prompt" from the toolbar or Tools menu.

V looks at the environment variable COMSPEC to decide what program to use as the Command Prompt. If this does not exist, it will try to launch CMD.EXE.

It is possible to pass command line options to the Command Prompt when it is launched by defining the COMSPECOPTIONS environment variable. If COMSPECOPTIONS is defined, its contents are passed to the command line interpreter.

For example, you can set the title of the Command Prompt window to "Command Prompt" by setting COMSPECOPTIONS to /K "Title Command Prompt"

You can also pass the path of the current directory by using %1.

For example, setting COMSPECOPTIONS to /K "Title %1" will set the title of the Command Prompt window to the path of the current directory.

You can also use a different Command Processor (to CMD.EXE) by specifying it in the Editor/CMD tab of Preferences.

Notes

You cannot use V to set COMSPECOPTIONS - you must do it using the Windows Control Panel (usually in the System section).

COMSPECOPTIONS is only used by V when launching a Command Prompt - it is not used by Windows or any other programs.

The syntax of COMSPECOPTIONS may seem a bit cryptic. Unfortunately, this is required by Windows.


ASCII Chart

A good old-fashioned ASCII chart is displayed by selecting the ASCII Chart command from the Tools menu.

The chart is displayed in two halves - "0 to 127" and "128 to 255". You may toggle between the two by pressing the button above OK, or by pressing the PageUp/PageDown keys.

When a character is selected with the mouse (or by pressing the corresponding key on the keyboard), the Hex, Decimal, Octal and Binary representation of that character is displayed at the bottom of the chart.

The Bold checkbox determines how the characters are displayed.

Enabling the EBCDIC option turns the ASCII chart into an EBCDIC chart. The EBCDIC mapping may be modified in the EBCDIC tab of Preferences.

Notes

You may press Ctrl-C to copy the selected character to the clipboard. Pressing Ctrl-Shift-C will append the character to the clipboard.

The chart is displayed in the selected display font


MD5/CRC32

To calculate the MD5 and CRC32 of a file (or files), select the files(s) and then select "MD5/CRC32" from the Tools menu (or from the dropdown Tools button on the toolbar).

A dialog box will display the MD5 and CRC32 as they are calculated.

If in Dual Pane Mode, the MD5/CRC32 of the selected file(s) in *both* panes can be calculated by selecting "MD5/CRC32 (Both Panes)" from the Tools menu. This can be used as an easy way of determining if 2 files are the same.

Note that it is possible for 2 different files to have the same MD5 - however, this is very unlikely.

MD5

MD5 (Message Digest algorithm 5) is a popular hash function with a 128-bit hash value. It is commonly used to check the integrity of files.

CRC32

This is a 32 bit Cyclic Redundancy Check - mainly used by older applications.


Word/Line Count

This command will display the number of words and lines in the current file.

The number of lines in a file is also displayed on the status bar when a file is being viewed. However, if the file is being viewed in chunks, the count will only display the number of lines in the current chunk, whereas this command will display the number of lines (and words) in the entire file.

Word/Line Count (selection) may be selected to count the number of words/lines in the selected text.

What is a word?

A word is any sequence of alphanumeric characters, or underscores. Note that this is slightly different from the definition of a word used by some word counting utilities (like wc). In particular, a hyphen is not treated as a word character. That is, "on-line" will be counted as two words instead of one.

You may change these word characters by defining your own word sets.

Note that V lets you define an alternate (Shift-Double-Click) word set. If you would like to use the alternate word set to count the number of words, press the Shift key while selecting the Word/Line Count command.


Colors

The colors that V uses can be customized by selecting Change Colors from the View menu.

Colors are changed by clicking on a color button and selecting a new color. Default system colors (like Button Text and Menu Background) can be selected by right-clicking on the button and selecting the color from the menu.


File View

This section allows you to select the colors that V will use when viewing files.

To customize the File View colors, disable the Use Default Colors option. The following colors can be customized:

Normal Background/Text

The colors used to display the file.

Highlighted Background/Text

These colors are used to display highlighted/selected text. By default, these colors are the inverse of the text colors. That is, the background color is the text color and the text color is the background color.

Search Line Background/Text

When searching, the found text is displayed using the above highlighted colors.

Only the portion of the line that contains the found text will normally be highlighted. However, the part of the line that does not contain the found text may also be displayed in a different color to the standard text color. Doing this makes it easier to distinguish the line which contains the found text, especially if the found text is scrolled off the screen.

Highlight All Background/Text

These colors are used to display all string matches when the Highlight All option is enabled in the Search Bar.

Highlight All Line Background/Text

These colors are used to display the non-highlighted portion of all lines that contain a Highlight All match.

Line Numbers Normal/Highlight All

The first color is used to display line numbers (and addresses in HEX mode). It is also used to display text in fixed columns.

The second color will be used to display the line number for all lines that contain a Highlight All match.

Current Line Background

This color is used to draw the background of the current line.

Bookmark Background

This background color is used to display bookmarked lines.

Grid Line

This color is used to draw the Grid Lines when right-clicking on the ruler.

Block Marker

This color is used to draw the start of block marker. A block marker is created by right-clicking on a position in the file and selecting Mark Block->Start Point.


The File View

The File View is the view in which the file is displayed. The view can be in one of two modes - Text and Hex, and can be configured in several ways.

The font in which the file is displayed may be selected from the Fonts section of the Preferences Dialog box. Note that V only supports non-proportional (or fixed pitch) display fonts - like Courier.

Right-clicking on any part of the File View will display a pop-up menu containing most of the available commands.

The following sections describe the File View in greater detail:

The Toolbar

Text Mode

Hex Mode

Unicode Files

Flat Text Mode

End of Line

Tabs

Start Offset

EBCDIC

The Ruler

Line Numbers

Line Wrapping

Column Fixing

Line Lengths

OEM Character Set

Bookmarks

Scrolling

Searching

Goto

Block Marking

File Chunks

Greenbar Mode

CSV Mode

File Tailing

Click here for details on how to configure V to view multiple files.


The Toolbar

Below is the default toolbar for the File View. It can be customized so that the buttons are re-arranged or deleted (right-click on the toolbar and select Customize). Click here for further details.

BRefresh Refresh

Refreshes (or reloads) the file. It is possible that the file being viewed is also being modified by another program (eg, a log file). In order to be able to view any data appended to the file since the file was opened, you need to refresh it (unless File Tailing is enabled).

BLeft BRight Previous/Next

Displays the previous/next file in the file list. If you select several files in the Directory View, the file list will consist just of the files selected, otherwise the file list will consist of all files in the directory. If you position the mouse over the Previous/Next buttons, the name of the corresponding file will be displayed. Note that these buttons work differently from the Back/Forward buttons in a browser.

BDown File List

This brings up a list box containing all the files in the current file list. As above, if you have selected several files in the Directory View, this list will only contain the selected files. Otherwise, it will contain all the file in the current directory. To view another file, simply select it from the file list.

BFind Find

Searches for a string.

BFindNext BFindPrev Find Next/Find Previous

Searches for the next (or previous) occurrence of a string.

BGoto Goto

Goes to a specified position in the file. Click here for further details.

BClipBoard Clipboard

Copies (or appends) selected text to the clipboard. Click here for further details.

BText Text Mode

Displays the file in Text Mode

BHex Hex Mode

Displays the file in Hex Mode

BVHex Vertical Hex Mode

Displays the file in Vertical Vertical Hex Mode

BFlat Flat Text Mode

Displays the file in Flat Text Mode

BCSV CSV Mode

Displays the file in CSV Mode

BWrapScreen BWrapLen Wrap To Screen/Wrap To length

Click here for further details on line wrapping.

BLineNumbers Line Numbers

Toggles line numbers on/off in Text mode.

BEOL EOL

This specifies whether an End Of Line character will be displayed at the end of every line. This is useful when viewing files with trailing spaces. Note that this option is not available in Hex mode. The character used as the End Of Line terminator may be specified in the Fonts tab of the Preferences dialog box. The EOL mode can also be toggled by pressing the Enter key. Note that the EOL character will not be displayed at the end of a line that has been wrapped. It will only be displayed if it corresponds to an actual end of line character in the file.

BTail Tail

This enables File Tailing

BGreenbar Greenbar

Clicking on this button enables/disables Greenbar Mode. Clicking on the arrow portion of the button allows you to modify the Greenbar Options.

BTools Tools

Clicking the Tools button displays a further menu where you may select one of the following:

BMD5 MD5/CRC32

This calculates the MD5 and CRC32 of the file being viewed.

BWC Word/Line Count

This counts the number of words and lines in the file. Click here for further details.

BPlus BMinus Zoom

You may easily increase (or decrease) the size of the current font by using the + and - keys. This does not do a "bitmap zoom", but simply selects the next point size in the current font. If a larger (or smaller) point size is not available, nothing will happen. Note that this will not work properly with the Terminal font.

BSend Send

This will construct an email message using your email client and will attach the file being viewed. Note that this will only work if MAPI (or Windows Messaging) is installed on your system.


Text Mode

The Text mode displays the contents of a file exactly as they are stored on disk - much like an editor does.

The Text mode may be enhanced by adding line numbers, adding a ruler and wrapping lines. These topics are discussed further in later sections.

When V opens a file, it determines whether it is a text or binary file, and displays the file in Text or Hex mode respectively. Basically, text files contain only alphanumeric, punctuation and new line characters. If files contain characters other than these, they will be displayed in Hex mode.

It takes a little bit longer for files to be displayed in Text mode rather than Hex mode. Files that are loaded in Hex mode will display almost instantaneously - regardless of size (1 byte or 500Mb). However, displaying files in Text mode is different. To display the file properly (and to handle the scroll bars correctly), V needs to know the number of lines in the file, and also the length of the longest line. As files get larger, it naturally takes longer to do this. Normally, you will not notice any delay unless the files are at least 2Mb in size. Compared to other programs, however, V still does a good job in loading even large files. If you know of any program that loads files quicker than V, please let me know.

File Chunks

To enable fast loading of even very large files (hundreds of Mb to several Gb), V can view files in chunks, instead of loading the entire file. Click here for further details on file chunks.

File Tailing

If you want V to automatically refresh a file as it is being viewed, you need to enable File Tailing.

Click here for further details.

Notes

Binary files (like ZIP and EXE files) can be viewed in Text mode, although it usually doesn't make sense to do so. If such files are viewed in text mode, many strange characters will be displayed. These strange characters correspond to non-printable (or control) characters and will differ depending on which font is selected.

Sometimes V can incorrectly decide that a text file is a binary file, and display it in Hex mode. This usually happens if a file contains an unexpected control character (eg, line drawing characters). In this case, just click on the Text icon on the toolbar (or press Alt-H) to display the file in Text mode. If you find that V is incorrectly displaying most of your text files in Hex mode, you can force V to always view them in text mode by enabling the Always Open as Text option in the Preferences Dialog box. However, by enabling this option, even ZIP and EXE files will initially be displayed as text.


Unicode Files

Most text files are stored using ASCII characters - each character is encoded using one byte (8 bits). This means that we can have a maximum of 256 different characters. This isn't a problem in most English speaking environments, but it does become a problem once you start encoding characters in different languages.

Unicode is a standard for encoding characters that tries to address the problem of encoding all possible international characters into a single, unified format.

As with most standards, there are several flavors to choose from. V supports UCS-2 and UTF-8. (See the note below regarding UTF-16)

Status Bar Indicator

V will automatically detect most Unicode files and display them accordingly, including files with foreign characters. UNI will be displayed in the status bar to indicate that the file is a Unicode file. ANS (for ANSI) will be displayed in the status bar when the file is not a Unicode file.

If V does not guess the correct encoding, you can click on the UNI/ANS indicator in the status bar and select the correct encoding (assuming that you know what it is).

Font Substitution

V does not support font substitution (or font fallback). Under font substitution, if the selected font does not contain a particular character, the program will try to use another font to display that character. Since V does not do font substitution, it is very important to use a font that contains all the characters to be displayed. In particular, the standard Courier font should not be used to display Unicode files - Courier New should be used instead.

UCS-2 vs UTF-16

Strictly speaking, V does not fully support UTF-16 - it only supports UCS-2 (which is the outdated predecessor to UTF-16).

UCS-2 is a fixed length encoding that encodes all characters to a 16 bit value (from 0 to FFFF). UTF-16 is a variable length encoding capable of encoding the entire Unicode range of characters. In particular, UTF-16 can be used to encode characters greater than FFFF.

However, in most cases, UCS-2 and UTF-16 are identical. If users encounter any problems viewing Unicode files, please contact v@fileviewer.com (preferably attaching a copy of the Unicode file).

Notes

V does not support UTF-32

V does not support RTL (Right To Left) display


Flat Text mode

This is a cross between text and hex modes.

The file is displayed as text, however, control characters like line feeds and tabs are not expanded, and the file is always wrapped at the specified wrap length.

This is useful for displaying files of fixed length records, where records may contain control characters (eg, packed decimal fields).

See the Wrap Here section for details on how to quickly wrap lines at different line lengths.


End of Line (EOL)

When displaying files in text mode, V will automatically start a new line whenever a line terminator is encountered (unless the file is displayed in Flat Text or Wrap to Length mode).

Most files created on Windows use a Carriage Return/Line Feed pair as a line terminator (CR/LF) . That is, a Carriage Return followed by a Line Feed. However, some files use a single CR or a single LF as a line terminator. V will also start a new line whenever a single CR or LF is encountered.

The End of Line submenu (on the View menu) allows you to configure how you want V to handle line terminator characters.

Display EOL Marker

Enabling this will display the End Of Line marker at the end of every line. This is equivalent to pressing the End of Line button on the toolbar. The character displayed as the EOL marker can be set in the Fonts section of Preferences.

Ignore Form Feeds

Form feed characters (ASCII 12 or Ctrl-L) are generally used to signify a page break. V uses form feeds to start a new page when printing, and also treats a form feed as a line terminator (since a new page implies a new line.

If you do not want V to treat a form feed as a line terminator, you can enable this option. The form feed character will still be displayed, but a new line will not be started. Note that this option only applies to viewing files. If you also do not want V to start a new page when printing, you need to enable "Ignore Form Feeds" on the Print dialog box.

Customize EOL Options

If you want to change any of the default EOL options, select Customize EOL Options from the End Of Line submenu.

Select Use Default EOL Options to revert to the default EOL behavior.

The following options are available:

Ignore Single CR (without LF)

This requires a CR to be following by a LF for it to be treated as a line terminator.

Ignore Single LF (without CR)

This requires a LF to be following by a CR for it to be treated as a line terminator.

Ignore Consecutive CRs

Some files have a strange EOL combination - CRCRLF. That is, 2 carriage returns followed by a line feed. Some users want this displayed as 2 lines, others as one. By default, V will treat this a 2 line terminators. If you enable this option, V will ignore the first CR and treat CRCRLF as a single line terminator.

You can also enable this option from the command line by using /ICRCR.

Use the following Custom EOL characters(s)

Enable this option if you want to set custom EOL characters. Simply enter the characters in the space provided. V will start a new line whenever it encounters any of these characters. Multiple EOL characters are allowed, but each character will be treated as an EOL. That is, multiple characters will not be treated as a multiple character EOL combination.

Disable default EOL characters

When setting custom EOL characters, the default EOL characters (CR, LF) will still be treated as line terminators. Enable this option if you do not want CR and LF to be treated as line terminators.


Tabs

When displaying text files, tabs will be expanded according to the number of characters specified in Tab Size.

Specifying a Tab Size of 1 causes tabs to be treated as spaces.

Tabs may also be made visible by selecting "Tabs->Show Tabs" from the View menu. In this case, a tab will not be expanded and will be displayed according to the corresponding character in the selected font.


Start Offset

V allows you to specify a non-zero start of file position - any data before this position will be ignored.

To set the start offset, right-click on the position in the file where you want to start viewing from and select View/Layout->StartOffset->StartFromHere

Alternatively, you can specify an absolute position by selecting Set Offset from the above right-click menu or from the main View->StartOffset menu.

A solid blue line will appear at the top of the file, indicating that a non-zero start offset is being used.

Note that the start offset is not "sticky". That is, it is reset to zero once a new file is viewed.

This is useful if you want view files with fixed line lengths, but the fixed lines do not begin from the start of the file.


The Status Bar

The status bar of the File View usually consists of 3 panes:

Pane 1 - Current Position

Usually this will contain the current line number. If you press the left mouse button at any position and keep it pressed, the corresponding line number and column will be displayed. If you have enabled "Hex offset in status bar" (in the File Options tab of Preferences), the hex offset of the position will also be displayed.

In Hex mode, the corresponding file offset will be displayed. Also, as a block is being highlighted, the start and end positions of the block are displayed, as well as the number of characters highlighted.

The offsets are displayed in both hex and decimal. For example,

"Offset: 669h->8e8h (1641d->2280d) Len=640 (280h)"

Note that as long as a block of text remains highlighted, its details will be displayed in this pane - even if the block has been scrolled out of view.

Pane 2 - Position as Percentage

This displays a number between 0 and 100 and represents the current line (ie, the last line in the view) as a percentage of the number of lines in the file.

If the file is paginated, the current page number and the total number of pages will be displayed instead of the percentage.

Pane 3 - File Details

This displays the file size, the number of lines in the file and the date and time the file was last modified.

Unicode and EBCDIC

When V displays Unicode or EBCDIC files, UNI or EBC will be displayed in the status bar. You may click on this area of the status bar to display a menu of available options.

Notes

When the file is being displayed as chunks, a fourth status pane appears which displays which chunk is currently being viewed.

Left-clicking on a character while viewing a file displays the hex offset of the character on the status bar (providing the Hex Offset option is enabled in Preferences).


EBCDIC Mode

EBCDIC stands for Extended Binary Coded Decimal Interchange Code, and is the character set used by most IBM mainframes to store documents (in preference to the more commonly used ASCII character set).

If you try to view an EBCDIC file with a standard ASCII file viewer/editor (eg, notepad), the text will appear as a stream of unprintable control characters. For example, the EBCDIC code for the number zero is hex F0, which is not a printable character in ASCII.

When V opens a file, it automatically tries to determine if it is ASCII or EBCDIC. If a file is EBCDIC, EBC will be displayed on the bottom status bar.

If an EBCDIC file is incorrectly displayed as ASCII, you can view it as EBCDIC by pressing Alt+B (or selecting EBCDIC from the View menu).

Once in EBCDIC mode, you may modify EBCDIC viewing options by selecting EBCDIC Options from the View menu, or by clicking on EBC in the status bar.

V views EBCDIC files by mapping each EBCDIC character to the ASCII equivalent before displaying. However, there are at least 6 incompatible versions of EBCDIC (all having non-contiguous letter sequences and missing punctuation characters). In order to support all of these mappings (and more), V defines a default mapping which can then be modified in the EBCDIC tab of the Preferences.

V supports files with variable length records (RECFM=V) and fixed length records (RECFM=F).

Click here for further details on viewing EBCDIC files.


The Ruler

The ruler makes it easy to determine the position of a particular character - you will no longer leave finger prints on your monitor as you count!

The ruler is displayed at the top of the File View and its format depends on the mode of the view.

Text Ruler

If the view is in Text mode, the ruler consists of a sequence of incrementing numbers (starting at 1) which indicate the column number of the character below. In this case, the length of the ruler is determined by the length of the longest line in the file.

Hex Ruler

If the view is in Hex mode, the ruler always consists of 16 hex offsets (from 00 to 0F) which indicate the offset from the start of the line of the corresponding hex bytes displayed below.

Floating the Ruler

The ruler may be dragged over any part of the file. The floating ruler may be removed by either double-clicking on it or by dragging it back to the top.

Starting Column

The ruler numbering usually starts at 1. To start from 0, right-click on the ruler with the Control key pressed and select the required option. Alternatively, you can press Ctrl+Alt+R to toggle the starting column.

Multiple Rulers

Up to 10 floating rulers may be displayed while viewing a file. To create a new ruler simply drag it from the top (fixed) ruler. To close a ruler, double click on it. To close all rulers (but to remember their position), double click on the fixed ruler. To redisplay the floating rulers in their last position, double click again on the fixed ruler.

Displaying Grid Lines

Right-clicking (or shift-clicking) on the ruler will cause a vertical grid line to be drawn at the clicked column position. The grid line will disappear once the button is released.

The color of the grid line can be customized in the File View section of Change Colors (selected from the View menu).

Notes

· In Text mode, the ruler can be shifted by one character to the right (ie, the first column will be treated as column 0 instead of column 1) by setting the Start Text Ruler at 0 option in the Preferences Dialog box.
· The ruler is always displayed in the same font as the file.
·


Line Numbers

When viewing the file in Text mode, the corresponding number of the line can be displayed to the left of the line by enabling the Line Numbers option in the View menu. The line numbers display can also be toggled by pressing the line numbers icon in the toolbar.

Look at the Line Numbers Configuration section for further details on how to customize the line number display.

Line Numbers in Chunks

If a file is being viewed in chunks, V will display the correct line numbers as long as consecutive chunks are loaded. However, if you load a chunk without having viewed the previous chunk, V will start the line numbers from 1.

For example, if you load the last chunk in the file after having loaded the first chunk, the line numbers in the last chunk will start from 1. If you need to know the exact line number, you will have to load the entire file.

Notes

Line numbers always start at 1.

The line numbers are not fixed. That is, the line numbers are scrolled off the screen when the line is scrolled horizontally. You can fix the line numbers (so they do not scroll) by enabling Fix Line Numbers from the Fix LHS submenu of the View menu.

Although line numbers in Text mode are optional, the hex addresses in Hex mode are always displayed.


Line Wrapping

When a line is too long to fit in the view, horizontal scroll bars appear at the bottom of the view, allowing you to scroll through the entire line. The horizontal scroll bars will appear when at least one line of the file being viewed is wider than the width of the view.

Sometimes scrolling through lines is not very convenient, particularly if a file contains many really long lines. In this case, lines can be wrapped. Lines may be wrapped in several ways:

Wrap to Screen

The lines are wrapped so that all text fits inside the file view. In this case, the horizontal scroll bars disappear. Screen wrapping may be toggled by selecting the Wrap to Screen command from the View menu, pressing the Wrap to Screen button on the toolbar, or by pressing Alt-W. Wrapping text to the screen may be permanently enabled by setting the Wrap lines to screen option in the Preferences Dialog box.

Wrap to Length

In this case, the lines are wrapped whenever they reach the wrap length. Wrapping may be toggled by selecting the Wrap to Length command from the View menu, pressing the Wrap to Length button on the toolbar, or by pressing Alt-L.

The wrap length may be quickly changed by selecting the Set Wrap Length command from the View menu, or by pressing Ctrl-W. You may enter a new wrap length, or select a previously used length from the list.

Wrap on Word Boundary

Normally, lines will be wrapped at the exact position where they exceed the width of the view (if wrapping to screen), or the wrap length - even if it happens to be in the middle of a word. To ensure that lines are not split mid-word, select the Wrap on Word Boundary option from the Preferences Dialog box.

Wrap Here

Flat text mode allows you to display the text file as fixed length records by specifying a record length (or wrap length).

Using the "Wrap Here" command, you can easily change the wrap length without actually entering a number.

All you do is right click on the position where you want the first record to end (or wrap) and then select "Wrap Here" from the Wrap menu.

Note

The Wrap Lines to screen option in the Preferences Dialog box, does not apply to printing. There is a separate option in the Print Dialog box which enables line wrapping when printing. However, the Wrap on Word Boundary option applies to both printing and display.


Column Fixing

When viewing a file, the display may be fixed at a certain column position so that any text to the left of the fixed column will always be visible (ie, it will not scroll off the screen). To do this, select the Fix Column option from the View menu. Select Set Fixed Column to specify the column position.

You may also just fix the line numbers by selecting the Fix Line Numbers option from the View menu.


DOS/OEM Character Set

Most Windows applications use the ANSI character set to display text. The actual character displayed depends on the font selected.

Before Windows and GUI programs existed (in the DOS days), special line drawing characters were used to "draw" simple boxes and frames in standard text files. These special characters were a part of what was called the OEM or IBM character set.

Windows (True Type) fonts do not usually support these line drawing characters. These characters will usually be replaced by some strange symbol.

However, some fonts (like Courier New) support both ANSI and OEM character sets. By selecting the DOS/OEM Char Set option (from the View menu) the OEM character set will be selected (if available), and your lines and boxes will be drawn correctly.

Note that this will only work if the selected font supports the OEM character set. If it doesn't, this option will have no effect. For example, an OEM character set is available for Courier New but not for Courier.

Note: The /OEM and /ANSI options may be used on the command line.


Display Fonts

The file is displayed using the currently selected Screen Font which is specified in the Preferences.

If you find that you regularly use different fonts, you may create a fonts list and then select the required font from the Fonts menu.

To create or modify the fonts list, select Fonts->Organize from the View menu.

Organizing fonts is similar to Organizing Favorites or User Commands.

Once a font has been added to the list, it may be selected from the View->Fonts menu.

A shortcut key can also be assigned to a font so that the font will always be selected whenever the corresponding shortcut key is pressed.

Note: V maintains different fonts for text and hex modes.


Greenbar Mode

Files can be viewed (and printed) with a greenbar effect. This is where each alternating line is a different color. To enable, simply press the Greenbar icon in the toolbar.

Greenbar Options

The greenbar effect can be customized by clicking on the small arrow next to the Greenbar icon on the toolbar.

Greenbar Background Color

Click on this button to select the Greenbar color. Right-click on the button to select one of several pre-defined colors. You can select a different greenbar color for display and printing.

Number of lines to greenbar

By default, the greenbar color will alternate after every line. This option allows you to increase the number of consecutive lines that are "greenbarred".

Start greenbar at line 1

Enable this option if you want the greenbar coloring to start from line 1.

Do not greenbar line numbers

If you enable this option, the greenbar colors will not extend to the line number portion of the line.

Do not change color for wrapped lines

Enabling this option ensures that the greenbar color does not change if it has been wrapped. That is, the entire line will be displayed in the same color, regardless of how many lines it wraps to.


File Attributes / Line Lengths

If the File Attributes command is selected in text mode, the dialog box that displays the file attributes will contain an extra 4 lines of file details:

Longest Line

Displays the length (and number) of the longest line in the file.

Shortest Line

Displays the length (and number) of the shortest line in the file - including empty lines. That is, if the file contains an empty line, this length will be zero.

Shortest non-empty

Displays the length (and number) of the shortest non-empty line in the file. That is, this length will never be zero

Line Terminator

Displays the character (or character pair) used by the file to delimit lines. Depending on the origin of the file, the character(s) used to terminate lines are usually one of:

CR | The terminator is a single carriage return character (hex 0D). This terminator is uncommon.
LF | The terminator is a single line feed character (hex 0A). This is the standard terminator used on Unix systems.
CR/LF | A carriage return followed by a line feed is used to terminate lines. This is the standard terminator used on PC based systems.
LF/CR | As above, but the line feed is placed before the carriage return. This is very uncommon.
CR/CR | Two carriage returns are used to terminate lines. This is also very uncommon.

Notes

This extra information is not displayed if the file is being viewed in hex mode, or if the File Attributes command has been selected from the Directory View.

If multiple lines share the same length, only the first line in the file with that length is displayed.

If a file chunk is being viewed, the line length information only applies to the lines in that chunk, and not the entire file.

The number of lines in the entire file (together with the total number of words) may be displayed by selecting Word/Line Count from the Tools menu.


Hex Mode

Use this command to view a file in Hex format. This mode is generally used for binary (non-text) files, although text files can also be viewed in Hex mode.

Vertical Hex mode can be enabled by selecting Text+Vertical Hex from the View menu (or by pressing Alt+J). This is a cross between Text and Hex modes.

Click here for further details on viewing files in hex (and vertical hex) mode.


File Tailing

File Tailing refers to the ability to automatically refresh a file as it is being modified.

By default, File Tailing is disabled. To enable it, press the Tail icon on the toolbar (or select Tail from the File menu).

If data is added to the file while you are viewing it, it will automatically be updated. There is no need to press the Refresh button to see any changes since the file was loaded.

This is particularly useful when viewing log files while they are still being updated.

Because there is some overhead in File Tailing, it is best not to enable it when it is not needed. To overcome the problem of the user accidentally leaving File Tailing enabled, V always disables File Tailing on startup.

If you want V to restore its previous Tailing state on startup, enable "Save File Tailing state" (in the File Options tab of Preferences).

Tailing on Network Drives

Tailing relies on notifications from the operating system whenever a file has been modified. These notifications are not always sent for network drives. In particular, they are usually not sent for Unix network drives. Under such circumstances, file tailing will not work.

Note

File Tailing only applies if data is added to the end of the file. If any other part of the file is updated, V will not automatically update it.


Viewing the Clipboard Contents

The File menu contains a View Clipboard submenu that displays the different types of data that are stored in the Windows clipboard (if any). Selecting the various data types will cause V to view the corresponding data just like it was viewing a file.

Notes

V can only view the clipboard data as text/hex. It cannot launch another program to view the clipboard data. For example, it cannot launch your image viewer to view bitmap data. However, you can save the data to a file and then use your image viewer to view that file.

Some data types cannot be viewed. If this is the case, the data type will be disabled on the menu.

The clipboard contents can be printed - just like a normal file.


Split File View

The File window can be split in two by clicking on the Split Screen button on the toolbar and selecting Horizontal or Vertical Split Mode. It can also be split from the Split submenu of the View menu, or by pressing Alt+S. This allows you to view different parts of the same file in different windows. Below is an example of a file which has been split horizontally.

Synchronized scrolling is enabled by default. Click here for further details on synchronized scrolling.

Note that both windows must use the same display mode. For example, you cannot have one window in hex mode and the other in text mode. Also, if you enable line wrapping, the wrapping will apply to both windows.


Synchronized Scrolling

By default, synchronized scrolling is enabled when the file view is split.

For example, if the file is split horizontally, you can use either of the horizontal scrollbars to scroll both views simultaneously (the vertical scrollbars work independently of each other). Similarly, if the file is split vertically, either of the vertical scrollbars can be used to scroll both views vertically.

You can disable synchronized scrolling by pressing the Split Screen button on the toolbar and selecting Split Options. This allows you to modify the following options:

Disable Horizontal Synchronized Scrolling (in Horizontal Split Mode)

This disables horizontal synchronized scrolling when the file view is split horizontally. When enabled, the horizontal scrollbars will work independently of each other. Note that vertical scrolling is never synchronized when the file view is split horizontally.

Disable Vertical Synchronized Scrolling (in Vertical Split Mode)

This disables vertical synchronized scrolling when the file view is split vertically. When enabled, the vertical scrollbars will work independently of each other. Note that horizontal scrolling is never synchronized when the file view is split vertically.


Multiple File Windows

Up until Version 8, V was always a "one window" program. When you viewed a file, the directory listing would be *replaced* by the file window. If you wanted to view the file in a separate window, you would have to launch another instance of V. One instance of V would display the directory listing and the other would display the file.

As from Version 8, you can have more than one file open at once - and the directory listing will still be visible while you are viewing the file.

CLASSIC Mode

V can still operate as a "one window" program - this is now called CLASSIC mode. You can enable CLASSIC mode from the Window Layout tab of Preferences or by selecting Options from the View menu.

Click here for further details on viewing multiple files.


Viewing Multiple Files

By default, every file you view will be displayed in a separate window. If you prefer to only have one file window open at a time, enable "Use existing File window to view new file" in the Window Layout tab of Preferences.

If you enable this option, you can still view files in a separate window by pressing the SHIFT key when you view the file.

Viewing Multiple Files from the Command Line


Viewing Multiple Files from the Command Line

You can view multiple files from the command line - each of the specified files will be opened in a separate window.

For example, "V File1.txt File2.txt" or "V *.txt".


Arranging File Windows

By default, when you view multiple files, the file windows will be positioned so that the new file window slightly overlaps the previous window. If you rearrange the multiple window position, V tries to maintain this position when it opens multiple files.

You can tile the files by selecting the desired tiling option from the Window Layout menu (Vertical, Horizontal or Auto-Arrange). If you tile the files vertically, each file window will have the same height as the screen. Each window will have the same width and be placed next to each other so they completely fill up the screen.

The image below shows 2 file windows, tiled vertically.

Automatic Tiling

Multiple file windows can be automatically tiled by enabling "Automatically Tile multiple file windows" in the Window Layout tab of Preferences. That is, once a second (and subsequent) file is opened, V will automatically tile all the file windows.

File windows can also be "Auto-Arranged". Click here for further details.


Auto-Arranging File Windows

File windows can be auto-arranged based on a "grid size" which you define in the Window Layout tab of Preferences.

To see how auto-arranging works, consider a grid size of 3 x 3. With 2 or 3 windows open, they will be tiled vertically. When the user opens up a fourth file, they will be displayed in a 2 x 2 grid (as in the image below). When a user opens up a fifth and sixth file, the first 3 files will be displayed on the top and the remaining 2 (or 3) files will be displayed on the bottom. If the user opens up a seventh file, V will display the files in 3 rows of windows. The first 2 rows will contain 3 windows each, and the third will contain the seventh file. The eighth and ninth file will also be displayed on the 3rd row.

Because the grid size is only 3 x 3, the automatic arranging will stop with the ninth file. Should the user open up a tenth file, it will be displayed in a normal overlapping window.


Synchronized Scrolling

When multiple files are open, scrolling can be synchronized by right-clicking on the scrollbar and selecting Synchronize Scrolling. Once enabled, whenever one window is scrolled (either via the keyboard or the mouse), all other file windows are also scrolled by the same amount.

Horizontal and vertical scrolling are separate. Enabling synchronized scrolling by right-clicking on the vertical scrollbar will only synchronize vertical scrolling. If you also want horizontal scrolling to be synchronized, you also need to right-click on the horizontal scrollbar and select Synchronize Scrolling.

Notes

Synchronized scrolling only applies to multiple file windows - it does not apply to the directory listing.

This is different to the synchronized scrolling which is available when the file view is split.


Hex Mode

Files displayed in hex mode look something like this:

Hex mode displays a file as a series of hexadecimal (base 16) numbers together with the corresponding ASCII character equivalent (this is also known as Debug Format).

The first 8 digits on each line represents a hex address which indicates the position (or offset) of the corresponding line in the file. This is followed by up to 16 hex numbers (or bytes) which correspond to the file data.

The right hand side of the view consists of the ASCII character representation of the corresponding file data If the hex byte does not correspond to a printable ASCII character, it is displayed as a "." (dot).

If the Display ALL hex codes option is enabled, all codes will be displayed on the right hand side instead of a dot. The character displayed depends on the selected font, and will usually not be unique for each control character.

Click here for a description of the various hex formats available.

Note

By default, each line displays 16 bytes of data, although the line length can be changed


Hex Formats

When in Hex Mode, the file may be viewed in one of several hex formats which are selected from the View menu (under Hex Formats) or from the right-click menu (Layout->Hex Formats).

The left side of the hex display contains a hex representation of the file data . The right side shows the corresponding text character. If a character is unprintable (eg, a null) a dot (".") will be displayed.

The available formats are:

Byte

This is the default format. Each character in the file is displayed as an individual hex code (from 00 to FF).

Word

The data in the file is displayed as 16-bit words (always in hex)

DWord

The data is displayed as 32-bit double words (in hex)

Double DWord

The data is displayed as 64-bit quad-words (in hex)

Unicode (Word/UTF-16)

This is the same as the Word format except that the right side of the line is displayed as 16 bit Unicode characters (instead of 8 bit ASCII).

Decimal

Similar to the Byte format, except each byte is displayed in DECIMAL (from 0 to 255).

Octal Byte

As above, but each byte is displayed in OCTAL (from 0 to 377).

Octal Word

As above, but the data is displayed as octal words instead of bytes (from 0 to 177777).

Flip Ends

This only applies when in Word, DWord or Double DWord mode. The "ends" of each "word" are "flipped". This makes it easier to view data that is stored in little-endian format.

By default, each line displays 16 bytes of data, although the line length can be changed.

Note

The file offsets are always displayed in Hex.


Hex Line Length

By default, each line in hex mode contains 16 bytes.

This can be changed by selecting "Hex Formats"->"Set Hex Line Length" from the View menu (or pressing Ctrl-W).

The line length must be a multiple of the format size.

For example, if the data is being displayed as "words", the length must be a multiple of 2 (the size of a word).


Hex Font

A different font can be used to display files in text and hex modes, although by default, these fonts are the same.

If you change the font in hex mode, the font will not be changed in text mode.


Vertical Hex Mode

Vertical Hex Mode is enabled by pressing Alt+J (or selecting Text + Vertical Hex from the View menu). Vertical Hex mode looks as follows:

The file is displayed one line at a time (just as in text mode). However, each line is followed by 2 lines containing the hex code of each character in the line.

The 2 lines need to be read vertically. That is, the first line contains the first nibble (4 bits) of the code and the second line contains the second nibble.

In the example above, the first character in line 1 is ZERO, which is 30 in hex. Therefore, the first character in line 2 is 3 and the first character in line 3 is 0.


CSV Mode

CSV files (Comma Separated Values) are typically used to represent tabular data, where each line in the file represents the row of a table. Each line contains the text of each column in the row, separated by a comma (although other characters can also be used as the delimiter - eg, a TAB).

By default, V will automatically recognize CSV files and will display them as a table - where all the columns have the same width (much like a spreadsheet). Although unlike a spreadsheet, the column widths in V are fixed (determined by the longest entry in the column) and cannot be resized.

You can press the arrow button next to the CSV Mode button in the toolbar to customize the CSV behavior. Press here to see what CSV options are available.

Press the CSV Mode button on the toolbar to toggle between CSV mode and standard text mode.

If V recognizes a file as a CSV file it will display it as a table (in CSV mode). For V to recognize a file as a CSV file, the first 2 lines in the file must contain the same number of delimiters. This means that a file containing a single line will never be (automatically) recognized as a CSV file. To display single line CSV files, you will have to use Force CSV.

If V does not recognize the file as a CSV file, you can enable CSV mode manually by pressing the CSV Mode button on the toolbar. This will allow you to view CSV files with lines containing varying numbers of delimiters.

If V still thinks that the file is an invalid CSV file, you can try forcing CSV mode by clicking the arrow next to the CSV Mode button on the toolbar and selecting Force CSV. You will then have to enter the character that the file uses as a delimiter.

The following is an example of what CSV mode looks like

and the following is the same file viewed in standard text mode


Text Selection

Selecting Column Text

As you Shift+drag the mouse over columns, only the columns that the mouse moves over are selected.

You can select an entire column by Shift+clicking on the column header.

Copying text to the Clipboard

In CSV mode, the Copy to Clipboard command (Ctrl+C or Copy/Cut from the Edit menu) copies the text exactly as it is displayed. That is, with spaces between each column and each column padded with spaces.

CSV Copy

The CSV Copy command (Ctrl+Alt+C or CSV Copy from the Edit menu) copies the selected text as it is stored in the file. That is, there is a delimiter between each column and each column is trimmed of trailing spaces.


CSV Options

The CSV options can be modified by pressing the arrow button next to the CSV Mode button in the toolbar.

When displaying CSV files in CSV mode, each line will be expanded so that the corresponding fields in each line start at the same column.

CSV Mode can be automatically enabled whenever a CSV file is viewed or it can be enabled/disabled by pressing the CSV Mode button in the toolbar or by clicking on CSV in the bottom right of the status bar.

The following CSV options are available:

Automatically recognize and display all CSV files in CSV mode

This is the default behavior. If V recognizes any file as a CSV file, it will display it in CSV mode.

Disable automatic CSV mode (only enable CSV mode from the toolbar)

If this mode is enabled, V will always open CSV files in standard text mode. The user can then enable CSV mode by pressing the CSV Mode button on the toolbar.

Only recognize CSV files with the following extensions

If this option is enabled, you can enter a list of file extensions, separated by spaces (eg, CSV DAT TXT). V will only attempt to display files with these extensions in CSV mode.

Recognize all files EXCEPT those with the following extensions

Similar to the above option, except that V will only attempt to display a file in CSV mode if the files's extension is not in the list of extensions.

Allow multi-line fields

Enable this option if you want fields in CSV files to span multiple lines. Click here for further details on multi-line fields.

Do not strip quotes from fields

If this option is enabled, V will not strip the double quote characters from fields that are quoted.

Note that V only strips quotes from the start and end of a field - it does not strip quotes from the body of a field. For example, two quotes are generally used inside a quoted field to represent a single quote. In this case, V will not strip the extra quote - it will always display both quotes.

Do not draw horizontal grid lines

If this is enabled, V will not draw the horizontal grid lines.

Grid line color

This lets you specify the color of the grid lines


Multi-line fields

There is no official specification for the CSV format, but it is generally considered that if you use double quotes, commas or line breaks in a field, the entire field should be enclosed in quotes.

Because V supports multi-line fields, it is important that quotes are used correctly. In particular, if a field begins with a quote, it must also end with a quote. If it doesn't, the file may not be displayed correctly.

By default, parsing of multi-line CSV fields is disabled.

This is because multi-line fields are rare and incorrect use of quotes is common. If multi-line fields were enabled, and V encountered a field which did not use quotes correctly, it could treat that field as a multi-line field and subsequent lines would not be displayed correctly.

Multi-line fields can be enabled by setting Allow multi-line fields in the CSV Options.

If you find some CSV files are not being displayed correctly, please disable this option to see if it fixes the problem.


Forcing CSV Mode

V will automatically try to determine the delimiter used by a CSV file. If it fails, you can manually specify the delimiter and V will try again to view the file in CSV mode.

To manually specify the delimiter, click on the arrow next to the CSV Mode button in the toolbar and select Force CSV and manually enter the delimiter used by the file.

Start at Line#

V expects the first line in a CSV file to be a valid CSV line.Sometimes this is not always the case. For example, the CSV data may begin after a few lines. In this case, V will not automatically recognize the file as a CSV file. To view this type of file in CSV mode, you will need to enter the line number of the first valid CSV line.

If V still cannot display the file in CSV mode, there is probably a problem with the CSV structure of the file.

If you think that the file is a valid CSV file, please send a copy to v@fileviewer.com

Notes

Once a new delimiter has been successfully used, V will always check for that delimiter whenever it tries to detect CSV files.

When using the command line, you can force CSV mode by using the /CVS:delimiter option (eg, V file.csv /csv:,)

You can also specify the start line on the command line after the delimiter (eg, V file.csv /csv:#,3)


Customizing the CSV column names

V assumes that the first line of a CSV file always contains the column headings. As this is not always the case, the first line will also be displayed as the first line of data. There is no option to disable this behavior.

If you regularly view the same CSV file, it is possible to customize the column headings.

To do this, select Edit Grid from the GridLines menu while you are viewing the file. Then right-click on each of the column headings and edit the column names.

Finally, select Save Grid from the GridLines menu and save the .vgrid file to the same directory as the CSV file (or to the Default Grid Directory if you have one).

Also, make sure that you enable Auto-Load Grids on the Grid Options submenu of the GridLines menu.

The next time you view the CSV file, the grid in the .vgrid file will be displayed instead of the first line of the CSV file.


Limitations of CSV Mode

Asian characters

Unfortunately, V will not correctly display CSV files containing Asian characters. If you try to view a CSV file which contains Asian characters, the Asian characters will usually be displayed as question marks.

Please let me know if this is something that you would like fixed. If enough users want to see this implemented, I will try to give it some priority.


Searching

The Find command allows you to search for a string (or sequence of bytes) in the file being viewed. It may be selected from the toolbar, the Edit menu, from the right-click menu or from a keyboard shortcut.

When you select the Find command, you will be presented with the Find dialog box, where you can specify your search. The Find dialog box contains the following:

Note that a Search Bar can also be displayed at the bottom of the file window. Click here for details.

Search for

Enter the string to search for.

Click here for several different ways of entering the search string.

Match Case

Usually V will ignore case (upper and lower) when searching for strings. Check this option if you only want V to find strings that exactly match the case of the string entered. Note that this option is disabled if the Binary Data option is checked.

Whole Word Only

Check this option if you are only interested in matching the entered text when it appears as a word. For example, searching for the string "soft" will usually find a match in "software". Setting this option, will not find a match in "software".

Regular Expression

This option indicates that the string specified in "Search For" is a regular expression. Click here for an explanation of regular expressions.

Binary Data (Hex)

This option indicates that the search string is a sequence of hex bytes rather than a text string.

Type of Search

This listbox is only displayed if BioInformatics/DNA search functionality is enabled in the Search Options and lets you specify if the search string is to be treated as an amino acid string or a string of IUPAC codes. Standard Search should be selected to indicate that the string is a plain string of text.

Direction

This specifies the direction of the search. If Forward is selected, the file is searched from the beginning to the end. If Back is selected, the search begins from the end of the file and goes backwards.

Unicode

This will search for the Unicode equivalent of the specified string. This is useful if you want to search for strings in a Win32 executable. If the file being viewed is a Unicode file, there is no need to enable this option.

Search from

Specifies from where the search is to commence. If Start is selected, the search will begin from the start of the file. If Current is selected, the search will begin from the current line. If the direction of the search is backwards, the Start option will be replaced with End. By selecting End, the search will commence from the end of the file.

Columns

You may restrict the search to a particular column or range of columns. Click here for further details on specifying column ranges.

Flip Search String

When viewing hex files in flipped mode, the this option is available to also flip the entered search string before searching.

Display Search Bar at bottom of the file window

This will display a Search Bar at the bottom of the file window that can be used instead of the Search dialog for searching.

Press the Count All button to count the number of times the search string appears in the file.

Press the Bookmark button to bookmark the lines that contain the search string.

Press the Options button to modify the search options.

The Search Again command (or Find Next) will search for the next occurrence of the entered text. Use Alt+A to continue the Find Next onto the next file.

Cancelling the Search

If V has not found the specified string within 5 seconds, it will display a dialog box which will let you cancel the search by pressing the "Cancel" button.

Notes

The Find Next command will always search forwards even if the previous search was backwards.

Ctrl+F3 can be used to search for the next occurrence of any highlighted text.


Search String

In its simplest form, a search string consists of a sequence of text characters.

By enabling the Binary Data (Hex) option, the search string is treated as a sequence of hex bytes (eg, FF096C3A). Do not enter any spaces between the hex bytes.

You can also use specify hex characters within a text string by using the \x hex notation. For example, the above sequence of hex bytes can also be entered as:

"\xff\x09\x6c\x3a"

If you use the \x notation, you will need to first enable "Allow hex characters in text search string" in the Search Options.

Notes

Case is not significant when entering hex data

When using \x notation, do not enable the Binary Data option

If \x notation is enabled and you actually want to search for "\x", you will need to enter "\\x"

The search string may also be selected from the drop-down list box which maintains a history of the most recently used strings.


Search Options

Pressing the Options button in the Find dialog box will allow you to modify several search options. The same options may be modified in the Search tab of Preferences.

Find Next from Current Position

The Find Next (or Previous) command will find the string immediately after (or before) the last string found - even if you have changed the file position. Enable this option to commence the search from the current file position (instead of the previous match).

Find Next from next line

By enabling this, V will ignore the rest of the line when doing a "Find Next" and will begin searching from the start of the next line.

Wrap to Start

By enabling this, V will continue searching from the start of the file once the end of the file is reached.

Do not center found text

This causes found text to always be displayed on the top line of the window - instead of being centered.

Do not center found text if it is already on screen

By enabling this option, if the string you are searching for is already visible, the window will not be scrolled when the string is highlighted.

Only "beep" if search fails

Enabling this will stop V displaying a "String not Found" message when no match is found.

Instead, a short beep will sound.

Always Start Ctrl-F search from the beginning

By default, pressing Ctrl-F (or starting a search) will start the search from the current position. Enabling this option will cause the search to always start from the beginning of the file.

Allow hex characters in text search string

This enable the use of the \x prefix to indicate a hex character when entering text strings.

Disable "Match Case Toggling" (using the \ key)

This disables Match Case Toggling. That is, the \ key behaves just like the / key.

Enable BioInformatics/DNA search functionality

This option must be enabled for the Bioinformatics/DNA search options to become available.


Search Count

Pressing the Count button in the Find dialog box will count the number of times the search string appears in the file.

The number of matches found will be displayed on the screen as V is counting. Press the Cancel button to stop the count.

If any text is selected before starting the count, the number of times the search string appears in the selection will also be displayed

Note: Each instance of the specified string is not highlighted after the count is complete.


Search Skip

Pressing the Skip button in the Find dialog box lets you skip over a specified number of matches.

For example, you can use this to find the 100th occurrence of a string in a file or to skip over 100 matches before continuing your search.

When the button is pressed, simply enter the number of matches to skip and press OK.


Column Search

When searching a file for text, you may restrict your search to a column or range of columns.

To do this, you must enable the Columns checkbox and enter the column (or range) in the space provided. The most recently used columns may be selected from the drop-down list box.

Only text that begins in the column (or lies in the column range) will be matched.

You may specify a column range in one of 2 ways:

n-m | Match strings that start anywhere between columns n and m
n- | Match strings that start anywhere after (and including) column n

You may also specify more than one column range by separating them with commas. The following are examples of valid column specifiers:

1 | Match if text starts at column 1 (ie, start of the line)
1-10 | Match if text starts in columns 1 to 10
1,12,80 | Match if text starts in column 1 or 12 or 80
1-5,20-29,80- | Match if text starts in columns 1 to 5, or columns 20 to 29, or starts anywhere after (and including) column 80

Using Regular Expressions to search for data in columns

Regular expressions can also be used to search for text in columns (and even for text not in a certain column). Click here for further details.


Bioinformatics/DNA Search

A Bioinformatics/DNA search option was introduced in V13 which lets you search for amino acid strings and IUPAC codes in files containing DNA sequences.

When doing a search, two new options are available - Amino Acid Search and IUPAC Search. When one of these options is selected, the search string is treated as either a string of amino acid codes or IUPAC nucleotide codes.

Only exact matches are found. Imperfect matches (as in BLAST searches) are not supported.

Amino Acid Search

When the Amino Acid Search option is selected, the search string is treated as a sequence of amino acid codes.

There are 20 valid codes which represent the 20 standard amino acids (ACDEFGHIKLMNPQRSTVWY). An X is used to indicate any amino acid and a * is used to indicate a stop codon.

V will search the file (containing DNA sequences) and will match any sequence that corresponds to the entered amino acid string.

IUPAC Search

When the IUPAC Search option is selected, the search string is treated as a sequence of IUPAC nucleotide codes.

There are 15 valid codes which correspond to the valid characters in the DNA/RNA alphabet (ACGTURYMKSYNDHV), and N is used to indicate any nucleotide.

Notes

The Bioniformatics/DNA options are hidden by default. They will only appear if the Bioniformatics/DNA search functionality has been enabled in the Search section of Preferences.

This functionality is still very much under construction and I am looking for user feedback to drive development.


Tips on using the Keyboard

The following keys can be used to initiate a search:

Normal Find

/ and Ctrl+F.

Find Next

F3, A, Ctrl+L, Ctrl+N

You can also use the SPACE key if Use SPACE as Find Next is enabled in the Keyboard tab of Preferences.

Ctrl+F3 can be used to search for the next occurrence of any highlighted text.

Alt+A (and Alt+F3) will continue searching the "next file" if no further matches are found in the file being viewed.

Find Previous

To search backwards, use any of the Find Next keys with the SHIFT key pressed.

Backwards Search

Using ? will always initiate a backwards search. That is, a normal search with the Direction option set to Back.

Match Case toggle

Using \ will initiate a search with the default "Match Case" option toggled.

That is, if you perform a normal search (eg, using /) with the Match Case option disabled, pressing "\" will initiate a search with the Match Case option disabled. If you perform a normal search with the Match Case option enabled, using "\" will disable the Match Case option.

You can disable this behavior by enabling Disable "Match Case Toggling" (using the \ key).


Scrolling

The File View may be scrolled in the standard ways - via the keyboard or the scroll bars.

Using the keys

PageUp and PageDown

Scroll the view one screen-full at a time in the specified direction.

UpArrow and DownArrow

Scroll the view vertically one line at a time.

LeftArrow and RightArrow

Scroll the view horizontally, one column at a time.

Ctrl-LeftArrow and Ctrl-RightArrow

Scroll the view horizontally by the width of the view.

Ctrl-Home and Control-End

Ctrl-End scrolls the window so the end of the current line is visible. Ctrl-Home scrolls the window to its leftmost position.

Home/End

The Home key goes to the start of the file and the End key goes to the end of the file.

If the Use Space as PgDown option is enabled, the SPACE key will behave like PageDown and Shift-SPACE will behave like PageUp.

Using the scroll bars

If you click on the arrows on either side of the scroll bars (vertical or horizontal), the view is scrolled by one line (or column) in the appropriate direction. Clicking on the area below the vertical scroll box (or slider) is equivalent to pressing PageDown and clicking on the area above the scroll box is the same as pressing PageUp. Similarly, clicking to the right of the horizontal scroll box will scroll the view to the right by the width of the view and clicking to the left will scroll the view to the left.

Dragging the vertical slider allows you to quickly move the file position. You may enable smooth scrolling in order to improve the file display while dragging.

Current Line Marker

Pressing the Up/Down arrow keys will move the current line marker (instead of scrolling the window). The window is only scrolled when the line marker reaches the bottom (or top) of the window. If you would like the window to always scroll on an arrow key, enable Always scroll window when using arrow keys in the File Options tab of Preferences.

If the window is scrolled using the scroll bars (with the mouse), V will automatically move the current line marker accordingly. If you prefer the current line marker to stay where it is, enable Do not move current line marker when using scroll bars.

Continuous scrolling

The view may also be scrolled continuously in the vertical direction. This is basically equivalent to continually pressing the UpArrow or DownArrow key.

To commence continuous scrolling, simply press Ctrl+Shift+DownArrow or Ctlrl+Shift+UpArrow depending on the direction in which you want to scroll. The view will then start to scroll automatically. The speed of the scrolling may be increased by pressing the + (PLUS) key and decreased by pressing the - (MINUS) key.

Continuous scrolling may be stopped by pressing the ESC key and paused by pressing SPACE. Once paused, the scrolling may be re-started by pressing SPACE again, or terminated by pressing ESC.The scrolling will stop when the top (or bottom) of the file is reached.

IntelliMouse Support

V makes full use of the Microsoft IntelliMouse. Click here for details.

Customizing the keys

All of the cursor keys can be customized by selecting Customize Keyboard from the Tools menu. For example, you can change the behavior of the Home/End keys so they go to the start/end of the line instead of the start/end of the file. The commands corresponding to the cursor keys (such as Line Up/Line Down) can be found in the Other submenu of the FILE commands.


Smooth Scrolling

The slider on the vertical scrollbar may be dragged to quickly change the position of the file. V will continually try to redisplay the file as the scrollbar is being dragged.

If you find the screen refresh during scrolling annoying, you may try to make it "smoother" by enabling "Smooth Scrolling" in the File Options section of Preferences.

To do this, you must specify a Smooth Delay which will be used to "slow down" the speed of the scrolling. Typically, a delay of between 50 and 200 will be used. If no delay is entered, V will use a delay of 180.

The delay specified will depend on the speed of your system. If you find the scrolling too slow, enter a smaller delay. If the screen "flashes" too quickly during scrolling, enter a larger delay.

Note

The V smooth scrolling is different from, and independent of the "smooth scrolling" which is available in programs like Internet Explorer.


IntelliMouse Support

The Microsoft IntelliMouse is a mouse with a small wheel between the two mouse buttons. The wheel can be used to scroll windows without having to move the cursor over the scroll bars.

V supports the IntelliMouse as follows:

When viewing a file, scrolling the IntelliMouse wheel will scroll the document three lines at a time.

· If the SHIFT key is pressed while scrolling the wheel (or if the wheel itself is pressed), the document will be scrolled a screen at a time.
· If the wheel is scrolled while it is pressed and the SHIFT key is also pressed, continuous scrolling will begin. Pressing the wheel will pause/restart the scrolling. Pressing the wheel while the SHIFT key is pressed will stop the scrolling.
· If the CONTROL key is pressed as the wheel is scrolled, the Previous/Next document in the File List is displayed.

Note

In order for the operations requiring a wheel press to work correctly, you must "Turn on the wheel button" in the IntelliMouse setup (in the Control Panel) and set the "Button Assignment" to "Default".


Goto

The Goto dialog box allows you to specify a location in the file to jump to. The specified location will be displayed at the very top of the File View. You may enter the location either as a Line Number, Column Number, Offset, Page#, Record# or Chunk by selecting the appropriate option.

Note that Page# is only enabled if the file is paginated.

Record Numbers

A record is different from a line in that it is always a fixed length (and it doesn't have to end with a newline character).

If the file being viewed consists of fixed length records, the record length will automatically be placed in the Length field. If the file does not consist of fixed length records, you may specify your own record length (although it probably wouldn't make much sense to do this).

The other options in the Goto dialog box are:

Hex

This specifies that the Offset entered is in hex instead of decimal.

From End of File

This indicates that the specified location is to be treated as being from the end of the file. For example, if you enter a Line Number of 100, V will position the view 100 lines from the end of the file.

Notes

It is quite valid to goto a file offset while in text mode. In this case V will simply goto the line which corresponds to the offset entered.

On the other hand, it is not possible to goto a particular line number if the file is opened in Hex mode (unless the file has also been opened in Text mode). In this case, the Line Numbers option in the Goto dialog box is disabled.

If the file is being displayed in chunks, the numbers in the Goto dialog box are relative to the start of the file. Click here for further details.


Goto and Chunks

All entries in the Goto dialog are relative to the start of the file, regardless of which chunk is currently being viewed.

For example, if you were viewing the last chunk of a file, going to line 1 will take you to the very first line of the file (not the first line of the chunk).

You can also enter numbers outside the current chunk.

For example, if you were viewing the first chunk (which contained 1000 lines), you could enter line 5000 in the Goto dialog.

In this case, V would load the chunk that contained line 5000.

Note that V may take some time to locate the required position (especially if you are viewing a very large file). If the time taken is more than five seconds, a Cancel button will be displayed which will allow you to stop the goto operation.

Note

This behavior was introduced in Version 7. In prior versions, the line number was restricted to the current chunk.


Bookmarks

Bookmarking allows you to remember the current file position so that you can easily return to it.

V implements two types of bookmarking - numbered and traditional.

Numbered bookmarking allows you to create up to 10 bookmarks (numbered from 0 to 9). Click here for further details.

Traditional bookmarking allows you to bookmark a line by pressing Ctrl+F2. Pressing Ctrl+F2 again will clear the bookmark. Unlike numbered bookmarks, there is no limit to the number of traditional bookmarks you can have.

Bookmarked lines will be displayed in a different color. When multiple lines have been bookmarked, pressing F2 will take you to the next bookmark in the file and pressing Shift+F2 will take you to the previous bookmark in the file. All bookmarks in the file can be cleared by pressing Ctrl+Shift+F2 or by selecting Bookmarks->Clear All Bookmarks from the Edit menu.

Search and Bookmark

The Search dialog box contains a Bookmark button. Pressing this button will bookmark all lines that contain the search string. If you are using the Search Bar, you can right-click on the Find Next button (down arrow) to bookmark lines containing the search string. The number of bookmarked lines will be displayed in the status bar. Click here for further details on bookmarking from the Search Bar.

All bookmarked lines can be copied to the clipboard by selecting Copy Bookmarked Lines from the Bookmarks submenu of the Edit menu. All bookmarked lines can be saved to a file by selecting Save Bookmarked Lines from the same submenu.

Copy/Save Unbookmarked Lines are the inverse of the above. That is, all the lines that are not bookmarked will be copied/saved.

By default, V will clear all bookmarks when it exits. If you want the bookmarks saved so they will be available every time you view the file, enable Save Bookmarks on Exit in the File Options tab of Preferences.

Note

The color of the bookmarked lines can be changed by selecting Customize Colors from the Tools menu.


Numbered Bookmarks

Up to 10 bookmarks (numbered from 0 to 9) may be set by either selecting the appropriate bookmark number from the Edit->Bookmark->Set Numbered menu, or by pressing Alt-0 to Alt-9 (for bookmarks 0 to 9 respectively). Bookmarked lines are displayed in a different color.

Once a numbered bookmark has been set, it may be restored by selecting it from the Edit->Bookmark-> Goto Numbered menu. Alternatively, it may be restored by pressing Ctrl-0 to Ctrl 9.

Numbered bookmarks are global. That is, you can save a bookmark in one file and restore it while you are viewing another file.

Notes

Numbered bookmarks not only save the current file position, but they also save the current file mode (ie, text or hex).

Unlike traditional bookmarks, numbered bookmarks can not saved when you exit V. That is, every time you start V, all numbered bookmarks will be cleared. If you want to save a numbered bookmark, you should use Favorites and assign a shortcut key to the Favorite created..


Sending selected text to your browser

V does not underline hyperlinks in files - such as http://www.fileviewer.com/, or create clickable hotspots like a browser does.

However, if a text file contains a URL, you may open the URL in your browser (not in V) by highlighting the text that forms the URL, right-clicking and selecting Open Selection in Browser.

You may also simply right-click over the URL (without selecting the actual text).

Notes

You do not have to highlight the entire URL - any part of the URL (even just one character) is sufficient.

If you only want to send part of the URL to the browser, simply select exactly what you want sent, and then press the Shift key when selecting Open Selection in Browser.


Open Selection in V

While viewing a file, you may highlight some text and then select "Open Selection in V" from the File menu. The selection will be treated as a file name, and if it exists, will be viewed by V.

If you have enabled Multiple File Windows, the file will be viewed in a separate window.

Alternatively, you can simply right-click on any part of the file name (without having to highlight anything) and then select "Open Selection in V". Note that this will only work if the file name does not contain any spaces. If it does, you will need to highlight the entire file name.

Note: If you select a directory name instead of a file name, the directory will be displayed in the Directory View.


Maintaining File Position

When viewing a file, the file position when last viewed is restored. This means that if you are quickly swapping between 2 files (using the Previous/Next commands), the file positions will not be reset to the beginning of the file.

You can disable this behaviour by enabling the Do not restore file position option in the File Options tab of Preferences.

Note that the file positions are only remembered while V is active - they are not saved when you exit V.


Paginated Files

A paginated file is one that contains form feeds (ASCII 12).

V will automatically paginate files that contain form feeds, displaying a page marker (dotted line) before the first line in each page.

By enabling Page Up/Down go to start of page in the Keyboard tab of Preferences, V will always scroll to the first line in a page when pressing Page Up/Down.

If you press Ctrl+Shift+Page Up/Down, V will scroll to the next page, but maintain the current position in the page. For example, if you are currently on line 10 of page 1, pressing Ctrl+Shift+Page Down will take you to line 10 of page 2.

Do not enable this option if you want Page Up/Down to behave normally (ie, scroll by the length of the window).

Line Numbers

By default, V will increment the line number for each line in the file. If you want the line number of each page to always start at 1, enable the Reset Line Numbers on New Page option.

Note

If you don't want V to paginate the files, select End Of Line->Ignore Form Feeds from the View menu.


The Search Bar

The Search Bar is displayed at the bottom of the file window.

If it is disabled, it can be enabled by pressing the Search Bar icon (binoculars) in the bottom left of the Status Bar: StatusBar

The Search Bar can also be enabled by setting the Display Search Bar at bottom of the file window option located at the bottom of the Search dialog box.

If the Search Bar is displayed, it will be used for searching instead of the Find dialog. To search, simply enter the search string in the "Find" box and press the Enter key. You can also click on one of the arrow buttons to search in the required direction (forwards or backwards).

If the search bar is not wide enough to display all of the search options, you can right-click on any empty area of the search bar to select the required option. This right-click menu also allows you to modify several other search options.

After doing a search, you can click on the arrow buttons to do a Find Next (down arrow) or Find Previous (up arrow).

String Count

Right-click on the Find Next Match button (the down arrow) and select Count All to count the number of times the search string occurs in the file.

Bookmarking

Right-click on the Find Next Match button and select one of the Bookmark options to bookmark/unbookmark all the lines that contain the search string. Click here for further details on bookmarking.

Favorite Searches

By clicking on the "Favorites Searches" button and selecting "Add Search", the current search is added to the list of Favorite Searches. The user can them perform this search by simply clicking on the Favorite Searches button and selecting the search from the list.

Organize/Configure can be selected from the Favorite Searches menu to modify the search or customize the menu (similar to how Favorites are organized).

Highlight All

Enabling Highlight All will cause V to highlight every occurrence of the selected text (this does not work in hex mode or for multiline selections). For example, if you double-click on a word, all occurrences of that word will be highlighted. Note that the Highlight All selections are not sticky. That is, they will disappear as soon as you click the mouse to clear the text selection. The lines containing highlighted text can be colored differently so that they stand out more. See below.

Search Bar Options

You can customize some of the Search Bar functionality by right clicking on the Search Bar and selecting "Search Bar Options" or by clicking on the two small arrows at the very right of the search bar.

Only display after first search

By default, if the Search Bar is enabled, it will be displayed as soon as a file is viewed. By enabling this option, the Search Bar will be hidden when the user first views the file, and will only be displayed once the user starts searching (by clicking the Find button in the toolbar or by using a search key).

Do not use when searching from toolbar

If the Search Bar is enabled, clicking on "Find" in the toolbar will move the cursor to the Search Bar for the user to enter the search text (instead of displaying the dialog box). By enabling this option, the default Find dialog will be displayed instead. If a search key is used (like '/' or Ctrl+F), the cursor will still be moved to the Search Bar.

Automatically Search from Favorites

Selecting a search from Favorite Searches only updates the search bar with the search text/options. The user still needs to click on a search button to perform the search. By enabling this option, the search is performed as soon as the favorite is selected.

Automatically apply when file is loaded

If Highlight All is enabled, enabling this option will automatically start highlighting text as soon as the file is loaded (using the most recent search string). If this option is not enabled, highlighting will only commence after the user does a search (or clicks on the Refresh button).

Colors

Five colors can be defined in the Search Bar Options. These colors can also be set by selecting Change Colors from the View menu.

Text/Background

This is the color that will be used to display the "highlight all" text.

Line Text/Background

This color will be used to display any non-matching text on lines that contain highlighted text. This makes it easy to see what lines contain matches.

Line Numbers

This color will be used to display the line number of all lines that contain highlighted text.


Bookmarking from the Search Bar

When you right-click on the Find Next Match / Find Previous Match buttons on the Search Bar, you will be presented with four bookmarking options:

Bookmark All

This will bookmark all the lines in the file that contain the search string. Note that any existing bookmarks will be maintained.

Bookmark From Here

This will bookmark all the lines from the current file position that contain the search string.

Unbookmark All

This will unbookmark all the lines that contain the search string. That is, if a bookmarked line contains the search string, the bookmark will be cleared.

Unbookmark From Here

This will unbookmark all the lines from the current file position that contain the search string

Example

You can use a combination of the above to bookmark all lines that contain "table" but do not contain "outdoor" as follows:

1. Enter "table" in the Search Bar, right-click on the Find Next Match button and select Bookmark All. This will bookmark all lines that contain "table".
2. Enter "outdoor" in the Search Bar, right-click on the Find Next Match button and select Unbookmark All. This will search the bookmarked lines (ie, the lines that contain "table") and clear any lines that also contain "outdoor".


Continuing Search onto Next File

By default, V only searches the file being viewed for the search string. In particular, doing a Find Next will fail to find anything if no further matches of the search string can be found.

However, doing a Find Next using Alt+A (or Alt+F3), will cause V to continue searching the "next file" for further matches. If it finds any, it will load the new file and display the next match.

What is the "next file"?

You can always tell what the "next file" will be by placing your mouse over the Next File icon in the toolbar (the icon with the small right-arrow). Alternatively, you can click on the File List icon (small down-arrow) to display an ordered list of the files.

Note

You cannot search backwards across files.


How to mark blocks

Several very useful operations can be performed on marked blocks (or selected text).

See the following sections for further details:

Status Bar

Selecting Words

Marking Columns

Adding Columns

Copying to the clipboard

Copying to a file

Blocks can be marked in several ways:

Using the Keyboard

Click here for further details.

Mark with mouse

A block may be marked in the usual method of holding down the left mouse button and dragging it over the text to be selected, releasing the button when the required text has been highlighted.

Specifying the start and end positions

This method is useful when marking very large blocks, or in hex mode, when you want to mark a specific address range.

To mark the start of a block, simply right-click on the corresponding character (or hex bytes) and select Mark Block->Start Point. To select the end of the block, scroll to the appropriate position in the file, right click on the corresponding character and select Mark Block->End Point. Once the start and end points have been specified, V will highlight the appropriate area.

Note that the end of the block may be marked before the start. Also, once a block is marked, it may be modified by choosing a new start or end point.

V will draw a marker around the start (or end) of a character to indicate the start (or end) marker. This marker will remain visible until it is cleared (by right-clicking and selecting Mark Block->Clear) or moved (by selecting a different position).

Note that the color of the marker may be specified by selecting Change Colors from the View menu.

Marking to End or Start

This method is similar to the above, except you only need to specify one point in the file (by right clicking at the appropriate location). The second point will either be the end or the start of the file. To mark a block from a character position to the end of the file, right click on that character position and select Mark Block->To End. Similarly, to mark a block from the start of the file to a character position, right-click on the end character position and select Mark Block->To Start.

Offset from current position

You may mark an exact number of characters from a file position by right-clicking on the file position, choosing Mark Block->Plus Offset (or Minus Offset) and then specifying the number of characters to mark.

Marking the entire file

The entire file may be marked by selecting Select Block->Entire File from the Edit menu, or by right-clicking and selecting Mark Block->Entire File. The entire file may also be selected by pressing Ctrl-A.

Selecting a word or line

To highlight an entire word, simply double-click anywhere on the word. Usually, only alphanumeric characters and the underscore are used to determine what constitutes a word. To use a more extended character set to select a word, press the shift key while you double-click. For example, double-clicking at the start of "http://www.fileviewer.com/" will only highlight "http". However, by also pressing the shift key, the entire URL is highlighted. Click here for further details on how to customize this behaviour.

To select the entire line, simply press the control key while you double click anywhere on the line.

If you double-click on a word (to select it) and then move the mouse before releasing the left mouse button (to select further text), V will always end the selection at the end of a word.

Extending the selected text

Once text has been selected, it can be extended (or shortened) by shift-clicking on the new end (or start) position. That is, click on the new end position while the shift key is pressed.

Marking Columns

Click here for details on how to select text in a particular column range.

Notes

· Pressing Ctrl+F3 will search for the next occurrence of any highlighted text.
· When HEX data is highlighted, both the Hex and Character views of the file are highlighted.
· Clicking the left mouse button on any part of the file view will clear any marked block (but it will not clear any block marker).


Using The Keyboard

Text selection via the keyboard is achieved as in most text editors - and usually involves using the cursor keys together with the Shift key. In particular:

Shift+DownArrow will select the current line.

Shift+RightArrow will will increase the text selection by one character.

Shift+End will select to the end of the current line

Shift+PageDown will select an entire "page" of text

Selected Text and Scrolling

Unlike most text editors, V does not clear any selected text when the keyboard is used for scrolling. That is, as you scroll the file with the arrow keys, any selected text remains selected. The selected text will remain selected until you either start a new text selection or you left-click on the file with the mouse.

The selected text can also be cleared by pressing the key associated with the Clear Selected Text command. There is no default keyboard shortcut to do this, but you can customize the keyboard to assign a key to Clear Selected Text (which is in the Other submenu of FILE).


Status Bar

The bottom left section of the status bar will display details of the selected text as it is being highlighted.

In text mode it will display:

· The line and column number of the start and end positions of the selected text
· The total number of characters in the selected text (in decimal and hex)
· If the Hex offset in status bar option is enabled, the hex offsets corresponding to the start and end of the selected text will also be displayed.
· If highlighting a column, V will also display the sum of the column data if the column consists of numbers.

In hex mode it will display:

· The start and end offsets of the selected text (in hex)
· The number of characters in the selected text (in decimal and hex)


Selecting words

While viewing a file, V will highlight an entire word by double-clicking anywhere on the word. By default, a word is defined to consist of alphanumeric characters (ie, a-z, A-Z, 0-9) and an underscore .

Pressing the shift key while double-clicking on a word uses an extended character set to determine what characters to highlight. By default, the extended character set consists of all alphanumeric characters and any character not contained in the following:

    "'!$=;<>{}[](),

The More Options section of the Preferences dialog box allows you to define your own wordsets to be used when highlighting words. Simply enter the characters that you want to be included in the appropriate wordset field. Note that all wordsets include alphanumeric characters and the underscore. These do not need to be specified and cannot be removed from a wordset.

If you are happy with the default settings, simply leave these fields empty.


Marking Columns

Usually when marking blocks that span several lines, complete lines in the block are highlighted - except for maybe the first and last line in the block, which may be partially highlighted.

Sometimes you may only want to highlight text that appears in certain columns. You may do this by pressing the Control key as you drag the mouse over the text to be selected. In this case, the highlighted area will form a rectangle consisting of only the required columns. Note that it is not necessary to continue pressing the Control key as you are marking the text - only when you begin to mark the text.

When you copy the column selection to the clipboard (or save it to a file), only the text in the highlighted columns is copied/saved.

Notes

· Column marking is not available in HEX mode.
· Once a column is marked, it may be extended by shift-clicking, as described in the How to mark blocks section.
· If the columns contain numbers, you can have V add them together and display the sum in the status bar.
·


Adding Columns

When selecting columns which contain numbers, V can add these numbers and display the sum in the status bar.

To do this, right-click on the bottom left of the status bar and select Sum Column Data.

If you want V to automatically display the sum as you are selecting the column, right-click on the status bar and enable Auto-Sum. You may copy the sum to the clipboard by right-clicking on the status bar and selecting Copy Sum to Clipboard.

By default, V looks for valid decimal numbers to add. If the numbers in the column are in hex, also press the SHIFT key.

Notes

· Any lines in the selection that do not contain valid numbers will be ignored.
· This only applies to selected columns. That is, text that has been selected with the Ctrl key pressed.
· When selecting very large columns of data, the auto-sum option may slow down the selection process.


Copying text to the clipboard

The selected text may be copied to the clipboard by either pressing Ctrl-C, by selecting Copy/Cut from the Edit menu (the right-click menu) or by clicking on the Clipboard toolbar button.

The current line can be copied to the clipboard by either pressing Ctrl+Y or by selecting Copy Current Line from the Edit menu.

If you are displaying the file with line numbers, they will not usually be copied to the clipboard. If you would like the line numbers included, you have to enable the Include line numbers on copy to Clipboard option in the Preferences Dialog box.

Copying in Hex mode

In hex mode, the data to be copied to the depends on how the data is selected. If the data is selected by drawing the mouse over the right side of the display, then only the data bytes will be copied (nulls will be ignored).

If the data is selected by moving the mouse over the left side of the display, the actual hex representation of the data (including the hex address) will be copied.

Notes

· The selected text will usually remain highlighted once it has been copied to the clipboard (or copied to a file). If you want the selection to be cleared once the selection has been copied, set the Unmark block after copy option in the File Options tab of the Preferences dialog box.
· When selecting the left side of a view In Hex mode, only complete lines are copied to the clipboard, regardless of how much of the line is highlighted. Even if only one byte in a line is highlighted, the entire line (and address) is copied to the clipboard. (This does not apply when selecting the right side of the view)
· The selected text may also be appended to the current clipboard contents by pressing the SHIFT key while doing the copy.


Appending to the cliboard

The selected text may be appended to the clipboard by pressing the SHIFT key while doing the copy. That is, press SHIFT while clicking on the clipboard toolbar button, or by pressing Ctrl-Shift-C instead of Ctrl-C.


Copying to a file

The selected text may be copied to a file by selecting Select Block->Write to File from the Edit menu or by selecting Mark Block->Write to File from the right-click menu.

Copying selected text to a file is similar to copying to the clipboard, however you are asked to specify a file name to copy the text to. If the file already exists, you have the option of appending to the file instead of over-writing it.

This feature makes it easy to extract several small portions from a large file and save them to a much smaller file (perhaps to be printed).

File Encoding

When saving text files, select the type of encoding from the "File Encoding" drop-down list box. The File Encoding will default to Unicode. The encoding should be set to ANSI/ASCII to save the text in the more common single-byte ASCII format.

Copying in Hex mode

Unlike copying to the clipboard, copying to a file in Hex mode does not copy the hex data as it is displayed, but as it is stored. That is, if you highlight 6 hex bytes and copy them to a file, the resulting file will contain exactly 6 bytes.


Regular Expressions

In their most basic form, regular expressions are a simple search string (or pattern).

However, special characters (operators) can be used that turn regular expressions into very powerful (and sometimes very complex) search mechanisms.

For example, you could use regular expressions to search for:

· A string beginning with A or B and ending with 0 or 9: "[AB].*[09]"
· A blank line: "^$"
· A full stop at the very end of a line: "\.$"
· A string of at least 5 zeros: "0{5,}"
· A word of 7 characters: "\b\w{7}\b"
· A line that starts and ends with the same character: "^(.).*\1$"
· A line that starts and ends with the same word: "^(\w+)\b.*\b\1$"
· A line that does not contain "string": "^((?!string).)*$"

Regular expressions in V are implemented using the PCRE library, written by Philip Hazel.

PCRE implements a Perl-like syntax for regular expression which differs slightly from the more traditional Unix-like syntax. However, for most operations, the two are the same.

The description of regular expressions in this Help file is largely derived from the PCRE documentation.

The regular expression documentation may also be viewed in HTML format at:

http://www.fileviewer.com/Regexp.html

This URL also contains a few links to other regular expression resources on the web.

Implementations and Limitations ->


Implementation and Limitations

The implementation of regular expressions in V is line based. That is, regular expressions are searched for line by line.

This means that you cannot search for something that spans more than one line. For example, searching for "123\nABC" will never work.

The "Binary (Hex)" option is disabled when using regular expressions. If you want to search for binary data, you will have to use the regular expression notation for hex data (eg, \xff).

You may still search for regular expressions containing binary data (eg, "\xff.*\xff"), however, since the search is line based, a match will never contain a newline character (CR or LF), or a form feed character (hex 0C).

Note that this is a limitation of the V implementation, and not of the PCRE library.

Differences from Perl ->


Differences from Perl

The following section is probably only of interest to experienced Perl users.

The PCRE library is a set of functions that implement regular expression pattern matching using the same syntax and semantics as Perl 5, with just a few differences (see below). The current implementation corresponds to Perl 5.005.

The differences are:

1. By default, a whitespace character is any character that the C library function isspace() recognizes, though it is possible to compile PCRE with alternative character type tables. Normally isspace() matches space, formfeed, newline, carriage return, horizontal tab, and vertical tab. Perl 5 no longer includes vertical tab in its set of whitespace characters. The \v escape that was in the Perl documentation for a long time was never in fact recognized. However, the character itself was treated as whitespace at least up to 5.002. In 5.004 and 5.005 it does not match \s.
2. PCRE does not allow repeat quantifiers on lookahead assertions. Perl permits them, but they do not mean what you might think. For example, (?!a){3} does not assert that the next three characters are not "a". It just asserts that the next character is not "a" three times.
3. Capturing subpatterns that occur inside negative lookahead assertions are counted, but their entries in the offsets vector are never set. Perl sets its numerical variables from any such patterns that are matched before the assertion fails to match something (thereby succeeding), but only if the negative lookahead assertion contains just one branch.
4. Though binary zero characters are supported in the subject string, they are not allowed in a pattern string because it is passed as a normal C string, terminated by zero. The escape sequence "\0" can be used in the pattern to represent a binary zero.
5. The following Perl escape sequences are not supported: \l, \u, \L, \U, \E, \Q. In fact these are implemented by Perl's general string-handling and are not part of its pattern matching engine.
6. The Perl \G assertion is not supported as it is not relevant to single pattern matches.
7. Fairly obviously, PCRE does not support the (?{code}) construction.
8. There are at the time of writing some oddities in Perl 5.005_02 concerned with the settings of captured strings when part of a pattern is repeated. For example, matching "aba" against the pattern /^(a(b)?)+$/ sets $2 to the value "b", but matching "aabbaa" against /^(aa(bb)?)+$/ leaves $2 unset. However, if the pattern is changed to /^(aa(b(b))?)+$/ then $2 (and $3) get set.

In Perl 5.004, $2 is set in both cases, and that is also true of PCRE. If in the future Perl changes to a consistent state that is different, PCRE may change to follow.
9. Another as yet unresolved discrepancy is that in Perl 5.005_02 the pattern /^(a)?(?(1)a|b)+$/ matches the string "a", whereas in PCRE it does not. However, in both Perl and PCRE /^(a)?a/ matched against "a" leaves $1 unset.
10. Although lookbehind assertions must match fixed length strings, each alternative branch of a lookbehind assertion can match a different length of string. Perl 5.005 requires them all to have the same length.

Regular Expression Details ->


Regular Expression Details

A regular expression is a pattern that is matched against a subject string from left to right. Most characters stand for themselves in a pattern, and match the corresponding characters in the subject. As a trivial example, the pattern

The quick brown fox

matches a portion of a subject string that is identical to itself. The power of regular expressions comes from the ability to include alternatives and repetitions in the pattern. These are encoded in the pattern by the use of meta-characters , which do not stand for themselves but instead are interpreted in some special way.

There are two different sets of meta-characters: those that are recognized anywhere in the pattern except within square brackets, and those that are recognized in square brackets.

Outside square brackets, the meta-characters are as follows:

\ | general escape character with several uses
^ | assert start of subject
$ | assert end of subject
. | match any character
[ | start character class definition
| | start of alternative branch
( | start subpattern
) | end subpattern
? | extends the meaning of ( also 0 or 1 quantifier also quantifier minimizer
* | 0 or more quantifier
+ | 1 or more quantifier
{ | start min/max quantifier

Part of a pattern that is in square brackets is called a character class. In a character class the only meta-characters are:

\ | general escape character
^ | negate the class, but only if the first character
- | indicates character range
] | terminates the character class

The following sections describe the use of each of the meta-characters.

Backslash ->


Backslash

The backslash character has several uses. Firstly, if it is followed by a non-alphanumeric character, it takes away any special meaning that character may have. This use of backslash as an escape character applies both inside and outside character classes.

For example, if you want to match a "*" character, you write "\*" in the pattern. This applies whether or not the following character would otherwise be interpreted as a meta-character, so it is always safe to precede a non-alphameric with "\" to specify that it stands for itself. In particular, if you want to match a backslash, you write "\\".

A second use of backslash provides a way of encoding non-printing characters in patterns in a visible manner. There is no restriction on the appearance of non-printing characters, apart from the binary zero that terminates a pattern, but when a pattern is being prepared by text editing, it is usually easier to use one of the following escape sequences than the binary character it represents:

\a | alarm, that is, the BEL character (hex 07)
\cx | "control-x", where x is any character
\e | escape (hex1B)
\f | formfeed (hex 0C)
\n | newline (hex 0A)
\r | carriage return (hex 0D
\t | tab (hex 09)
\xhh | character with hex code hh
\ddd | character with octal code ddd, or backreference

The precise effect of "\cx" is as follows: if "x" is a lower case letter, it is converted to upper case. Then bit 6 of the character (hex 40) is inverted. Thus "\cz" becomes hex 1A, but "\c{" becomes hex 3B, while "\c;" becomes hex 7B.

After "\x", up to two hexadecimal digits are read (letters can be in upper or lower case).

After "\0" up to two further octal digits are read. In both cases, if there are fewer than two digits, just those that are present are used. Thus the sequence "\0\x\07" specifies two binary zeros followed by a BEL character. Make sure you supply two digits after the initial zero if the character that follows is itself an octal digit.

The handling of a backslash followed by a digit other than 0 is complicated. Outside a character class, PCRE reads it and any following digits as a decimal number. If the number is less than 10, or if there have been at least that many previous capturing left parentheses in the expression, the entire sequence is taken as a back reference. A description of how this works is given later, following the discussion of parenthesized subpatterns.

Inside a character class, or if the decimal number is greater than 9 and there have not been that many capturing subpatterns, PCRE re-reads up to three octal digits following the backslash, and generates a single byte from the least significant 8 bits of the value. Any subsequent digits stand for themselves.

For example:

\040 | is another way of writing a space
\40 | is the same, provided there are fewer than 40 previous capturing subpatterns
\7 | is always a back reference
\11 | might be a back reference, or another way of writing a tab
\011 | is always a tab
\0113 | is a tab followed by the character "3"
\113 | is the character with octal code 113 (since there can be no more than 99 back references)
\377 | is a byte consisting entirely of 1 bits
\81 | is either a back reference, or a binary zero followed by the two characters "8" and "1"

Note that octal values of 100 or greater must not be introduced by a leading zero, because

no more than three octal digits are ever read.

All the sequences that define a single byte value can be used both inside and outside character classes. In addition, inside a character class, the sequence "\b" is interpreted as the backspace character (hex 08). Outside a character class it has a different meaning (see below).

The third use of backslash is for specifying generic character types:

\d | any decimal digit
\D | any character that is not a decimal digit
\s | any whitespace character
\S | any character that is not a whitespace character
\w | any "word" character
\W | any "non-word" character

Each pair of escape sequences partitions the complete set of characters into two disjoint sets. Any given character matches one, and only one, of each pair.

A "word" character is any letter or digit or the underscore character, that is, any character which can be part of a Perl "word".

These character type sequences can appear both inside and outside character classes. They each match one character of the appropriate type. If the current matching point is at the end of the subject string, all of them fail, since there is no character to match.

The fourth use of backslash is for certain simple assertions. An assertion specifies a condition that has to be met at a particular point in a match, without consuming any characters from the subject string. The use of subpatterns for more complicated assertions is described below. The backslashed assertions are

\b                word boundary

\B                not a word boundary

These assertions may not appear in character classes (but note that "\b" has a different meaning, namely the backspace character, inside a character class).

A word boundary is a position in the subject string where the current character and the previous character do not both match \w or \W (i.e. one matches \w and the other matches \W), or the start or end of the string if the first or last character matches \w, respectively.

Circumflex and Dollar ->


Circumflex and Dollar

Outside a character class, in the default matching mode, the circumflex character (^) is an assertion which is true only if the current matching point is at the start of the subject string. Inside a character class, circumflex has an entirely different meaning (see below).

Circumflex need not be the first character of the pattern if a number of alternatives are involved, but it should be the first thing in each alternative in which it appears if the pattern is ever to match that branch. If all possible alternatives start with a circumflex, that is, if the pattern is constrained to match only at the start of the subject, it is said to be an "anchored" pattern. (There are also other constructs that can cause a pattern to be anchored.)

A dollar character ($) is an assertion which is true only if the current matching point is at the end of the subject string, or immediately before a newline character that is the last character in the string (by default). Dollar need not be the last character of the pattern if a number of alternatives are involved, but it should be the last item in any branch in which it appears. Dollar has no special meaning in a character class.

Full Stop ->


Full Stop (period, dot)

Outside a character class, a dot (.) in the pattern matches any one character in the subject, including a non-printing character, but not (by default) newline. The handling of dot is entirely independent of the handling of circumflex and dollar, the only relationship being that they both involve newline characters. Dot has no special meaning in a character class.

Square Brackets ->


Square Brackets

An opening square bracket ([) introduces a character class, terminated by a closing square bracket (]). A closing square bracket on its own is not special. If a closing square bracket is required as a member of the class, it should be the first data character in the class (after an initial circumflex, if present) or escaped with a backslash.

A character class matches a single character in the subject; the character must be in the set of characters defined by the class, unless the first character in the class is a circumflex, in which case the subject character must not be in the set defined by the class. If a circumflex is actually required as a member of the class, ensure it is not the first character, or escape it with a backslash.

For example, the character class [aeiou] matches any lower case vowel, while [^aeiou] matches any character that is not a lower case vowel. Note that a circumflex is just a convenient notation for specifying the characters which are in the class by enumerating those that are not. It is not an assertion: it still consumes a character from the subject string, and fails if the current pointer is at the end of the string.

When caseless matching is set, any letters in a class represent both their upper case and lower case versions, so for example, a caseless [aeiou] matches "A" as well as "a", and a caseless [^aeiou] does not match "A", whereas a caseful version would.

The minus/ hyphen character (-) can be used to specify a range of characters in a character class. For example, [d-m] matches any letter between d and m, inclusive. If a minus character is required in a class, it must be escaped with a backslash or appear in a position where it cannot be interpreted as indicating a range, typically as the first or last character in the class.

It is not possible to have the literal character "]" as the end character of a range. A pattern such as [W-]46] is interpreted as a class of two characters ("W" and "-") followed by a literal string "46]", so it would match "W46]" or "-46]". However, if the "]" is escaped with a backslash it is interpreted as the end of range, so [W-\]46] is interpreted as a single class containing a range followed by two separate characters. The octal or hexadecimal representation of "]" can also be used to end a range.

Ranges operate in ASCII collating sequence. They can also be used for characters specified numerically, for example [\000-\037]. If a range that includes letters is used when caseless matching is set, it matches the letters in either case. For example, [W-c] is equivalent to [][\^_`wxyzabc], matched caselessly.

The character types \d, \D, \s, \S, \w, and \W may also appear in a character class, and add the characters that they match to the class. For example, [\dABCDEF] matches any hexadecimal digit. A circumflex can conveniently be used with the upper case character types to specify a more restricted set of characters than the matching lower case type. For example, the class [^\W_] matches any letter or digit, but not underscore.

All non-alphanumeric characters other than \, -, ^ (at the start) and the terminating ] are non-special in character classes, but it does no harm if they are escaped.

Vertical Bar ->


Vertical Bar (or)

Vertical bar characters are used to separate alternative patterns. For example, the pattern

gilbert|sullivan

matches either "gilbert" or "sullivan".

Any number of alternatives may appear, and an empty alternative is permitted (matching the empty string). The matching process tries each alternative in turn, from left to right, and the first one that succeeds is used. If the alternatives are within a subpattern (defined below), "succeeds" means matching the rest of the main pattern as well as the alternative in the subpattern.

Subpatterns ->


Subpatterns

Subpatterns are delimited by parentheses (round brackets), which can be nested. Marking part of a pattern as a subpattern does two things:

1. It localizes a set of alternatives. For example, the pattern

cat(aract|erpillar|)

matches one of the words "cat", "cataract", or "caterpillar". Without the parentheses, it would match "cataract", "erpillar" or the empty string.

2. It sets up the subpattern as a capturing subpattern (as defined above). Opening parentheses are counted from left to right (starting from 1) to obtain the numbers of the capturing subpatterns.

For example, if the string "the red king" is matched against the pattern

the ((red|white) (king|queen))

the captured substrings are "red king", "red", and "king", and are numbered 1, 2, and 3, respectively.

The fact that plain parentheses fulfill two functions is not always helpful. There are often times when a grouping subpattern is required without a capturing requirement. If an opening parenthesis is followed by "?:", the subpattern does not do any capturing, and is not counted when computing the number of any subsequent capturing subpatterns.

For example, if the string "the white queen" is matched against the pattern

the ((?:red|white) (king|queen))

the captured substrings are "white queen" and "queen", and are numbered 1 and 2. The maximum number of captured substrings is 99, and the maximum number of all subpatterns, both capturing and non-capturing, is 200.

As a convenient shorthand, if any option settings are required at the start of a non-capturing subpattern, the option letters may appear between the "?" and the ":". Thus the two patterns

(?i:saturday|sunday) (?:(?i)saturday|sunday)

match exactly the same set of strings. Because alternative branches are tried from left to right, and options are not reset until the end of the subpattern is reached, an option setting in one branch does affect subsequent branches, so the above patterns match "SUNDAY" as well as "Saturday".

Repetition ->


Repetition

Repetition is specified by quantifiers, which can follow any of the following items:

• a single character, possibly escaped
• the dot metacharacter
• a character class
• a back reference (see next section)
• a parenthesized subpattern (unless it is an assertion - see below)

The general repetition quantifier specifies a minimum and maximum number of permitted matches, by giving the two numbers in curly brackets (braces), separated by a comma. The numbers must be less than 65536, and the first must be less than or equal to the second.

For example:

z{2,4}

matches "zz", "zzz", or "zzzz". A closing brace on its own is not a special character. If the second number is omitted, but the comma is present, there is no upper limit; if the second number and the comma are both omitted, the quantifier specifies an exact number of required matches. Thus

[aeiou]{3,}

matches at least 3 successive vowels, but may match many more, while

\d{8}

matches exactly 8 digits. An opening curly bracket that appears in a position where a quantifier is not allowed, or one that does not match the syntax of a quantifier, is taken as a literal character.

For example, {,6} is not a quantifier, but a literal string of four characters.

The quantifier {0} is permitted, causing the expression to behave as if the previous item and the quantifier were not present.

For convenience (and historical compatibility) the three most common quantifiers have single-character abbreviations:

* is equivalent to {0,}

+ is equivalent to {1,}

? is equivalent to {0,1}

It is possible to construct infinite loops by following a subpattern that can match no characters with a quantifier that has no upper limit, for example:

(a?)*

Earlier versions of Perl and PCRE used to give an error at compile time for such patterns. However, because there are cases where this can be useful, such patterns are now accepted, but if any repetition of the subpattern does in fact match no characters, the loop is forcibly broken.

By default, the quantifiers are "greedy", that is, they match as much as possible (up to the maximum number of permitted times), without causing the rest of the pattern to fail. The classic example of where this gives problems is in trying to match comments in C programs. These appear between the sequences /* and */ and within the sequence, individual * and / characters may appear. An attempt to match C comments by applying the pattern

/\*.*\*/

to the string

/* first command */ not comment /* second comment */

fails, because it matches the entire string due to the greediness of the .* item.

However, if a quantifier is followed by a question mark, then it ceases to be greedy, and instead matches the minimum number of times possible, so the pattern

/\*.*?\*/

does the right thing with the C comments. The meaning of the various quantifiers is not otherwise changed, just the preferred number of matches.

Do not confuse this use of question mark with its use as a quantifier in its own right. Because it has two uses, it can sometimes appear doubled, as in

\d??\d

which matches one digit by preference, but can match two if that is the only way the rest of the pattern matches.

When a parenthesized subpattern is quantified with a minimum repeat count that is greater than 1 or with a limited maximum, more store is required for the compiled pattern, in proportion to the size of the minimum or maximum.

When a capturing subpattern is repeated, the value captured is the substring that matched the final iteration. For example, after

(tweedle[dume]{3}\s*)+

has matched "tweedledum tweedledee" the value of the captured substring is "tweedledee". However, if there /are nested capturing subpatterns, the corresponding captured values may have been set in previous iterations. For example, after

/(a|(b))+/

matches "aba" the value of the second captured substring is "b".

Back References ->


Back References

Outside a character class, a backslash followed by a digit greater than 0 (and possibly further digits) is a back reference to a capturing subpattern earlier (i.e. to its left) in the pattern, provided there have been that many previous capturing left parentheses.

However, if the decimal number following the backslash is less than 10, it is always taken as a back reference, and causes an error only if there are not that many capturing left parentheses in the entire pattern. In other words, the parentheses that are referenced need not be to the left of the reference for numbers less than 10. See the section entitled "Backslash" above for further details of the handling of digits following a backslash.

A back reference matches whatever actually matched the capturing subpattern in the current subject string, rather than anything matching the subpattern itself. So the pattern

(sens|respons)e and \1ibility

matches "sense and sensibility" and "response and responsibility", but not "sense and responsibility". If caseful matching is in force at the time of the back reference, then the case of letters is relevant. For example,

((?i)rah)\s+\1

matches "rah rah" and "RAH RAH", but not "RAH rah", even though the original capturing subpattern is matched caselessly.

There may be more than one back reference to the same subpattern. If a subpattern has not

actually been used in a particular match, then any back references to it always fail. For example, the pattern

(a|(bc))\2

always fails if it starts to match "a" rather than "bc". Because there may be up to 99 back references, all digits following the backslash are taken as part of a potential back reference number. If the pattern continues with a digit character, then some delimiter must be used to terminate the back reference.

A back reference that occurs inside the parentheses to which it refers fails when the subpattern is first used, so, for example, (a\1) never matches. However, such references can be useful inside repeated subpatterns. For example, the pattern

(a|b\1)+

matches any number of "a"s and also "aba", "ababaa" etc. At each iteration of the subpattern, the back reference matches the character string corresponding to the previous iteration. In order for this to work, the pattern must be such that the first iteration does not need to match the back reference. This can be done using alternation, as in the example above, or by a quantifier with a minimum of zero.

Assertions ->


Assertions

An assertion is a test on the characters following or preceding the current matching point that does not actually consume any characters. The simple assertions coded as \b, \B, ^ and $ are described above. More complicated assertions are coded as subpatterns. There are two kinds: those that look ahead of the current position in the subject string, and those that look behind it.

An assertion subpattern is matched in the normal way, except that it does not cause the current matching position to be changed. Lookahead assertions start with (?= for positive assertions and (?! for negative assertions. For example,

\w+(?=;)

matches a word followed by a semicolon, but does not include the semicolon in the match, and

foo(?!bar)

matches any occurrence of "foo" that is not followed by "bar". Note that the apparently similar pattern

(?!foo)bar

does not find an occurrence of "bar" that is preceded by something other than "foo"; it finds any occurrence of "bar" whatsoever, because the assertion (?!foo) is always true when the next three characters are "bar". A lookbehind assertion is needed to achieve this effect.

Lookbehind assertions start with (?<= for positive assertions and (?<! for negative assertions. For example,

(?<!foo)bar

does find an occurrence of "bar" that is not preceded by "foo". The contents of a lookbehind assertion are restricted such that all the strings it matches must have a fixed length. However, if there are several alternatives, they do not all have to have the same fixed length. Thus

(?<=bullock|donkey)

is permitted, but

(?<!dogs?|cats?)

causes an error at compile time. Branches that match different length strings are permitted only at the top level of a lookbehind assertion. This is an extension compared with Perl 5.005, which requires all branches to match the same length of string. An assertion such as

(?<=ab(c|de))

is not permitted, because its single top-level branch can match two different lengths, but it is acceptable if rewritten to use two top-level branches:

(?<=abc|abde)

The implementation of lookbehind assertions is, for each alternative, to temporarily move the current position back by the fixed width and then try to match. If there are insufficient characters before the current position, the match is deemed to fail. Lookbehinds in conjunction with once-only subpatterns can be particularly useful for matching at the ends of strings; an example is given at the end of the section on once-only subpatterns.

Several assertions (of any sort) may occur in succession. For example,

(?<=\d{3})(?<!999)foo

matches "foo" preceded by three digits that are not "999". Furthermore, assertions can be nested in any combination. For example,

(?<=(?<!foo)bar)baz

matches an occurrence of "baz" that is preceded by "bar" which in turn is not preceded by "foo".

Assertion subpatterns are not capturing subpatterns, and may not be repeated, because it makes no sense to assert the same thing several times. If an assertion contains capturing subpatterns within it, these are always counted for the purposes of numbering the capturing subpatterns in the whole pattern. Substring capturing is carried out for positive assertions, but it does not make sense for negative assertions.

Assertions count towards the maximum of 200 parenthesized subpatterns.

Once-only Subpatterns ->


Once-only Subpatterns

With both maximizing and minimizing repetition, failure of what follows normally causes the repeated item to be re-evaluated to see if a different number of repeats allows the rest of the pattern to match. Sometimes it is useful to prevent this, either to change the nature of the match, or to cause it fail earlier than it otherwise might, when the author of the pattern knows there is no point in carrying on.

Consider, for example, the pattern \d+foo when applied to the subject line

123456bar

After matching all 6 digits and then failing to match "foo", the normal action of the matcher is to try again with only 5 digits matching the \d+ item, and then with 4, and so on, before ultimately failing. Once-only subpatterns provide the means for specifying that once a portion of the pattern has matched, it is not to be re-evaluated in this way, so the matcher would give up immediately on failing to match "foo" the first time. The notation is another kind of special parenthesis, starting with (?> as in this example:

(?>\d+)bar

This kind of parenthesis "locks up" the part of the pattern it contains once it has matched, and a failure further into the pattern is prevented from backtracking into it. Backtracking past it to previous items, however, works as normal.

An alternative description is that a subpattern of this type matches the string of characters that an identical standalone pattern would match, if anchored at the current point in the subject string.

Once-only subpatterns are not capturing subpatterns. Simple cases such as the above example can be thought of as a maximizing repeat that must swallow everything it can. So, while both \d+ and \d+? are prepared to adjust the number of digits they match in order to make the rest of the pattern match, (?>\d+) can only match an entire sequence of digits.

This construction can of course contain arbitrarily complicated subpatterns, and it can be nested.

Once-only subpatterns can be used in conjunction with lookbehind assertions to specify efficient matching at the end of the subject string. Consider a simple pattern such as

abcd$

when applied to a long string which does not match it. Because matching proceeds from left to right, PCRE will look for each "a" in the subject and then see if what follows matches the rest of the pattern. If the pattern is specified as

.*abcd$

then the initial .* matches the entire string at first, but when this fails, it backtracks to match all but the last character, then all but the last two characters, and so on. Once again the search for "a" covers the entire string, from right to left, so we are no better off. However, if the pattern is written as

(?>.*)(?<=abcd)

then there can be no backtracking for the .* item; it can match only the entire string. The subsequent lookbehind assertion does a single test on the last four characters. If it fails, the match fails immediately. For long strings, this approach makes a significant difference to the processing time.

Conditional Subpatterns ->


Conditional Subpatterns

It is possible to cause the matching process to obey a subpattern conditionally or to choose between two alternative subpatterns, depending on the result of an assertion, or whether a previous capturing subpattern matched or not. The two possible forms of conditional subpattern are

(?(condition)yes-pattern) (?(condition)yes-pattern|no-pattern)

If the condition is satisfied, the yes-pattern is used; otherwise the no-pattern (if present) is used. If there are more than two alternatives in the subpattern, a compile-time error occurs.

There are two kinds of condition. If the text between the parentheses consists of a sequence of digits, then the condition is satisfied if the capturing subpattern of that number has previously matched. Consider the following pattern, which contains non-significant white space to make it more readable and to divide it into three parts for ease of discussion:

( \\( )? [^()]+ (?(1) \\) )

The first part matches an optional opening parenthesis, and if that character is present, sets it as the first captured substring. The second part matches one or more characters that are not parentheses. The third part is a conditional subpattern that tests whether the first set of parentheses matched or not. If they did, that is, if subject started with an opening parenthesis, the condition is true, and so the yes-pattern is executed and a closing parenthesis is required. Otherwise, since no-pattern is not present, the subpattern matches nothing. In other words, this pattern matches a sequence of non-parentheses, optionally enclosed in parentheses.

If the condition is not a sequence of digits, it must be an assertion. This may be a positive or negative lookahead or lookbehind assertion. Consider this pattern, again containing non-significant white space, and with the two alternatives on the second line:

(?(?=[^a-z]*[a-z])

\\d{2}[a-z]{3}-\\d{2} | \\d{2}-\\d{2}-\\d{2} )

The condition is a positive lookahead assertion that matches an optional sequence of non-letters followed by a letter. In other words, it tests for the presence of at least one letter in the subject. If a letter is found, the subject is matched against the first alternative; otherwise it is matched against the second. This pattern matches strings in one of the two forms dd-aaa-dd or dd-dd-dd, where aaa are letters and dd are digits.

Comments ->


Searching Columns with Regular Expressions

The following is a small guide on how to use regular expressions to search for text in columns.

In many cases, using regular expressions can be quicker than doing a standard search with the Column option enabled.

Consider the following examples:

Find a line that has an A in column 20

Use the following regular expression:

^.{19}A

The "^" refers to the beginning of a line and the "." refers to any character. "{19}" indicates that the previous character must be matched 19 times.

"^.{19}" will therefore match the first 19 characters in any line. Adding an A to the end of the expression will match a line if the first 19 characters are followed by an A. In other words, if there is an A in column 20.

Note that if the search is successful, the first 20 characters in the line will be highlighted - not just the A in column 20.

Find a line that *does not* have an A in column 20

^.{19}[^A]

This is very similar to the previous expression, but "[^A]" will match any character that is not an A. Therefore, the expression will match any line where the first 19 characters are not followed by an A.

Find a line that does not have ABC starting at column 20

^.{19}(?!ABC)

Once again, the first part of the regular expression is the same as before ("^.{19}").

"(?!ABC)" is a negative lookahead assertion. It doesn't match anything, but asserts that "ABC" should *not* follow what has already been matched.

Therefore, the above regular expression will match the first 19 characters in the line as long as they are not followed by "ABC".

Notes

In the above examples, the Regex search option should be checked and the Column search option should be unchecked.

The above examples will not work on lines that contain tabs.

The above examples will only work on files whose lines are terminated with a CR/LF (or any combination thereof). They will not work on files with fixed length records (and no record delimiter).


Comments

The sequence (?# marks the start of a comment which continues up to the next closing parenthesis. Nested parentheses are not permitted. The characters that make up a comment play no part in the pattern matching at all.

Performance ->


Performance

Certain items that may appear in patterns are more efficient than others.

It is more efficient to use a character class like [aeiou] than a set of alternatives such as (a|e|i|o|u). In general, the simplest construction that provides the required behaviour is usually the most efficient.


Author

PCRE was written by Philip Hazel.

PCRE is Copyright (c) 1997-2010 University of Cambridge.

The latest PCRE source code can be downloaded from:

http://www.pcre.org/


GridLines

A Grid consists of vertical lines (GridLines) and column headings that can be displayed while viewing a file. It behaves just like a ruler. It can be displayed at the top of the file and it can be floated over any part of the file.

A Grid may be displayed by manually selecting it from the GridLines menu, or it can be automatically loaded whenever a particular file is viewed.

The state of the current Grid can be toggled by pressing Ctrl+Shift+G or by selecting Toggle Grid from the GridLines menu.

Note that GridLines are only useful when the data in the file consists of fixed length records which are properly aligned into columns.

GridLines will not work on delimited files (or CSV files), where each field in a record is separated by a delimiter (like a comma or a TAB). However, it is possible to use a program called TuFix to convert a delimited file into a fixed record length file. The converted file can then be viewed in V with an appropriate Grid.

Tufix can be downloaded from:

http://www.fileviewer.com/TuFix.html

Click on the following sections for further details on GridLines:

Creating Grids

Organizing Grids

Wrap Options

Automatically Loading Grids

Associating Grids with a File Extension

Exporting Grids

Importing Grids

Exporting Data to a CSV File

Note

GridLines can be printed by using %g in the header/footer


Creating Grids

To create a Grid, select Edit/Create Grid from the GridLines menu. This will display a blank Grid. After making the necessary modifications, you need to save the Grid before exiting.

To make modifications, right-click on the Grid and select the desired option. The following options are available:

Add Grid Line Here

Right-click at the position where you want to add a Grid Line and select this option. You can then use "Edit Column Name" to give the column a meaningful name. If you place the Grid Line at the incorrect position, you can simply left-click on the end of the column and drag it to the required position.

Note that you can also add a Grid Line by Shift-Left-Clicking at the required position.

Edit Column Name

Right-click on the appropriate column, then enter the column name (followed by the Enter key). You can leave the column name unchanged by pressing the ESCape key.

Edit Column Length

Right-click on the column and enter the new length. In most cases it would be easier to set the column length by simply left-clicking on the end of the column and dragging to the desired position.

Select Font

This lets you specify the Font to display the Column names. Note that all columns are displayed using the same font.

Insert Column

This always inserts a column of 10 characters just before the column that you right-click on. You can then drag the new column to the required position. In most cases, it would be easier to use "Add Grid Line Here".

Delete Column

Deletes the column that you right-click on.

Hide Grid Lines

This specifies that the vertical Grid Lines will not be drawn over the file. Only the Grid header will be displayed.

Center Column Names

The column names will be centered instead of starting at the left.

Set Wrap Options

This allows fixed length record files to automatically wrap to the correct record length when a Grid is loaded. Click here for further details.

Save

This saves the Grid. If you are saving a newly created Grid (instead of an edited Grid), the Organize Grid dialog will be displayed, allowing you to enter a name for the Grid. This name will appear on the GridLines menu.

Save As

This lets you save the edited Grid with a new name. The Grid originally loaded will not be modified.

Export

This lets you export the Grid to a .vgrid file. Click here for further details.

Note that exported Grids do not appear on the GridLines menu. If you want the Grid to also appear on the GridLines menu, you will have select Organize/Configure from the GridLines menu and then import the Grid.

Set Export Data

This lets you specify additional data that will be exported to the .vgrid file.

Click here for further details.

Close Menu

Select this if you do not want to make a selection from the right-click menu.

Exit Edit Mode

Terminates the Grid edit. If you have not saved a modified Grid, you will be asked if you want to save it before exiting.

Notes

You can also maintain Grids by selecting Organize/Configure from the GridLines menu.

You can only create/edit a grid while you are viewing a file.


Organizing Grids

Select Organize/Configure from the GridLines menu if you want to re-organize your Grids.

Note that the easiest way of creating a Grid is to select Create Grid from the GridLines menu. The easiest way of modifying a Grid is to first load it, and then to select Edit Grid from the GridLines menu.

Using the Organize option to modify a Grid does not give you visual feedback as you are making the changes. You will need to exit the Organize dialog before any Grid modifications are displayed.

Organize/Configure is best used to make minor changes to the Grid, or to re-organize the Grids on the GridLines menu.

Organizing Grids is very similar to Organizing Favorites. See the Creating Grids section for an explanation of the various options in the Organize dialog box. When organizing the grids, a shortcut key can be assigned so that the grid is selected whenever the corresponding keyboard shortcut is entered.

You can copy a Grid from another user by first exporting the Grid and then importing it.


Wrap Options

When viewing files with fixed length records (and no line terminator), you need to manually enter the correct record length (or wrap length) for the file to be displayed correctly.

By entering the Wrap Options for a Grid, the file will be automatically wrapped to the specified record length when the Grid is loaded.

To enter the Wrap Options while creating/editing a Grid, right-click on the Grid header and select Set Wrap Options. The wrap options consist of the following:

Wrap Lines at Column

This is length at which all lines will be wrapped (ie, the record length).

Restore wrap settings when Grid is removed

By default, V will maintain the current wrap settings when the Grid is removed - even when you view a different file. If the wrap options do not apply to this file, you will need to disable (or change) them.

By enabling this option, V assumes that the wrap options only apply to the file being viewed and will restore the original wrap settings when the Grid is removed (or the file is closed).


Automatically Loading Grids

A Grid is usually manually loaded by selecting it from the GridLines menu. If you always want a particular grid to be displayed when a file is loaded, you need to export the grid to a file name that is the same as the file with a .vgrid extension.

For example, to always display a grid with Filename.dat, you need to create a grid file with the name Filename.dat.vgrid.

The .vgrid file needs to be in the same directory as the file being viewed - or in the Default Grid Directory (see below).

Creating a .vgrid File

After you have created a Grid, you can export it by selecting Export from the right-click Grid menu. Note that an exported Grid will not appear on the GridLines menu. If you want the Grid displayed in the GridLines menu, you will also need to Save it.

If you export the Grid to a file named .vgrid (just an extension, with no file name), that Grid will be used for all files in that directory.

Default Grid Directory

You can specify a Default Grid Directory by selecting Default Grid Directory from the GridLines menu. If a .vgrid file does not exist in the current directory, V will also look in this directory.

You can use rules based loading to load a grid based on part of the file name. This makes it possible to load the same grid for multiple files without having to create multiple .vgrid files.

Note: In order to load grids automatically, you need to enable the Auto-Load Grids option on the GridLines->Options menu.


Using Rules (Regular Expressions) to Load Grids

If Enable Grid Rules is enabled (on the GridLines->Options menu), V will look for a .rules file which contains a list of file expressions and corresponding .vgrid files to load if the currently viewed file matches that expression.

You will need to create a file called .rules in the Default Grid Directory (select Set Default Grid Directory from the GridLines menu). This file must be created manually with an editor (you cannot use V to create it).

Each line in this file (.rules) consists of a regular expression followed by a replacement string (separated by a "/").

When viewing a file, V will try to match the file name against each expression in .rules. If it finds a match, it tries to load the .vgrid file specified by the replacement.

For example, let's say that a directory consisted of many files named Test1-YYYY-MM-DD.log and Test2-YYYY-MM-DD.log where YYYY-MM-DD represented the date the file was created.

You could apply a single .vgrid file for all such files by adding the following line to ".rules":

Test.*\.log/Test.vgrid

This will cause V to load Test.vgrid for any file of the form Testxxxxx.log.

If you wanted to load a different grid for Test1 and Test2 files, you could add the following line to .rules:

Test([0-9]).*\.log/Test\1.vgrid

This would load Test1.vgrid for all file names that started with Test1, Test2.vgrid for all file names that started with Test2, and so on, up to Test9.vgrid.

Notes

The expressions in .rules must be regular expressions - which are different from simple Windows/DOS wildcard expressions (like Test*.log - which will not work).

Any lines in .rules that begin with either # or ; are ignored (they can be used for comments).


Associating with a File Extension

By associating a Grid with a File Extension, that Grid will be automatically loaded whenever a file with that extension is viewed.

To do this, simply create a Grid, and when saving it, make sure that the name of the Grid begins with the file extension.

For example, to associate a Grid with .xyz files, simply name the Grid something like ".xyz (Grid for XYZ Files)". Any description may follow the file extension (as long as there is a separating space).

You must also enable Auto-Load Grid Extensions on the GridLines menu.

Note

A File Extension Grid must be saved on the GridLines menu. You cannot save it as a .vgrid file in the current directory or the Default Grid Directory.


Exporting Grids

Grids can either be exported to .vexp files or to .vgrid files.

Exporting to a .vexp file

Press the More button and select Export. This will allow you to export either the selected grid(s) or all the grids to a .vexp file. This is usually done so the grids can be copied by another user.

Once another user has imported the exported .vexp file, the imported gridlines will appear on their GridLines menu.

Exporting to a .vgrid file

Press the More button and select Export to .vgrid.

A Grid is exported to a .vgrid file so that it can be automatically loaded by V when a file is viewed.

The Set Export Data option in the Grid right-click menu is used to specify extra data that will be appended to every line in the exported .vgrid file.

You can also append different data for each line (column) by entering the extra data to be exported in the Column Length. Simply include the extra data immediately after the length.

For example, if you enter 16, A for the Column Length, ", A" (without the quotes) will be added to the corresponding exported line.

Note that the comma in this example does not act as a separator. The extra data to be exported begins at the first non-numeric character after the column length. If you add a space after the column length, the space will also be exported.

Note

.vgrid files can only be exported/imported one at a time. Export to a .vexp file if you would like to export/import multiple grids.


Importing Grids

When organizing GridLines, pressing the More button allows you to import GridLines that had previously been exported. Two different types of import are available.

Import from a .vexp file

Selecting the Import option allows you import a previously exported .vexp file. The imported grids will appear on the GridLines menu.

Import from .vgrid

This allows you to add a Grid to the GridLines menu that has previously been exported to a .vgrid file.

Note

.vgrid files can only be exported/imported one at a time. Export to a .vexp file if you would like to export/import multiple grids.


Exporting Data to CSV

Exporting Data to a CSV File

The file being viewed can be exported to a CSV file by selecting Export to CSV from the GridLines menu. This option is only available if a Grid has been applied to the file being viewed.

Each line in a CSV file consists of multiple fields separated by a delimiter (typically a comma). Each field will contain the text in the corresponding grid column.

The following options can be set when exporting to a CSV file:

Delimiter

If nothing is specified in the Delimiter box, a comma will be used as the delimiter. If you want to specify another delimiter (eg, a vertical bar "|"), simply enter it here. Note that the delimiter can contain more than one character. If you want to use a TAB for the delimiter, enter "\x8" (without the quotes).

Quotes

By default, V will only place quotes around a field if the field contains a delimiter. You can change this behavior by specifying one of the following:

· Use Quote Always
· Use Quotes only if field contains delimiter
· Use Quotes only if field contains delimiter or spaces

Do not strip trailing spaces

By default, V will remove any trailing spaces from a field. Enable this options if you want the trailing spaces exported.

Do not export grid headings

V will export the grid headings to the first line of the CSV file. Enable this option if you do not want the headings exported.

Note

Only the first 500 lines are exported if V is unregistered.


File Chunks

The time taken to load a file (in text mode) increases as the file gets larger. When viewing really large files, it is likely that you just want to look at the start and/or end of the file. In this case, it is pointless to try and load the entire file. Why load all of a 100Mb file, when you just want to view the last few lines?

In order to keep the load time to a minimum, V breaks the file into chunks. The size of the chunk is specified in the More Options tab of the Preferences Dialog box (it defaults to 8Mb). File Chunks are enabled by default - to disable them, just clear the Enable File Chunks option.

When a file is to be viewed, V checks the size of the file, and if it is larger than the chunk size, will only load the first chunk in the file (or the last chunk if you are viewing the tail).

An extra toolbar will appear in the top right of the window, which lets you load further chunks, and an extra status bar pane also appears in the bottom of the window, which displays which chunk is currently being viewed. You may also click on this area of the status bar to display available chunk options.

Once a chunk is loaded, the scrollbars restrict movement to within the chunk. That is, sliding the vertical scrollbar all the way to the bottom, will take you to the end of the chunk, not the end of the file. Also, the displayed line numbers are not always correct when viewing a file in chunks.

Click here for further details on line numbering in chunks.

Searching is not restricted to the current chunk. If a string is found outside the current chunk, then the appropriate chunk is automatically loaded.

In the Goto Dialog Box, offsets and line numbers are relative to the start of the file, not to the start of the chunk. This means that if you were viewing the last chunk of a file, going to line 1 will take you to the very start of the file and not to the start of the chunk.

Click here for further details on Goto and chunks.

The buttons on the chunk toolbar have the following function:

First Chunk | Loads the first chunk in the file. This will be disabled if the first chunk is the chunk currently being viewed.
Next Chunk | Loads the next chunk in the file.
Previous Chunk | Loads the previous chunk in the file.
Last Chunk | Loads the last chunk in the file. This will be disabled if the last chunk is the chunk currently being viewed.
Entire File | This will load the entire file, and the chunk toolbar will disappear. Note that this may take some time, depending on the size of the file. (See note below).

Pressing the PageDown and LineDown keys while at the very end of a chunk will automatically load the next chunk. Pressing the PageUp and LineUp keys while at the very start of a chunk will load the previous chunk.

Chunks in Hex mode

File chunks do not usually apply in hex mode - the entire file is displayed, even if it is larger than the chunk size. However, if the file size is extremely large (usually > 2Gb), V will also use chunks in hex mode. This behaviour depends on available system memory and cannot be disabled.

Notes

· The end of a chunk will usually fall somewhere in the middle of a line. V tries to break a chunk at the end of a line, however, this may not always be possible. Because of this, the last line of a chunk may sometimes be the same as the first line of the next chunk.
· You may go to an absolute chunk number by using the Goto Dialog box.
· If V takes more than 5 seconds to load the entire file, it will display a progress dialog that will allow you to cancel the operation if you think it will take too long.


EBCDIC Files

When V opens a file, it tries to detect if the file is ASCII or EBCDIC. If it detects an EBCDIC file, it will automatically display it in EBCDIC mode.

If it incorrectly displays it as ASCII (text or hex), you can switch to EBCDIC mode by selecting EBCDIC from the View menu (or pressing Alt+B).

Similarly, if an ASCII file is incorrectly displayed as EBCDIC, you can return to ASCII mode by selecting ASCII from the View menu (or pressing Alt+B).

When a file is displayed in EBCDIC mode, EBC will be displayed on the bottom status bar. Clicking on EBC will allow you to modify several EBCDIC options.

Click here for details on the various EBCDIC file formats supported


EBCDIC File Formats

If V does not display the EBCDIC file correctly, you can click on EBC on the status bar (or select EBCDIC Options from the View menu) to specify the correct file format.

EBCDIC files are usually in one of 4 formats.

Carriage Return Delimited

These files are just like ASCII files. That is, each line is terminated by a carriage return (or carriage return + line feed). The only difference is that the file contains EBCDIC characters instead of ASCII characters.

To display these types of files the No Formatting (Display as EBCDIC file with CR/LF) option should be enabled.

If some EBCDIC characters are not displayed correctly, you can modify the EBCDIC to ASCII mapping in the EBCDIC tab of Preferences.

Fixed Length Records (RECFM=F)

Each line (or record) in the file consists of a fixed number of characters. To view these files, enable the RECFM=F option and enter the fixed record length in the LRECL field.

Click here for further details on viewing RECFM=F files.

Variable Length Records (RECFM=V/VB)

These files consist of variable length lines (or records). Each record is preceded by a 4 byte record descriptor which specifies the record length. V will automatically decode the records and display the lines as if they were delimited by a carriage return.

Undefined Format (RECFM=U)

By strict definition, the format of these files is Undefined (or Unknown). However in V, the meaning is slightly different. Click here for further details.

Carriage Control (CCTYPE)

Click here for details on Carriage Control.

Use ASCII Character Set

By default, EBCDIC RECFM files consist of EBCDIC characters. Enable this option if the file consists of ASCII characters.

Trailing Spaces

It is common for records/lines in EBCDIC files to be padded with trailing spaces - especially when files with variable length records are stored as RECFM=F.

Enable the Ignore Trailing Spaces option if you do not want the trailing spaces displayed.


RECFM=F

V will try to "guess" if an EBCDIC file contains fixed length records (RECFM=F) and will try to guess the fixed record length.

However, it may sometimes get the record length wrong - requiring the user to select the EBCDIC Options and enter the correct record length.

If you do not want V to guess the record length, you can enable Do not guess EBCDIC fixed record length (RECFM=F) in the File Options tab of Preferences.

If this is enabled, all fixed record length files will be displayed as Carriage Return Delimited files. To display as fixed record length files, you will need to:

1. Select EBCDIC Options from the View menu (or click on EBC in the status bar)
2. Disable the No Formatting option
3. Enable RECFM=F
4. Enter the correct record length in LRECL

Use Wrap To Length

Alternatively, you can make use of the Wrap To Length command to display the file without having to specify RECFM=F.

You can enable Wrap To Length in one of 3 ways:

1. By pressing the Wrap To Length icon on the toolbar
2. By selecting Wrap->Wrap To Length from the View menu
3. By pressing Alt+L

You will also need to specify the record length by selecting Wrap->Set Wrap Length from the View menu (or pressing Ctrl+W). V will remember the last wrap length used, so you will only need to set it if it has changed.

The disadvantage of using Wrap To Length to display RECFM=F files is that all files subsequently viewed will be wrapped to this length. That is, if they contain lines that are longer than the wrap length, they will be wrapped. You will need to remember to disable Wrap To Length after you have finished viewing the fixed record length file.


RECFM=U

RECFM=U usually means that the file format is unknown or undefined.

However, I have seen files labeled as RECFM=U which are very similar to RECFM=V files - the only difference being that they have a 2 byte descriptor length instead of a 4 byte descriptor length.

V too will refer to these files as RECFM=U.

If you have a file that is in this format (that is, each record in the file consists of a 2 byte length followed by the record data), just set RECFM to U and the file should be displayed correctly.

V may not automatically recognize RECFM=U files. If this is the case, you will have to manually set the format to RECFM=U - which can be done in one of 2 ways:

1. If V incorrectly displays the file as an EBCDIC Carriage Return Delimited file

In this case, you will be able to see most of the data, but the lines will not line up correctly. To display as RECFM=U:

· Select EBCDIC Options from the View menu (or click on EBC on the status bar)
· Disable the No Formatting option
· Select RECFM=U

2. If the file is displayed as ASCII text or hex

In this case, the data will be unrecognizable.

To display as RECFM=U, you will first need to enable EBCDIC mode by selecting EBCDIC from the View menu (or pressing Alt+B). Then perform the operations above.

Note: V will display an error message if it does not recognize the file as RECFM=U.


Carriage Control

Carriage control is used by some EBCDIC files to indicate line and page breaks.

In files that have carriage control, the first character in each line is used to indicate whether a line or page break should be placed after (or even before) the line.

Carriage control (sometimes referred to as CCTYPE) can be one of 3 types:

· ANSI (CCTYPE=A)
· Machine (CCTYPE=M)
· ASCII (CCTYPE=Z)

V does not automatically recognize files with carriage control. If your EBCDIC file contains carriage control, you need to select EBCDIC Options from the View menu (or click on EBC on the status bar) and select the correct CCTYPE.

If a file contains page breaks, V will paginate it. In particular, V will display a page marker (dotted line) before the start of each page.

Notes

· To specify the carriage control on the command line, append the CCTYPE (A, M or Z) to the /RECFM option.
· Carriage Control is only supported for EBCDIC files - not for ASCII files.


Preferences

The Preferences Dialog Box is where you configure most of the program options. You may select it from the toolbar, the View menu, or from various right-click menus.

The tabbed dialog box consists of:

File Options

Window Layout

More Options

EBCDIC

Line Numbers

Search

Editor/CMD

Fonts

Keyboard

Language

These are described in the following sections.

Note

You must press the OK button in order to save the settings that were modified in any of the tabbed dialog boxes. If you press the Cancel button, all the modifications will be lost.


File Options

Tab Size

Specifies the tab length. If you don't want V to expand tabs, leave this field blank (or set it to 1).

Date Format

Specifies what format the date will be displayed throughout the program (including when printing).

Always Open as Text

When V opens a file, it tries to determine what kind of file it is. If it is a binary file (like a JPG or EXE file) it will display the file in HEX mode, otherwise it will open it in TEXT mode. Check this option if you always want the file to be opened in TEXT mode.

Start at End of File

If this is checked, V will start viewing from the end of the file instead of the beginning

Wrap Lines to Screen

Usually, when displaying files in Text mode, V will not wrap any long lines - you will have to use the horizontal scroll bar to view lines longer than the width of the window. Check this option if you want V to wrap the lines to the width of the window. In this case there will be no horizontal scroll bar.

Wrap on Word Boundary

Usually when lines are wrapped they are wrapped at the exact position where the line would exceed the width of the window - even if it means splitting the line in the middle of a word. When this option is checked, the line is always wrapped at the end of a word.

Unmark block after copy

By enabling this option, any highlighted text will be cleared once it is copied to the clipboard (or saved to a file).

Do not restore file position

When V views a file that it has viewed before, it will restore the previous file position. Enable this option if you want V to always start viewing files from the beginning.

Hex offset in status bar

This causes the hex offset to be displayed in the status bar whenever the user clicks the mouse on a file position, while viewing a file in text mode. The hex code of the corresponding character is also displayed (in text mode only).

Display ALL hex codes

Replaces any dots (unprintable characters) on the right hand side of the hex dump with the corresponding symbol in the selected font.

Auto-sum columns

Enable this option if you want V to automatically display the sum when selecting columns.

Check STDIN on startup

If you specify the /F command line parameter, V checks the "standard input" to see if there is any redirected output to be displayed. By enabling this option, V will now automatically check for redirected output when it starts.

Use Bold Cursor

V will use a bold cross-hair cursor when viewing a file.

Save File Tailing state

V always disables File Tailing on startup. Enable this option if you want the previous File Tailing state restored.

Save Bookmarks on Exit

By default, all bookmarks are cleared when V exits. Enable this option if you want the bookmarks saved so they will be available every time you view the file.

Closing File Window to behave like pressing ESC key

While viewing a file, pressing the upper right [x] button on the window causes V to exit. By enabling this option, V will now treat the [x] button like the ESC key. In particular, if you enable the "Browse in File View" option in the Keyboard tab of Preferences, V will return to the directory listing when pressing [x] instead of exiting.

Do not scroll current line marker when using scroll bars

If the window is scrolled using the scroll bars, the current line marker is moved so that it remains visible. Enable this option if you prefer the current line marker to stay where it is.

Always scroll window when using arrow keys

Pressing the Up/Down arrow keys moves the current line marker. The window is only scrolled when the line marker reaches the bottom (or top) of the window. Enable this option if you want the window to always scroll when you press the arrow keys.

Disable Page Down on Middle Mouse Button

While viewing a file, V treats the middle mouse button as a Page Down key. This can interfere with the behavior of some mice (like the IntelliMouse) that can use the middle button (or scroll wheel) for panning. You can disable the default V behavior by enabling this option.

Prompt before reloading modified file

V will automatically reload the file it is currently viewing if it has been modified by another program. Check this option if you want V to warn you before it does this.

Do not guess EBCDIC fixed record length (RECFM=F)

When V detects an EBCDIC file, it tries to determine if it contains fixed length records. However, it can sometimes incorrectly guess the record length. By enabling this option, V will not try to guess the format. Once the file is displayed, the user will have to select the EBCDIC Options and manually select the correct format.

Do not copy CR/LF to clipboard for wrapped (to screen) lines

When wrapping lines to the screen width, V will include a newline (CR/LF) at the screen wrap position whenever the lines are copied to the clipboard. Enable this option if you do not want to include a CR/LF at the screen wrap position. That is, a CR/LF will only be included at the very end of the line.

Disable automatic CSV mode

This disables the automatic recognition of CSV files. You can still view a file in CSV Mode by pressing the CSV Mode button on the toolbar.


Window Layout

Use Existing File window to view new file

(unless SHIFT pressed)

By default, every file you view will be displayed in a separate window. Enable this option if you prefer to only have one file window open at a time. If you enable this option, you can still view files in a separate window by pressing the SHIFT key when you view the file.

Automatically Tile multiple file windows

(Auto-Arrange, Vertical, Horizontal)

Enable this option if you want multiple file windows to be automatically tiled.

Auto Arrange Grid Size

This defines the grid size used for auto-arranging.


More Options

Enable File Chunks

This indicates that V will display large files a chunk at a time, instead of reading the entire file. This greatly reduces the time taken for V to load a file.

Chunk Size

This is the size of the file chunk (in Kb). When File Chunks are enabled, V will only load this much of the file, regardless of how large the file is. The default chunk size is 8192 (ie, 8 Mb). Click here for more details on File Chunks.

Enable Smooth Scrolling

Enables "smooth" scrolling. Note that this is different from the "smooth scrolling" that programs like Internet Explorer support.

Smooth Delay

Typically a number between 50 and 200 (depending on the speed of your system). Click here for further details on Smooth Scrolling.

Enable MRU File List

Enable this option if you want V to keep a history of the Most Recently Used (MRU) viewed files.

These files will be listed on the Recent Files menu. You may also specify the number of files to remember (up to 50).

Word Sets

You may define your own wordsets which determine what is highlighted when you double-click and shift-double-click on a word. Click here for further details.


EBCDIC

This allows the mapping of the 256 EBCDIC characters to their corresponding ASCII equivalent to be modified. This is necessary because not all EBCDIC character mappings are the same - particularly when it comes to special or control characters.

The current character mapping is displayed in the EBCDIC to ASCII table. The first column of the table displays the EBCDIC code, the second displays the ASCII character which it maps to. The code in the second column is also displayed in the Current Mapping list box. For example, the EBCDIC character F0h represents a 0 (zero) which is 30h in ASCII. To modify the ASCII character to which the EBCDIC character will be mapped, simply select the new character from the Current Mapping list box.

If you wish, the mapping table may be sorted on the ASCII code, by selecting the ASCII to EBCDIC option. In this case, the first column of the table will contain the ASCII code and the second column will contain the EBCDIC character which maps to it.

Character codes can be displayed in decimal instead of hex by selecting the Display as Hex checkbox.

The Default Mapping button can be used to restore the EBCDIC to ASCII mapping to the default.

Notes

· The EBCDIC end-of-line character should be mapped to a Line Feed (LF = ASCII 0Ah) and not a Carriage Return (CR = ASCII 0Dh).


Line Numbers

V gives you several options when it comes to displaying/printing line numbers alongside the file data.

Display Line Numbers

Check this option if you want V to prefix each line displayed with its corresponding line number. Line numbers always begin at 1.

Display Line Number 1

When an increment is specified, the first line in the file (line 1) will usually not be numbered. Check this option if you want the line number displayed on the first line.

Line Number Increment

This tells V how often to display line numbers. For example, if the increment was 10, the line number would be displayed every 10 lines (lines 10, 20, 30, ...). If the increment is left blank (or set to 1), every line will be numbered.

Pad with zero (instead of space)

The line numbers are always a fixed length, depending on the size of the file. For example, if the file has 199 lines, the line numbers would contain 3 digits. Usually V will pad unused digits of the line numbers with spaces. Check this option if you want zeroes used instead. In this case V will display "001" instead of " 1".

Reset Line Numbers on New Page (if paginated)

If the file is paginated, enabling this option will reset the line number to 1 at the start of each page.

Include line numbers on Copy to Clipboard

Enable this option if you also want the line number(s) included when you copy selected text to the clipboard.

Printing Line Numbers

The above options also apply when printing a file, however they must be specified separately as they may differ from the display options. For example, you may want to display line numbers but not print them.

The option to enable line numbers when printing is not found in this dialog box, but on the main Print Dialog Box.

Two extra line number options exist when printing files.

Print First Line in Page

Check this to print the line number for the first line in each page.

Print Last Line in Page

Check this to print the line number for the last line in each page.

Note

These options only apply to Text mode. In Hex mode, the hex address is always displayed/printed.


Search

The options presented here are the same as those presented when you press the Options button in the Search Dialog box.


Editor/CMD

V is not an editor. If while you are viewing a file, you decide you want to edit it, you must do so with a separate editor. Most people will have an editor of choice on their system. If you don't, you can always use notepad.exe which should be in your WINDOWS system directory.

The Editor options tell V what editor to use to edit the file. To launch the file in your editor of choice, you need to select the File->Edit command. There are 2 options you can specify - just click on the corresponding button to set them.

Path | The full path name of your editor (usually an EXE file)
Options | The options you want passed to your editor (if any)

The above path and options will be used to construct a command that Windows will execute. The command will look as follows:

Path + Options + FileName

For example,

\bin\editor.exe /v file.cpp

Where more than one file has been selected, the file names will be appended onto the end of the command, separated by spaces.

Advanced Options

You can pass further options (like the current line number) by using option specifiers (like %L). An explanation of the available options specifiers is given in the User Commands section.

Hex Editor

If you want a different editor to be called while you are viewing a file in hex mode, simply define a second editor in the "Hex Editor" section.

Passing the MSDOS File Name

Enable the Use MSDOS file name option in each of the above cases in order to pass the MSDOS (8.3) file name to the command. This may be necessary if the specified executable is a 16-bit program which does not support long file names.

Command Processor

You can use a different Command Processor (to CMD.EXE) to launch a Command Prompt by enabling "Use the following Command Processor" and clicking on the Path button to select its path.

Notes

If you want to use more than one editor, you can define it as a User Command.

By default, you can use Ctrl+E to launch the editor and Ctrl+Shift+E to launch the hex editor.

To remove the currently defined editor, right-click on the corresponding button and select Clear Path.


Fonts

To change the fonts, simply click on the corresponding button.

Screen Font

The font used in the File View to display the contents of the file.

Printer Font

Specifies the font to be used when printing.

2UP Font

Specifies the font to be used when printing in 2UP mode.

End of Line Indicator

You can also specify which character is to be used as the End Of Line Indicator. This character will be displayed at the end of every line if the Show EOL option is set, or will be printed at the end of every line if the Print End of Line option is selected in the Print dialog box.

Use DOS/OEM character set when viewing file

This is equivalent to the DOS/OEM Char Set option (on the View menu while viewing a file).

Use DOS/OEM character set when printing

The same as above - but for printing. Enable this option if you are printing files that contain line drawing characters. Note that this will only work if the selected font supports the OEM character set.

Notes

· V only allows use of non-proportional (or fixed-pitch) fonts (like Courier) when displaying files. This makes file display, block highlighting and line wrapping much quicker than would be possible using proportional fonts (like Arial or MS Sans Serif).
· Screen fonts can also be selected from the Fonts menu.
· When printing, it is usually best to use the printer's own built in font (if it has any) - it looks much better than Courier. For HP LaserJet printers, you should be able to select a font called LinePrinter. Printer fonts have a small printer icon next to them in the Font Selection List.
· Proportional fonts may be chosen when printing, however, line wrapping will not work correctly. Click here for further details.
· Not all fonts share the same character set. Because of this, you may need to reselect the End Of Line Indicator whenever you select a new font.
· The Printer fonts may also be selected from the Print Dialog box.


Keyboard

Page Up/Down to go to start of page if file is paginated

If a file is paginated, enabling this option will cause Page Up/Down to scroll to the start of a new page instead of scrolling the length of the window. Click here for further details on paginated files.

Escape Key

The following options determine how the Escape key is treated.

Close File Window

Pressing ESC will simply close the file window.

View Next File

If more that one file has been specified on the command line (eg, VIEW *.txt), pressing ESC will view the next file.


Language

The Language tab allows you to select V's user interface language (ie, the language used to display the menus, dialogs and messages).

Note

V needs to be restarted for the new language to take effect.


Favorites

Favorites provide an easy way to bookmark frequently viewed files and directories for faster retrieval. Once saved, a favorite may be viewed by selecting it from the Favorites menu.

The currently viewed file or directory may be added to the Favorites by selecting the Add to Favorites option from the Favorites menu.

When adding a favorite, you can give it a meaningful description which will be displayed in the Favorites menu. If you do not, the path name will be displayed.

You can also store the favorite in a "Folder" by highlighting a folder name in the "Create in" list. You can create a new folder by pressing the "New Folder" button. Favorites stored in folders will appear in popup menus off the main Favorites menu.

The favorites may be modified by selecting the Organize Favorites option.


Add To Favorites

Adding a Directory

When adding a directory to the Favorites, you may set the following options:

Restore File Mask

If this is enabled, the current file mask will also be restored when the favorite is selected.

Restore Sort Order

If this is enabled, the current sort order will also be restored when the favorite is selected.

Adding a File

You will usually add a file to the Favorites while you are viewing it. When adding a file to the Favorites, you may set the following option:

Restore File Position

If this is enabled, the current file position will be restored whenever the favorite is selected. Otherwise, the file will be viewed from the start.

Executing a Favorite

You can also add a file to the Favorites from the Directory View by highlighting it and selecting "Add Selection to Favorites" from the Favorites menu. You will then have the option of enabling the Execute option. If this is enabled, the file will be "executed" when selected from the Favorites menu. Otherwise, it will be displayed.

For example, if you add a "Word Document" to your Favorites, enabling the "execute" option will cause the file to be loaded in Word when you select it from the Favorites menu (instead of being displayed by V).


Organizing Favorites

You may add, delete, move and edit favorites by selecting "Organize Favorites" from the Favorites menu. A favorite may be moved to a new position by simply dragging it and dropping it into its new position. The favorite will be placed before the entry on which it was dropped.

Favorites may be created by pressing the "Insert File" or "Insert Directory" buttons. "Insert Copy" will create a copy of the currently highlighted favorite. "Insert Separator" will insert a separator into the Favorites menu.

Organizing into Submenus

If you have many favorites, you will probably find it useful to organize them into submenus. To create a new submenu, press the "Insert Submenu" button.

To move a favorite into an empty submenu, simply drop it onto the submenu name. If the submenu is not empty, it will expand so you can drop the favorite into the required position. The dropped favorite will be placed *before* the entry it is dropped on. If you want to place the favorite at the *end* of the submenu, drop it onto the submenu name you want it placed under.

If you want to move a favorite so that it is positioned just before a submenu, you need to press the SHIFT key as you drop the favorite onto the submenu you want it to precede. If you do not press the SHIFT key, the favorite will be placed inside the submenu.

For further details on modifying favorites, see the following:

Favorite Directories

Favorite Files

Sorting Favorites

Using Numeric Drive Letters in path names

Pressing the More button displays a menu that allows you to sort, export and import.

Note

You cannot create a submenu within a submenu.


Favorite Directories

The following may be specified for a favorite directory:

Directory Path

The directory name. Press the "..." button to browse. You can use numeric drive letters in the directory path which will be expanded depending on the environment in which V is being run. Click here for further details.

Pressing the small question mark button will display a list of valid drive letters.

File Mask

The file mask to use when the favorite is selected. If this is blank, the current mask will be maintained.

Restore Sort Order

If this is enabled, the specified sort order will be set when the favorite is selected. Otherwise, the current order will be maintained.

Shortcut Key

You can assign a keyboard shortcut to this Favorite so that is it executed every time the keyboard shortcut is entered. Simply click in the Shortcut Key box and enter the desired key combination. Press the ESCape key to clear the shortcut key. A beep will sound if the shortcut key is currently assigned.

Blank Directory

The directory name may be left blank. In this case, only the file mask and/or sort order will be modified.

This provides an easy way of changing the file mask and or sort order for the current directory. For example, you could display all the ZIP files in descending date order by simply selecting a favorite.


Favorite Files

The following may be specified for a favorite file:

File Path

The file name. Press the "..." button to browse. You can use numeric drive letters in the file path which will be expanded depending on the environment in which V is being run. Click here for further details.

Tail

If this is enabled, the file position is set to the end of the file.

Hex

The favorite is viewed in Hex mode.

EBCDIC

The favorite is viewed in EBCDIC mode.

Restore File Position

If this is enabled, the file position will be restored. Otherwise, the file will be viewed from the start.

The file position consists of:

Line Number

The line number at which to position the file. If the file is to be opened in Hex mode, this will refer to a Hex offset instead of a line number.

Column

The column position.

Chunk

The chunk to load (if the file is large enough to be loaded in chunks)

Shortcut Key

You can assign a keyboard shortcut to this Favorite so that is it executed every time the keyboard shortcut is entered. Simply click in the Shortcut Key box and enter the desired key combination. Press the ESCape key to clear the shortcut key. A beep will sound if the shortcut key is currently assigned.

Blank File name

The file name may be left blank. In this case, only the file position and/or mode will be modified.


Sorting Favorites

Pressing the More button and selecting the Sort option will display a dialog box, allowing you to sort the Favorites.

By default, the Favorites will be sorted alphabetically on their description, regardless of whether they are a file, a directory or a submenu. The following options can be set to modify the default behavior.

Place Files before Directories

If this is enabled, all files will be placed at the top of the list.

Place Directories before Files

Enable this to place all directories at the top of the list.

Place Submenus at top

Enable this, to place all submenus at the top.

Place Submenus at bottom

Enable this, to place all submenus at the bottom.

Sort Submenu contents

By default, submenu contents will not be sorted. Enable this option to also sort submenus.


Exporting/Importing Favorites

Pressing the More button and selecting the Export option will display a dialog box allowing the Favorites to be exported to a file.

The exported file can then be imported by another user by selecting the Import option and specifying the imported file.

Note

User Commands and GridLines can also be exported/imported in the same way as Favorites.


Using Numeric Drive Letters in Paths

When specifying a file or directory path (in Favorites and User Commands), certain numeric drive letters can be used to specify various system paths.

The following drive letters are currently defined:

0: | The folder from where V is being executed.
1: | The Windows folder (usually C:\Windows)
2: | The System folder (usually C:\Windows\System32)
3: | The Portable Drive (eg, X:\)
4: | The folder on the portable drive where the V settings are stored.
5: | The user's My Documents folder
6: | The user's Program Files folder
7: | The user's Profiles folder (usually C:\Documents and Settings)

Note

Numeric Drive Letters can also be used when specifying a text editor and a Command Processor.


User Commands

A User Command is any program (usually an EXE file) that the user may wish to execute from V.

In the Directory View, the currently selected file(s) may be passed to the User Command and in the File View, the currently viewed file may be passed to the command.

This is a great way to extend V.

For example, V cannot encrypt files. However, if you already have a program which does this, you can define a User Command which will let you encrypt files using V.

User Commands are created by selecting Organize from the UserCommands menu. Once created, User Commands are executed by selecting them from the UserCommands menu.

Keyboard Shortcuts

The default User Command is the first in the list and can be executed by pressing Ctrl+U. The most recently executed User Command can also be repeated by pressing Ctrl+Shift+U. Each User Command can also be assigned its own keyboard shortcut.

Running as Administrator

Under Vista or Windows 7, the User Command can be run as an Administrator by right-clicking on the command and selecting Run As Administrator

Debug Mode

If you right-click on the User Command and select Run in Debug Mode, the command to be executed will be displayed before it is run. You will then have the option of running the command or cancelling it. This is a good way of making sure that the correct file names are being passed to the command.

Click here for further details on defining User Commands.

User Command Options

User Command Option Specifiers


Organizing User Commands

Organizing User Commands is very similar to Organizing Favorites.

You may add, delete, move and edit User Commands by selecting "Organize" from the UserCommands menu. A command may be moved to a new position by simply dragging it and dropping it into its new position.

User Commands may be created by pressing the "Insert Command" button. "Insert Copy" will create a copy of the currently highlighted command. "Insert Separator" will insert a separator into the UserCommands menu.

Organizing into Submenus

If you have many User Commands, you will probably find it useful to organize them into submenus. To create a new submenu, press the "Insert Submenu" button.

To move a command into an empty submenu, simply drop it onto the submenu name. If the submenu is not empty, it will expand so you can drop the command into the required position. The dropped command will be placed *before* the entry it is dropped on. If you want to place the command at the *end* of the submenu, drop it onto the submenu name you want it placed under.

If you want to move a command so that it is positioned just before a submenu, you need to press the SHIFT key as you drop the command onto the submenu you want it to precede. If you do not press the SHIFT key, the command will be placed inside the submenu.

For further details on modifying User Commands, see the following:

Specifying User Command Options

Using Option Specifiers

Using Numeric Drive Letters in path names

Pressing the More button displays a menu that allows you to sort, export and import.

Note: You cannot create a submenu within a submenu.


User Command Options

To define a User Command you must specify the following information and options:

Command Path

The full path name of the command to be executed. Press the "..." button to browse.

%A can also be entered as the command path. In this case, it will be replaced by whatever program is associated with the selected file when the User Command is invoked.

Numeric drive letters can be used in the file path, which will be expanded depending on the environment in which V is being run. Click here for further details. Pressing the small question mark button will display a list of valid drive letters.

Shortcut Key

You can assign a keyboard shortcut to this User Command so that is it executed every time the keyboard shortcut is entered. Simply click in the Shortcut Key box and enter the desired key combination. Press the ESCape key to clear the shortcut key. A beep will sound if the shortcut key is currently assigned.

Command Options

The options that will be passed to the command (if any). This will usually look something like /option1 /option2. The options may also contain option specifiers which are expanded when the user command is run.

Options after file name

Will place the command options after the file name. See the explanation of the Command Format below.

Start in Command Path

By default, the working directory of the User Command will be the directly currently being viewed or the directory of the current file. By enabling this option, the working directory will be set to the directory that contains the User Command.

Run As Admin

Enable this (on Vista and Windows 7) to run the command as an Administrator.

Window

This describes the state of the User Command window when it is executed. It may be either Normal, Minimized, or Maximized.

Do not pass File names

By default, any selected files (or directories) will be passed to the command. Enabling this option will cause nothing to be passed to the command (apart from the Command Options).

Prompt for extra options

By enabling this, the user will be prompted for extra options that will be passed to the command. These options will be appended to any options in Command Options.

Use MSDOS names

If any files are selected, the MSDOS (8.3) form of the file name will be passed to the command.

Do not allow multiple files

Enabling this option will ensure that the command is not executed when more than one file is selected.

Execute command for each file

If multiple files are selected, all the file names will be passed to the User Command, and the command will be executed once. By enabling this option, the User Command will be executed for each selected file.

Wait for command to finish

When executing a User Command, V simply launches it and then gets back to business - it does not wait for the command to terminate. In the above case, executing a User Command for each selected file can result in multiple instances of the same program being active at the same time. By enabling this option, V will only execute the User Command on a file once the command on the previous file has finished.

Debug Mode

If this option is enabled, the User Command will be displayed, and the user asked to confirm if it is to be executed. This allows the user to experiment with option specifiers without actually having to execute any commands.

Default User Command

The default user command may be executed by pressing Ctrl-U. The default user command is considered to be the first command in the User Command list.

Command Format

By default, the actual command that V will execute will look as follows:

[Command Path ] [Options] [Extra Options] file(s)

If "Options after file name" is enabled the command will look as follows:

[Command Path ] file(s) [Options] [Extra Options]

In the case where more than one file name is selected, all the file names are included on the command line, separated by spaces.

Notes

·
· If a option specifier is used in the Command Options, any selected file names are not automatically added to the command line. If the user wants the file name(s) passed to the command, the appropriate file name specifier (%f or %F) needs to be used.


Option Specifiers

User commands are constructed by appending the selected file name(s) to the command options. Although there is an option to place the options last, no further flexibility is available. For example, you cannot place some options before the file name(s) and some after.

Unless you use Option Specifiers.

Option specifiers are entered in the Command Options and are expanded when the command is executed. An option specifier consists of a percent sign (%) followed by a single character. The valid specifiers are as follows (note that case is important):

F | The selected file name(s) - includes fully qualified path
f | File name only (no path)
G | The fully qualified selected file names(s) with any extension omitted
g | File name only with extension omitted
D | The name of the current directory - includes fully qualified path
d | Directory name only
Z | The name of the ZIP file - fully qualified path (Zip View only)
z | ZIP file name only
T or t | The currently selected text (File View or Search Results View
U or u | The currently selected (or right-clicked) URL
W | The currently selected (or right-clicked) word (using word set 1)
w | using word set 2
X | The column number of the start of the selected text
x | The column number of the end of the selected text
Y | The line number of the start of the selected text
y | The line number of the end of the selected text
l | The number of the current line
L | The line number at the top of the display
n | The number of characters highlighted (in decimal)
N | (in hex)
s | The start offset of the selected text (in decimal)
S | (in hex)
e | The end offset of the selected text (in decimal)
E | (in hex)
P or p | Prompts the user for "extra options" which will be appended to the Command Options

Note

A User Command will not be executed if a option specifier cannot be expanded. For example, if %W is specified and no text has been selected.


Sorting User Commands

Pressing the More button and selecting Sort will display a dialog box, allowing you to sort the User Commands.

By default, the User Commands will be sorted alphabetically on their description. The following options can be set to modify the default behavior.

Place Submenus at top

Enable this, to place all submenus at the top.

Place Submenus at bottom

Enable this, to place all submenus at the bottom.

Sort Submenu contents

By default, submenu contents will not be sorted. Enable this option to also sort submenus.


Exporting/Importing User Command

Pressing the More button and selecting the Export option will display a dialog box allowing the User Commands to be exported to a file.

The exported file can then be imported by another user by selecting the Import option and specifying the imported file.


Print Options

When the Print command is selected, the Print Dialog Box will appear (which is different from the standard Windows Print Dialog Box). The following options may be specified:

Printer

The name of the printer to send the file to. All available printers will be listed in the drop-down list box.

Header & Footer

Check the appropriate box to print a header and/or footer. The text for the header/footer is entered in the corresponding edit box. A history of the previous 10 headers is maintained making it easy to select commonly used headers. Click here for a description of the Headers and Footers formats. If a header/footer is enabled, but no text entered in the edit box, the default header/footer is printed.

Override Page Length

This option is used if you want your page size to have a certain length (in lines). Click here for further explanation.

Copies

The number of copies that you want printed.

Printer Font

This button will display the font that V will use for printing. Click here for more details.

Profile

This allows you to save all current settings in a Printer Profile or to restore the settings in a profile. Click here for further details.

2Up

Specifies that you want the document printed in 2UP Mode.

Hex Mode

This option can only be set if the print was initiated from the Directory View and specifies if the file is to be printed in Hex mode. If the print was initiated from the File View, this option would be disabled and would indicate the mode in which the file was being viewed.

Vertical Hex Mode

Prints the file in Vertical Hex Mode

Greenbar

Apply Greenbar to the printed text.

Print Line Numbers

Specifies whether line numbers will be printed with the file. Various options regarding the printed line numbers are set in the Line Numbers tab of the Preferences Dialog box. Note that the format of the printed line numbers can differ from that of the displayed line numbers.

Print End of Line

Enable this option if you want an End Of Line (EOL) indicator printed at the end of every line. The character that is used for the indicator depends on the font used and can be specified in the Fonts tab of the Preferences dialog box.

Duplex (long edge) / Duplex (short edge)

If your printer supports duplexing (double sided printing), you may also specify if you want to enable short/long edge binding. Note that the duplex options are always enabled - even if

your printer does not support duplexing.

Wrap Long Lines

Click here for an explanation of line wrapping.

Form Feeds

This determines how Form Feeds will be handled. Click here for an explanation.

Margins

Set the size (in inches) of the top, bottom, left and right margins. Click here for further details.

Portrait/Landscape

Specifies if the file is printed in Portrait or Landscape mode. Note that this option is ignored if the file is to be printed in 2UP mode (which is always printed in Landscape).

Page #

Select the pages you want printed. Click here for further details.

Line #

Select the lines you want printed. Click here for further details.

Sides

This lets you select if you want all pages printed or just the odd/even numbered pages (which makes double sided printing possible).

Setup

The Setup button is used to configure the selected printer. The Print Setup command from the File Menu can be used to configure the default printer.

More

Click here for further details.

Notes

It is always a good idea to do a Preview before printing - especially if the printout is going to be large.

Greenbar may not always preview correctly - but it should print correctly.


Wrapping Lines

If a line is too long to fit on the printed page, you can have it wrap to the beginning of the next line by checking the Wrap Long Lines option.

You must then select the type of wrapping from the adjacent list box. This can be one of:

Right Margin

In this case, the text is wrapped whenever a line reaches the right margin.

Column

Select this option to have the text wrapped at a specified column position (which you enter in the adjacent box).

New Page

When this is selected, long lines are wrapped onto a new page. For example, if a page is 100 characters wide, a line of 300 characters will span 3 pages. That is, the first 100 characters will be printed on the first page, the second 100 on the next and the third 100 on the next.

Notes

· If this option is not enabled, any long lines will be truncated.
· If you select column wrapping and the column length is too long to fit on the page, the lines will be truncated.


Print Range

This lets you specify what part of the file you want printed. You may select one of the following:

All

Prints the entire file

Page #

Prints the range of pages you specify in the From and To boxes.

Line #

Prints the range of lines you specify in the From and To boxes.

Selection

Prints the currently selected text. If no text is selected, this option will be disabled.

From Current Page

Starts printing from the start of the current page - which is the line that is currently displayed at the top of the screen. The number of pages to print is specified in Pages. If this is left blank, V will print to the end of the file.


Headers and Footers

User defined headers and footers can be printed on every page. Headers (and footers) each consist of 3 sections - left, center and right, which are left justified, centered and right justified, respectively. To specify a header, you enter each of these 3 sections, separated by a semi-colon. That is - "left;center;right" (do not include the quotes).

Each of these sections can contain plain text, special format specifiers or can be empty. The format specifiers consist of a percent (%) followed by one character, and are expanded upon printing. The valid specifiers are as follows (note that case is important):

%f | Name of the current file (name only)
%F | Full Path Name of current file
%d | Current Date
%D | Directory Name (ie, %F without the file name)
%e | File Date
%t | Current Time (24 hour format)
%T | Current Time (12 hour format)
%u | File Time (24 hour format)
%U | File Time (12 hour format)
%p | Current Page Number
%P | Total pages to be printed
%r | Print the Ruler
%g | Print the Gridlines

If you want to use a "%" or ";" in the header text - prefix them with a "%". That is, use "%%" and "%;" respectively.

Examples: (once again, do not enter the quotes)

"%f;;Page %d" | Print the file name on the left and page number on the right
";%d;" | Just print the page number (with no text) in the center
";;" | Prints an empty header/footer

If the header/footer field is left blank, it defaults to "%f;%d %t;Page %p". That is, it prints the file name on the left, the date and time in the center, and the Page number on the right.

Notes

· The ruler and gridlines cannot be combined with any other specifier (only each other). For example, you cannot combine the ruler with a page number. If "%r" is specified, then anything else that may be entered in the header/footer is ignored (with the exception of %g).
· If both a ruler and a grid are specified ("%r %g" or "%g %r"), the grid will always be displayed after the ruler if printed as a header, and before the ruler if printed as a footer.
·


Form Feeds

Form feed characters (ASCII 12 or Ctrl-L) are generally used in text files to signify a page break.

You may select one of the following 3 Form Feeds options in the Print Dialog Box:

New Page | V will start a new page every time a form feed is encountered.
Draw Line | A page separator (dotted line) will be printed whenever a Form Feed is encountered - a new page will not be started.
Ignore | The form feed will be treated as a normal character - and will be printed. The appearance of the printed form feed will depend on the print font.


Margins

The margins specify the distance from the text to the edge of the page in each direction and are always specified in inches. For those who are only familiar with centimetres, 1 inch is equal to 2.54cm.

Modifying the size of the margins affects the size of the page that is available to print the file - the larger the margins, the smaller the area available to print the file.


Page Length

Usually, the number of lines that can fit on a page is determined by the physical length of the page, the size of the margins and the height of the printer font.

At times, files are pre-formatted to a particular page length (usually around 60 lines). That is, the file usually contains it's own header and/or footer every 60 lines. Printing a file which has been pre-formatted to 60 lines on a page that is physically 66 lines long will look awkward - headers and footers will start appearing all over the pages, instead of where they should be!

To overcome this problem, you can override the physical page length by specifying the length of the printer page. This causes V to start a new page as soon as the specified number of lines has been printed instead of waiting until the end of the page.

Notes

· The page length specified must be less than or equal to the maximum page length allowed by the printer.
· Pre-formatted files usually contain their own header/footer, so you will probably have to disable V printing any of its own.
· If your listing is already formatted to a certain page length which is larger than your printer page length, you will have to increase the size of the printer page (by reducing the top and bottom margins and/or disabling the header/footer) or reduce the size of the printer font.
· Some files contain form feed characters (Ctrl-L or ASCII 12 decimal) to indicate a page break. V will start a new page whenever it encounters a form feed.


2UP Printing

2UP printing would probably have to be one of the most useful (and most used) features of V. At least it is for me!

2UP printing not only saves paper, but I find the listings actually look better and are easier to read, since you have more information on the one page.

When files are printed in 2UP mode (also known as book mode), the file is printed in Landscape mode with two pages being printed (side by side) on each sheet of paper.

2UP printing is ideal for program listings, hex dumps and README files.

Notes

· When printing in 2UP mode, you should use a smaller font than you would use for normal printing. On a HP LaserJet, the built-in LinePrinter font is ideal.
· See the Fonts section of the Preferences Dialog box for further information on selecting Printer fonts.
· The Orientation option (Portrait/Landscape) is ignored when 2UP printing is selected - the printer is always placed in Landscape mode.


Printer Fonts

The font that V will use for printing will be displayed in a button just above the "Options" group in the dialog box. You may change the font by clicking on the button and selecting a previously used font from the list displayed. You may add a font to the list by selecting Add Font.

Select Organize Fonts if you want to modify the font list.

When you change printing modes (Hex/Text and 2Up/Normal) V will automatically select the font last used in that mode.

Proportional fonts

Proportional fonts may not be selected for displaying files but they may be selected for printing. Proportional fonts will not work well for program listings and hex dumps since the spacing between characters is not fixed (it is proportional). However, proportional fonts may be preferable for printing text files.

Line Wrapping

Line wrapping will not work correctly if a non-proportional printer font is selected. In particular, the lines will usually wrap well before the end of the page.

If proportional fonts are used, it is suggested that the Wrap Long Lines option not be set.

Note

Selecting Fonts from the menu on the More button allows the user to select a new printer font. This is equivalent to selecting fonts from the Preferences dialog box. However, the font selected will not be added to the font list which is displayed when clicking on the button displaying the current print font.


More Printing Commands

Pressing the More button allows you to select one of the following:

Fonts

This allows the user to select a new printer font. The font selected will not be added to the font list that is displayed when pressing the button displaying the current font.

Text Only Options

Sets the options for Text Only Printing

Start Text Only Printing

Starts Text Only Printing

Start Raw/Binary Printing

Starts Raw/Binary Printing

Apply Settings & Exit

This saves the print options and closes the Print dialog box. Note that pressing the Cancel button will not save any options that have been modified.

Note

You can start Text Only and Binary printing from the command line by specifying the /PX and /PB command line options respectively.


Text Only Printing

Text Only printing causes V to send text directly to the printer, bypassing the Windows printer driver. This will normally be used to print to a very old printer that is not supported by Windows.

There are 2 ways of starting Text Only printing.

The first is to simply select Start Text Only Printing from the menu that is displayed when you click on the More button.

The second is to print to a printer that uses the Generic/Text Only printer driver. This is usually found under the manufacturer of Generic in the Add Printer Wizard. If a generic printer driver is used, V will bypass the Windows driver and print directly to the printer (unless Text Only printing has been disabled).

Text Only printing may be configured by selecting Text Only Options from the menu that is displayed when the More button is pressed. You will probably need to know certain technical information about the printer in order to configure it correctly (do you still have the manual?). The following options may be specified:

Disable Text Only Printing

Enable this if you really want to use the Windows printer driver (which will normally be bypassed).

Page Size

The page size of the printer in columns and rows. The column size will usually be 80 or 132 and the number of lines between 60 and 66.

Margins

The number of columns (or lines) to skip before printing each page. Note that the Page Size should include the margins. For example, if the page width was 80 columns and the left and right margins were 5 characters, the printable page width would be 70 characters.

Send after each LINE

This tells V what to send to the printer at the end of a new line. It will usually be one of:

CR Carriage Return (Hex 0D)
LF Line Feed (Hex 0A)
CRLF A CR followed by a LF
Other You may specify and of end of line character sequence if it is not one of the above. The format of the character sequence is described below.

Send after each PAGE

What to send to the printer at the end of each page to advance to the next page. It will usually be one of:

FF Form Feed (Hex 0C)
Blank Lines Advances to the next page by a series of blank lines (dependant on the page height).
Nothing Send nothing
Other Specify your own end of page character sequence.

Send at Start of file

Character sequence to send at the start of the file (perhaps to put the printer in condensed mode).

Send at END of file

Character sequence to send at the end of the file.

Delay after each LINE and/or PAGE

You may also tell V to wait after printing each line and/or page. The delay is specified in milliseconds. For example, 500 milliseconds equals half a second.

A delay may be necessary if you find that the printer is losing characters due to its buffer not being large enough.

Character Sequence Format

To specify a character sequence to be sent to the printer, simply type in the characters (if they are alphanumeric). For control characters, type a % followed by the 2 digit hex code.

For example, to send a LF/CR instead of a CR/LF you would specify %0a%0d. To send the ESCAPE (hex 1b) character followed by the letter A you would specify %1bA.

Notes

See also Raw/Binary Printing

Print Preview will probably not work correctly for Text Only printing.

The above options can also be specified on the V command line.


Raw/Binary Printing

Text Only printing lets you send the file directly to the printer, bypassing the Windows printer driver.

This is only really useful for printing *text* files, as V will try to paginate the files. That is, start a new page depending on how many lines in a page.

Raw/Binary printing, however, does not paginate the file. It sends the file unmodified to the printer.

Raw/Binary printing can be used to print a file that already contains printer control codes, and needs to bypass the printer driver in order to print correctly.


Printer Profiles

A Printer Profile is a collection of printer settings (header, footer, font, margins, orientation, etc).

To save the current printer settings in a profile, click on the Profile button and select Save in New Profile. You will then be asked to enter a profile name. This name will appear in the Profile drop-down list box in the Print dialog box.

When a profile is selected from this list box, all the printer settings stored in the profile will be restored.

Once a profile has been selected, any settings changes will not automatically be saved back to the profile. You will need to do this manually by clicking on the Profile button and selecting Save in Current Profile.

When a profile has been modified (without being saved), the Profile list box will display "Profile Name (Modified)" to indicate that the current settings are different from the saved profile. Note that this will not happen as soon as the options are modified - but the next time the Print dialog box is displayed.

Default Profile

A default profile can be defined by clicking on the Profile button and selecting Set as Default Profile.

Defining a default profile allows the user to revert to the default profile settings whenever V is started or after a specified number of minutes from the last print. To configure this, click on the Profile button and select Default Profile Options.

Notes

The /Profile: command line option can be used to specify a printer profile

Profiles cannot be used to save Text Only options

Profiles are stored as .vprofile files in the user's Application Data folder - usually in:

C:\Documents and Settings\UserName\Application Data\V\Profiles\


Keyboard Shortcuts

Most of the Menu and Toolbar commands in V have a keyboard equivalent (and in many cases, more than one).

To many, it may seem that a lot of the keys have been selected at random. I'd like to think that there is a bit more to it than that. Many V users have been using PCs for a long time and they all have their own preferences when it comes to utilities, and in particular, to editors.

No one wants to learn a new set of keyboard commands. Windows and CUA was supposed to fix all this, but try telling someone who uses vi all day (a lot of people still do!) that they have to press "Ctrl-F" to search, when they are used to typing "/".

Most of the keyboard shortcuts can be customized. This allows the user to define a new keyboard shortcut or to re-assign an existing one. Click here for details.


Customizing the Keys

The keyboard can be customized by selecting Customize Keyboard from the Tools menu.

A tree will be displayed that will contain the top level menus in each of V's four views (Directory, File, GREP and ZIP). Commands that do not appear on any menus (like Goto Directory Box in the Directory View and Page Down in the File View) are listed underneath the Other branch of the corresponding view..

When you expand the tree and click on of the commands, the shortcut keys currently corresponding to that command (if any) will be displayed underneath Shortcuts for Selected Command.

Note that a command can have multiple shortcuts keys assigned to it. A key listed in bold (eg, Alt+0) indicates that the key cannot be deleted (or re-assigned). However, extra shortcut keys can be defined for that command.

The above screenshot shows the keys currently assigned to Find Next (A, Ctrl+L, Ctrl+N and F3).

The selected shortcut is used in indicates that the selected key (A) is currently only defined in the File view.

The selected command is available in indicates that the Find Next command is only available in the File view.

Click on the following for further details:

Adding/Deleting Keys

List of Keys


Adding/Deleting Keys

To delete a shortcut key, simply select the key and press the Delete button. To assign a new shortcut to the command, click in the Add Shortcut Key box, enter the new key (or key combination) and press the Add button. Press the ESCape key to clear the Add Shortcut Key box.

When adding a new key, Shortcut Currently Used By will display any existing command that the key is already assigned to. Pressing the Goto button will take you to the menu command that is currently used by the key.

When adding or deleting a key, it will be added to (or deleted from) all available views unless Only Add to/Delete from current view is enabled.

For example, Ctrl+Enter displays the File Properties in the File, Directory and GREP views. By enabling Only Add to/Delete from current view, it is possible to only redefine Ctrl+Enter in the File View and maintain its existing functionality in the Directory and GREP views.


Export/Import Keys

Press the Export button to export the shortcut keys to a .vkey file. Note that only the keys that have been customized by the user are exported to the file.

Press the Import button to import the customized keys from a .vkey file. Any keys that you have customized will remain customized, unless they have been redefined in the .vkey file.

Note

The .vkey file should not be edited


List of Keys

The List of Keys tab displays a list of all the keys currently used by V.

An X is displayed in a column if that key is available in the corresponding view. The four views are:

Dir The Directory View (ie, the Directory Listing)

File The File View (viewing the file contents)

Grep The GREP View (where V displays the GREP results)

Zip The ZIP View (viewing the contents of a ZIP file)

The Other column can contain one of the following:

FAV The key is assigned to a Favorite

UCMD The key is assigned to a User Command

FONT The key is assigned to a font

GRID The key is assigned to a grid

You can delete a key by right-clicking on the key in the list and selecting Delete Key(s). Note that keys displayed in bold cannot be deleted (and therefore, cannot be re-assigned).

Scroll Keys

If you press a key while viewing the list of keys, the list entry corresponding to that key will be selected (if it exists). For example, if you press Ctrl+A, the first list entry for Ctrl+A will be selected. Pressing Ctrl+A again will select the next entry for Ctrl+A (if it exists).

This causes a problem if you use one of the scroll keys to scroll the list (like PageUp/PageDown). Pressing PageUp will select the PageUp key in the list instead of scrolling the list. If you prefer the scroll keys to scroll the list, enable the Scroll keys for the above list option.

Sorting the List of Keys

The list of keys can be "sorted" by clicking on one of the column headers. Sorting on one of the view types (Dir, File, Grep, Zip) will display all of the keys defined in the corresponding view at the top of the list. For example, sorting on Dir will display all of the keys defined in the Directory View at the top of the list.


Right-click / F1

If you are not sure how to go about doing something in V - right click. This will usually display a menu of all the available commands.

Alternatively, pressing F1 will usually display context sensitive help.


Use Line Numbers as a margin

V does not (yet) allow a left hand margin while viewing text. However, a good workaround is to enable the Line Numbers display.


Determining Column Position

Use the Floating Ruler and Grid Lines to determine if your data is in the correct column.

Also, if you press the left mouse button over the start of the character (and keep it pressed), the corresponding line and column are displayed on the status bar. In Hex mode, the corresponding file offset is displayed.


Viewing Redirected Output

Use V to view redirected output


File Merging

V makes it very easy to merge portions of several files into one. To do this, just use the Copy to File command.

Simply select the first portion you want merged and save it to a file. Then do the same with the other portions and save them to the same file - selecting the Append option when you are warned that the file already exists.


Use 2UP Mode

If you have not used 2UP Printing (and you have a printer) then please try it. I think you will find it very useful.

You can also print from the command line. For example,

V File.txt /2up


Character Translation

If you do not have any need to view EBCDIC files, then you could use the EBCDIC mode to act as a file filter or character translator.

For example, you could modify the EBCDIC mapping table so that all lower case characters were mapped to upper case. Switching to EBCDIC mode would simply display the file in upper case.

Note

Unfortunately, only one mapping table may be defined.


Fixed Length Records

You can use the Line Length information provided by the File Attributes command to verify that every line in the file is the same length.

In this case, the length of the shortest line should be the same as the length of the longest line.


Support and Feedback

The latest information on V, including the latest version of the program, FAQs and documentation, can always be found on the V web site:

http://www.fileviewer.com/

Support for V is via email. Please send all questions, feedback and bug reports to:

v@fileviewer.com

Please note that email is always replied to promptly. You should receive a response within 48 hours and usually within 24 hours. If you have not received a reply to a question within 48 hours, please do not think that you are being ignored - the chances are that your email (or the response) has gone missing - unfortunately these things sometimes do happen! In this case, please re-send the email.


Error Reporting

If V crashes, it will display a message saying that it encountered an unexpected problem and that it cannot continue.

Press the Send button to send a detailed report to fileviewer.com for analysis.

Error reports can also be sent to fileviewer.com by selecting Send Error Report from the Help menu

You will be presented with a list of crash files (Crash-xxxx.dat) and a log file (V.log). Simply select the files that you want to send and press the Send button.

Please include a description of what you were doing just before the crash.


Suggestions

Feedback on how to make V a better product is always appreciated. If you have any suggestions at all (no matter how insignificant you may think they are), please send them to the address below.

Even feedback on why you do not like V is gratefully accepted. After all, "you can't please all of the people, all of the time".

Please email any suggestions to:

v@fileviewer.com


Copyright

 Top Previous

VIEW is a licensed version of The V File Viewer.

The V File Viewer is Copyright © 1996-2015 Charles Prineas. All Rights Reserved.

http://www.fileviewer.com/

V implements regular expressions using the PCRE library written by Philip Hazel.

PCRE is Copyright © 1997-2012 University of Cambridge.

Take Command is Copyright © 2015, Rex Conn and JP Software Inc. All Rights Reserved.


Some Examples

 Top

Below are some examples of how regular expressions can be used. Note that the quotation marks are not part of the expression.

Replace "ABC" with "XYZ"

This will replace the first occurrence of ABC in the file name with XYZ.

Replace "ABC" with ""

This will delete the first occurrence of ABC (if it exists).

Replace "^ABC" with XYZ

This will replace ABC with XYZ only if it is located at the very start of the file name.

Replace "^ABC(.*)$" with "\1ABC"

This will move ABC from the start of the file name (if it exists) and will place it at the end of the file name.

Replace "^(.)(.*)(.)$" with "\2"

This will delete the first and last character of the file name.

Replace "^(.)(.*)(.)$" with "\3\2\1"

This will swap the first and last character of the file name.

Replace ".*" with "File%04d"

This will create files named File0001, File0002, ...


Auto Incrementing (Sequencing Files)

 Top

You may use %d in the replace string to insert a number in the file name.

When renaming multiple files, the first file will use the number specified in "Start numbering from". Subsequent files will increment the number by 1, unless a different increment is specified in "and Increment by". A negative increment (eg, -1) will decrement the starting number for every file.

The number of digits used for the number can be specified immediately after the % (and before the d). For example, %4d will expand 1 to " 1". To zero-pad the number, place a 0 (zero) immediately after the % (and before the number of digits). For example, %04d will expand 1 to "0001".

Warning - Overlapping File Names

When resequencing files, you should be careful that the file names do not overlap during the renaming process. For example, resequencing the 101 files File000 ... File100 so that they are renumbered File100 ... File 200 will not work. V will first try to rename File000 to File100 but will fail because File100 already exists.

Note

Using %x (instead of %d) causes the number to be stored as hex instead of decimal. For example, %04x will expand 100 to "0064".

Click here for examples of regular expressions and replace strings


Modifying File Names

 Top

The FileName->Modify option (on the main File menu) lets you modify a file name by deleting a fixed number of characters or by inserting a string.

How many characters to delete

Enter the number of characters to delete from the file name. The Insert/Delete from option specifies where the characters will be deleted from.

Insert String into File Name

Enter a string to be inserted into the file name. The Insert/Delete from option specifies where the string will be inserted.

Insert Date into Name

This is similar to the above Insert String option, however, you can also include date format specifiers which will be expanded depending on the date/time. Click here for a list of valid date format specifiers.

Pressing the small question mark button next to "Insert Date into Name" will display a list of valid specifiers.

Insert/Delete from

This specifies where the characters will be deleted from or where the string will be inserted. It can be one of:

Start

The characters will be deleted from (or added to) the start of the file name.

End

The characters will be deleted from (or added to) the start of the file name.

Position from Start

This specifies an index from the start of the file name. An index of 0 indicates the very start of the file name. For example, specify an index of 1 to delete/insert from the second character of the file name.

Position from End

This specifies an index from the end of the file name. An index of 0 indicates the very end of the file name. For example, specify an index of 1 to delete/insert from the second last character of the file name.

Prompt before Modifying

If this option is enabled, the old and new file names will be displayed allowing the user to cancel the operation.

Click here for details on how to use Regular Expressions to modify file names.

The Preview section changes as the above options are modified to displays what the file name will look like after it has been renamed.

Note

The "file name" does not include the file name extension. If you want to delete part of the extension, or to add characters *after* the extension, you must enable Include Extension in the File Name.


Date Format Specifiers

 Top

Format specifiers (together with standard text) can be used in the Date string to add elements of the date/time to the file name.

They will be expanded as follows:

%D | 2 digit date (01-31) | %d | 3 letter day name (Sun-Sat)
%M | 2 digit month (01-12) | %m | 3 letter month (Jan-Dec)
%Y | 4 digit year | %h | 2 digit hour (00-23)
%y | 2 digit year | %n | 2 digit minutes (00-59)
 |  | %s | 2 digit seconds (00-59)


Modify (Regex)

 Top

The FileName->Modify (Regex) option lets you modify a file name by using regular expressions.

The part of the file name that matches the regular expression will be replaced with the contents of the "replace string". This can be a simple text string, but it can also contain 2 types of format specifiers - a captured subpattern reference and an auto-increment specifier.

Captured Subpattern Reference

Numbered subpatterns can be created in a regular expression by surrounding them with parentheses. For example, the regular expression "^(.)(.*)(.)$" contains 3 subpatterns.

A subpattern can be referenced in the replace string by prefixing the subpattern number with a backslash. Subpattern numbering begins at 1. A subpattern of 0 represents the entire matching string. Up to 9 subpatterns can be specified.

Example

If searching for "^(.)(.*)(.)$" in the string "ABCDEFG", the 4 matching subpatterns will be:

\1                A

\2                BCDEF

\3                G

\0                ABCDEFG

Auto-increment specifier

An auto-increment specifier can be either %d or %x (for decimal and hex, respectively). They are used to insert a number in a file name, and are incremented (or decremented) for every file name modified. Click here for further details

Click here for examples of regular expressions and replace strings

Notes

Regular Expressions can be very cryptic and great care should be taken when using them, as file name changes can not be undone.

Always enable Prompt before Modifying, to be sure that the regular expression will work as desired.

If you want to include a % in the replace string, prefix it with a backslash (ie, \%).


Clipboard Rename

 Top

When this option is selected, V will display the current contents of the clipboard (you will not be able to edit this).

When you press the Modify button, V will rename the first selected file in the directory listing to the first line of text in the clipboard. The second selected file is renamed to the second line of text, and so on.

Keep Existing File Extension(s)

By default, V will rename the entire file to the corresponding string in the clipboard. Enabling this option will retain the existing file extension and rename only the name portion.

Note

It does not matter if the contents of the clipboard change after the user has selected this option (and before pressing Modify). V will use the contents of the clipboard when this option was first selected, and not the contents when the Modify button was pressed.


Modify Code Page

 Top

This is used to convert the characters in a file name from a specified code page to Unicode (UTF-16), and vice versa.

V will correctly display Unicode file names in the directory listing. In particular, file names containing foreign characters will be displayed correctly, provided they have been encoded in Unicode.

Select the direction of conversion (ie, "Unicode to Code Page" or "Code Page to Unicode") by clicking on the arrow to change the direction if necessary.

Converting File Names from a Code Page to Unicode (arrow points right)

If files were created on an operating system that does not support Unicode file names (like Windows 95/98) or on a file system that does not support Unicode file names (FAT), the file names would have been encoded using the character set of a particular code page. In this case, the file names may not be correctly displayed by V.

If you know the code page that the files names were encoded in, you can use this option to convert the file names to Unicode - so they can be correctly displayed by V.

Simply select the code page from the Code Page list. V will display what the converted file name will look like in the "After" box. If this doesn't look right, select another code page.

Converting File Names from Unicode to a Code Page (arrow points left)

File names that were created on an operating system supporting Unicode (like XP) and that contain foreign characters may not be able to be viewed correctly when copied to a file system that does not support Unicode file names.

In this case, you can use this option to encode the file names in a specific code page, so they can be displayed correctly on another file system.

Include Extension in the File Name

The encoding of the file name extension is normally not modified. Enable this option if you also want to re-encode the extension.

Notes

Not all Windows Code Pages will work. In this case, the "After" box will be empty.

If you know what the Windows code page number is, you can enter it after enabling Select Code Page Identifier (CPID).

Once the file names have been converted to Unicode, they may not be able to be copied back to a file system that does not support Unicode file names.