VIDE User Guide Editor Reference VIDE Java Tutorial
Command Reference VIDE Version 1.21 - 28Feb01 VIDE C++ Tutorial

VIDE - Command Reference

This section provides a summary of the all the VIDE commands available from the menus.


File Menu  top

The File menu is used for source files. Use the Project menu to open and edit project files.

File:New  

Create a new source file. Syntax highlighting doesn't take effect until you've done a File:Save as and repainted the screen.

File:Open...  

Open an existing file.

File:View...

Open an existing file for viewing. The file is read-only, and you won't be able to make any changes.

File:Save  

Save the current file to disk.

File:Save as...

Save the current file using a new name you will specify.

File:Close

This will close the existing file. If you've made any changes, you will be prompted if you want to save them.

File:Save All

Saves all currently open files.

File:Save/Close

Save the current file, then close it.

File:Print

This will print send a copy of the file in the active window to the printer. So far, there is no significant formatting. There is a simple header with the file name, date, and page number on each page. The code is printed in a 9 point fixed font with about 70 lines per page. Eventually VIDE may support syntax highlighting on the printed page.

File:Send to Browser

Save the current file, then open it with default browser. This command has a quick and dirty implementation, and it passes just the default file name to the system routine that opens the browser. Thus, this command can fail if the file doesn't have a full path qualification. This can happen when you type a file name in directly to the file open dialog. On MS-Windows, you must have .htm and .html files associated properly with your browser. This command won't do anything for non-HTML files. This association will usually be set automatically when you install your browser.

File:Exit

Exit from VIDE.

Edit Menu  top

The edit menu has some basic commands to edit text in the current file.

Edit:Undo  

Restores the last text deleted. Only one level. Doesn't undo insertions or position changes. Also, doesn't undo deletions greater than 8K characters.

Edit:Cut

Delete the highlighted text, and copy it to the clipboard. Standard GUI operation - use mouse to highlight region of text, then cut

Edit:Copy

Copy highlighted text to clipboard.

Edit:Paste

Paste the text on the clipboard to the current text position.

Edit:Find...  

Find a text pattern in the file. Brings up a dialog.

Edit:Find Next  

Find the next occurrence of the current pattern in the file.

Edit:Replace...  

Find a pattern in the file, and replace it with a new one. Brings up a dialog.

Edit:Find Matching Paren

If the cursor is over a paren character, i.e., ()[]{}, the cursor will be moved to the matching opposite paren.

Edit:Set BP

This command will set (or preset if the debugger isn't running) a breakpoint on the current line. Breakpoints will be highlighted in yellow. Usually, you set breakpoints after you run the debugger, but VIDE remembers breakpoints across debugger sessions. (However, VIDE does not remember breakpoints across VIDE sessions!)

Edit:Delete BP

This command will delete the breakpoint on the current line.

Edit:Edit Help

Displays a list of the command supported by the current editor command set.

Project Menu  top

Project:Open  

Open an existing project file. Project files all have a .vpj extension. VIDE automatically detects C/C++ or Java projects.

Project:New C++ Project

This will create a new C/C++ project. The options on the dialog are described in the C/C++ section of this documentation.

Project:New Java Project

This will create a new Java project. The submenu allows you to create a new Applet, Windowed App, or a Console App. The details are described in the Java section of this document.

Project:Edit

Edit the currently open project. See C/C++ or Java sections for details.

Project:Close

Save and close the currently open project.

Project:Save as...

Save the current project under a new name. This is useful for creating "template" projects that have specific settings for your development environment. These templates can be opened later, then saved under a new name again for the real project.

Project:Rebuild Makefile

OK, I admit it. VIDE doesn't handle all cases of changes to your files. If you add a new #include to a source file, for example, VIDE won't automatically rebuild the Makefile to add this new dependency. This command helps get around that problem.

Project:Select Makefile or Java file

Instead of using a VIDE project, you can simply use an existing Makefile, or even a Java source file. Use this menu item to specify the Makefile or Java source file instead of a VIDE project. When you have a Makefile or Java source file selected, the Makefile will be run, or the Java source passed to the Java compiler when you click the make tool bar button.

Build Menu  top

Used to build and compile projects.

Build:Make C++/Compile Java  

Build the project. This command first saves all your open files. It then runs make for C/C++ projects, or the Java compiler for Java projects. Errors are displayed in the message window, and you can go directly to the error by right-clicking on the error line in the message window.

Build:Make clean

Build:Make cleanall

Build:Make cleanbin

Runs make with the given target: clean to clean object files, cleanall to clean objects and binaries, and cleanbin to clean binaries only. Used only for C/C++ projects.

Build:Make <Target>

Runs make <target> to make the target you specify. Used only for C/C++ projects.

Build:Generate ctags

Use this command to generate or regenerate the ctags file for the current directory. See editor ctags for more information.

Build:Stop Make

For C/C++ makes, will stop the make after the current file is finished being compiled.

Tools Menu  top

Tools:Run project  

Runs the program from the existing project. Note: VIDE does not check to recompile before running an object.

Tools:Run program w/ args

Runs a specified program. Allows you to specify arguments to the program.

Tools:Start Debugger  

For gcc versions using gdb, this command opens a new command window to interface to the debugger with the current executable file. When used with Borland TD32, it will launch Turbo Debugger with the current executable.

Tools:Run OS Shell

Runs a standard OS shell in a console window.

Tools:Setup Tools

This command lets you define and setup the remaining eight tools shown on the menu. The first few are predefined by VIDE when it is installed, but you can change them if you have other tools more important to you. When you click on Setup Tools, you will get a dialog box with a definition of 8 tools. The definitions of the tools must be in the format: "Tool Menu Description=command args". The first part of the definition is what will be shown on the Tools menu. The part after the "=" defines how the tool will be run. VIDE supports several parameters that can define various substitutions and characteristics used to run the command.

For example, the grep tool is defined as:

grep ? *.c* *.h=grep -Hn %*%>"  ! "%?"Enter grep search pattern"%_ *.c* *.h

The grep ? *.c*&npsp;*.h is what is displayed on the Tools menu, and in this case indicates grep will be run for *.cpp and *.h files. The part after the "=" defines how the grep command will be run, with "%" commands interpreted by VIDE before grep is actually run. The first part, of course, is grep -Hn, which is the name of the command with some standard option arguments (-Hn). You can include a full path here if you need to, or simply let the standard environment PATH be used to run the command. In this case, VIDE relies on the fact that the grep executable will reside somewhere on the standard system PATH.

The end of the definition, *.c* *.h defines the file names passed to grep. The stuff in the middle with the "%" commands is interpreted by VIDE. The first command, "%*" tells VIDE to save all open files before running the tool. Thus grep will search all the latest versions of you files. The next, "%>", means that the output of the command (grep) is to be redirected to the VIDE message window. The string after the "%>", "  ! " is used to set a prefix that will be used in front of the grep output redirected to the message window. The "%?" parameter is used to prompt the user for input, in this case the grep search pattern, with the supplied message. The "%_" means that grep should be run minimized, which means it won't flash on the screen. By using a combination of the different % parameters supported, you can run external tool commands with many options. The description of the % parameters and commands supported by VIDE follow. Note that in some cases, the % command will be replaced in the definition with a file or path name, while in others, the % parameter is removed from the command before it is run.

The remainder of the commands on the Tools menu can be defined or redefined using the Setup Tools command. The following tool definitions are provided by default:

Tools:V App Gen

Runs the V tool V App Gen.

Tools:V Icon Editor

Runs the V Icon Editor.

grep ? *.c* *.h

Runs the standard grep program that will search all *.c* and *.h files in the current directory for a regular expression (pattern) entered by the user in response to a prompt. The results are directed to the VIDE message window, and you will be able to right click on a line to go to that line in the file.

This is a very useful feature! The VIDE distribution contains an HTML grep help file for details on forming regular expressions.

Here is a very useful example for using the grep tool. Suppose you have several .html files in one directory that contain the string "1.24" and you want to find all the occurrences and maybe change them to "1.24" depending on the context. You can use the grep tool to find each file with the string and then right click in the VIDE message window to selectively open each file with the string. You would enter the command Tools->grep, enter the pattern "1.24 *.html" to the prompt. (Note that you can add other file extensions to search easily at the prompt.) Then grep would run and put all the matches with file names and line numbers in the VIDE message window.

Options Menu  top

The Options menu allows you to customize various aspects of VIDE, including paths, editor attributes, and font. These settings are saved in a standard system place. For example, they are saved in C:/windows/vide.ini on MS-Windows. They will be in $(HOME)/.Viderc on Linux or other Unix-like systems.

Options:VIDE

This item allows you to set the paths VIDE uses to find the VIDE help system files as well as the standard help file included with the Sun JDK.

This item also allows you to specify which command shell and debugger are used. These two options are most useful on Linux/Unix systems.

You can also set the default args used when running ctags. See editor ctags. If you set the "Automatically run ctags" box, then VIDE will automatically generate a new ctags file whenever you open a project. Note that running ctags is a very fast operation.

For the MS-Windows version of VIDE, you should also select which compiler you are using. The currently supported compilers include MinGW gcc, Cygwin gcc, and Borland's BCC 5.5. The Compiler root setting is currently used only for support of the Borland C++ Compiler 5.5. See the Borland reference.

Options:Editor

The options include:

Options:Font

Lets you specify the font used in the display window. The font will change in the current window, and in future windows, but not in already open windows. The font you chose will be saved in the preferences file.

Help Menu  top

The Help menu will open help files specified for your copy of Vide with the Setup Help command. The help files are often found in a directory specified in the "Help file path" and "Java path" from the Optiion->VIDE menu. Several default help files are provided, but you may specify any 10 help files you want.

Help:VIDE

Opens your browser with this file. Uses file videpath/videdoc/videdoc.htm.

Help:Editor Command Set

Shows a dialog box with a command summary of the editor command set currently being used. This is the only help item that doesn't use a file.

Help:WIN32 API

This will try to open the Borland WIN32 API .hlp file. The hlp format file should be available at Windows API Reference from Borland. Uses file videhelp/win32/win32.hlp first, then tries videhelp/win32/win32.htm.

Help:V GUI

Opens the V GUI Reference Manual. Uses file videhelp/vrefman/v.htm.

Help:Java JDK

Opens the top level Sun JDK Help pages. You must set the Java help path in the Options:Editor menu, and download the help files from Sun. Uses file javapath/index.html.

Help:Java API

Opens the Sun JDK API Help pages. These cover all the standard elements and library classes of Java, and is probably the reference you will most often use. You must set the Java help path in the Options:Editor menu, and download the help files from Sun.

Help:BCC RTL

Opens a guide to the Borland BCC runtime library. Uses file C:\Borland\bcc55\Help\Bcb5rtl.hlp.

Help:Setup Help

Allows you to define or redefine up to 10 help files.

Window Menu

Standard MS-Windows Window menu.

Debug Dialog  top

gdb dialog

  jdb dialog

gdb Dialog      jdb Dialog
In general, the commands on the debug dialog work very similarly for the gdb and jdb debuggers. For more specifics for gdb and jdb, see the C++ Tutorial or the Java Tutorial.

Commands:RUN

Run the program being debugged from the start. You will usually want to set some breakpoints first.

Commands:Cont

Continue running program until the next breakpoint is reached.

Commands:Step

Step into the current statement. This will break at the first statement of a called function. For non-function calls, this will have the same effect as the Next command. When you use Step or Next, the new current program line will be highlighted in red.

Commands:Next

Step over the current statement. If the statement is a function call, the program will break after the function has returned.

Commands:Until

Continue running the program until the current line in the editor window is reached. (gdb only)

Commands:Kill

Stop execution of the running program. (gdb only)

Commands:Up

Move execution up stack frame.

Commands:Down

Move execution down stack frame.

Commands:StepUp

Execute until the current method returns to its caller. (jdb only)

Display Values:Args

Display args to current function. (gdb only)

Display Values:Stack

Display the call stack.

Display Values:Print

Display the value of the variable highlighted in the editor window. The variable must be available in the current context of the running program. To use this command, use the mouse to highlight the variable name you want to inspect. It is easiest to double click over the symbol to highlight it. Then click this command in the dialog.

Display Values:Print*

Line Print, but does indirection. Useful for C/C++ pointers. (gdb only)

Display Values:Locals

Print all local variables in current stack frame.

Display Values:Class

List currently known classes. (jdb only)

Display Values:Memory

Report memory usage. (jdb only)

Breakpoints:Set

Set a breakpoint at the current line in the editor window. To use this (and other commands that use the "current line"), first get focus to the editor window of the source file you want to work with. Then go to the line you want to work with, either with the mouse or cursor movement commands. Finally, click the Set button in the dialog box (or the Edit:Set DB menu). Breakpoints will be highlighted in yellow. Usually, you set breakpoints after you run the debugger, but VIDE remembers breakpoints across debugger sessions. (However, VIDE does not remember breakpoints across VIDE sessions!) When you hit a breakpoint, the current program line will be highlighted in red.

Breakpoints:Delete

Delete the breakpoint set at the current line. This command isn't as easy to use as it could be because the editor doesn't highlight lines with breakpoints. The current version doesn't keep its own list of breakpoints, but relies on the debugger. Thus, you have to know in advance which line you want to debug. It is sometimes easier to just use the debugger command line interface for this. I hope this one gets better in the future.

Breakpoints:DelAll

Delete all set breakpoints.

Breakpoints:Show

Show all set breakpoints. Uses native debugger commands for this.

(Breakpoints,Display Values):Help

Show debugger help. Uses debugger native help command.


No Warranty  top

This program is provided on an "as is" basis, without warranty of any kind. The entire risk as to the quality and performance of the program is borne by you.

VIDE Reference Manual
Copyright © 1999-2000, Bruce E. Wampler
All rights reserved.

Bruce E. Wampler, Ph.D.
bruce@objectcentral.com
www.objectcentral.com