Wedit for Linux

2 Menus

2.1 File

2.1.1 New

Create a new document. If file with same name already exists, it is opened (and not rewritten). If file with the same name exists and is already open, it is displayed.

2.1.2 Open

Open file. The File open dialog's initial directory is current working directory, or project files directory if there's active project.

2.1.3 Insert a file

Inserts selected file into currently active file at cursor position.

2.1.4 Save

Saves active file. If backup option is enabled, creates backup copy (originalfile.ext~) of the original file.

2.1.5 Save as

Saves active file under different name.

2.1.6 Save all

Saves all open files.

2.1.7 Reload

Reloads original file's contents from disk.

2.1.8 Close file

Closes active file, giving an option to save changes, if it was modified.

2.1.9 Exit

Ends Wedit for Linux session.

2.2 Edit

2.2.1 Undo

Multiple (max 255 actions) undo. Please note that not all changes can be undone.

2.2.2 Cut

Cuts selected area from document, stores it in internal clipboard and provides it as X selection.

See also Clipboard section.

2.2.3 Copy

Copies selected area of document, stores it in internal clipboard and provides it as X selection.

See also Clipboard section.

2.2.4 Paste

Paste contents of internal clipboard, or X selection into the current document at the cursor position.

See also Clipboard section.

2.2.5 Copy function

Shows list of functions within the current file and copy it.

2.2.6 Copy to file

Saves internal clipboard (or X Selection) to file. Please note that X selection may even come from different application than Wedit for Linux.

2.2.7 Level

Displays nesting level to the left of editor window. Start of nested block is drawn in comment color (default grey), end of nested block in keyword color (default red).

2.2.8 Mark block

Marks the block of code around cursor position. The behavior depends on language of current file. For C language, block is defined as starting with open brace '{' and ending with close brace '}', excluding braces in comments.

2.2.9 Set bookmark

Sets bookmark. Number of bookmarks is not limited. To manage bookmarks, see menu item 'Search/Go to/Bookmark', or 'Search/Bookmarks'.

2.2.10 Spaces -> Tabs

Transforms all space characters to tab characters (\t).

Number of spaces that make one tab stop can be defined in 'Project/Configuration/General'

2.2.11 Tabs -> Spaces

Transforms all tab characters (\t) into spaces.

Number of spaces that make one tab stop can be defined in 'Project/Configuration/General'

2.2.12 Recenter

Scrolls the viewport so that the line containing cursor is in the middle of it (vertically).

2.2.13 Description - Function

Edit description of current function.

2.2.14 Description - File

Edit description of current sourcefile.

Please note that File description template is a generic one. If you develop licensed software, and especially open source licensed software, it is often required that you also put license-related text in every source file. See www.opensource.org for more info on the subject

2.2.15 Show changes

Shows all changes you've made to the current file since the last save.

2.2.16 Reformat

Reformats the current source file. Wedit for Linux parses the file and replases it with pretty-printed version.

Please note that this function might not work if source file language is not supported by Wedit

2.2.17 Toolbar

Toggles whether Button bar should be displayed or not. Wedit for Linux remembers this setting for future sessions.

2.3 Search

2.3.1 Find

Search for specified string (or regular expression) in current file buffer (or all open buffers).

2.3.2 Find next

Search for next match.

2.3.3 Find previous

Search for previous match.

2.3.4 Replace

Search for specified string in current file buffer (or all open buffers) and replace it with other string.

2.3.5 Grep

Search for strings contained within files.

2.3.6 Go To

2.3.6.1 Top

Go to first line of the file.

2.3.6.2 End

Go to last line of the file.

2.3.6.3 Line

Go to specified line number.

2.3.6.4 Function

Go to the definition of selected function

2.3.6.5 Previous Function

Go to previous function in the source file

2.3.6.6 Next Function

Go to next function in the source file

2.3.6.7 Bookmark

Go to bookmark. See also menu 'Search/Bookmarks'

2.3.7 Bookmarks

2.3.7.1 Set

Bookmark current cursor position.

2.3.7.2 Go To

Go to selected bookmark.

2.3.7.3 Go To Next

Go to next bookmark.

2.3.7.4 Delete

Delete selected bookmark.

2.3.8 Function list

Display list of functions in current file, optionally jump to selected function.

2.3.9 Structures List

Search for, and display, all C structures defined in current file and (optionally) included header files.

2.3.10 Search a function

Search for a file containing specified function definition.

2.3.11 Search definition

Search for a definition of symbol under cursor.

2.3.12 Symbol usage

Find all occurences of symbol under cursor in opened files. Hits are displayed in the status area at the bottom of Wedit for Linux window.

2.3.13 ID

Write RCS ID tag to current file. It is useful when using revision control system like CVS. Every time a file gets commited, the contents of the string is automatically updated by CVS (or other system compatible with RCS-style keyword substitution). For more information about CVS, visit Pascal Molli's site.

2.3.14 CTAGS/ETAGS

CTAGS and ETAGS are programs that create a 'catalog' of symbols found in the specified source files. Symbols are tagged with the source file they belong to, location in the file, and, in some cases, additional information (class, type of symbol)

Wedit for Linux was tested with GNU Emacs etags version 20.3 and Exuberant Ctags version 4.0.2

CTAGS/ETAGS works with current project. If no project is defined, all curently open files are taken. Upon opening the CTAGS/ETAGS dialog, Wedit scans the project directory (current working directory) for one of these two files:

If the tag file is found, last modification time is displayed, tag file is parsed and displayed in a tree-like view. Depending on the tags program and source files language, up to 3 notebook pages are available:

All views are sorted alphabetically

'Generate' button calls appropriate tags program (ctags/etags, depending on the 'Options...' settings) and re-populates tree views.

'Options ...' dialog lets you choose what tagging program you want to use. Four options are available:

Please note that Wedit for Linux does not update the tag file automatically. You must use 'Generate' button to make sure that symbol views are up to date. This is especially important with ETAGS, which uses absolute symbol locations. CTAGS uses relative addressing (search strings), so you often should be able to use not-up-to-date tag file.

2.4 Project

2.4.1 Configuration

Main Wedit for Linux configuration dialog. Most settings in the Configuration dialog are project-specific. Some of them (Workspace settings, for example) apply even after current project is closed. These are 'global' settings which remain until other project's definitions override them.

General Tab

General settings:

Vertical line scroll - this option is not used in Wedit for Linux

Tab size - is used when typing new tabs and converting tabs <-> spaces. Adjust this if your coding habits or existing code use tab width other than 4 (default)

Statistics:

OS Info - system information, equivalent to output of command 'uname -a'

Compiler path - path to the compiler executable. The actual compiler used is defined in Project/Configuration, Compiler tab, Compiler. Currently, Wedit for Linux supports GNU gcc(egcs) and lcc compilers.

Current directory - 'base' directory for working with source files. Utilities and helper programs are run with current directory as a working directory. Usually the same as project directory (Project/Configuration, Project tab, Sources Directory)

Project Tab

Projects in Wedit for Linux define set of source files, configuration settings and rules for building the project. Wedit is especially suited for projects in C language, but it can be used for wide range of tasks, from application development to HTML projects.

Project name - name of the current project. Once a project is assigned name, it cannot be changed easily. To change name of the project, you may:

Project type - type of project as defined in Project/Configuration, Linker Tab, Type of Output

Makefile generation - depending on the type of project, you may, or may not want Wedit to generate Makefile for your project. Reasons for not letting Wedit take care of the makefile are:

When you select Do NOT generate Makefile, you may specify:

If you decide to let Wedit maintain the Makefile, you must also choose what kind of Makefile you want in Type of Makefile selection:

Following settings related to Makefile generation may be adjusted:

Compiler Tab

Additional CFLAGS - arguments to the compiler that couldn't be set by controls in Compiler Tab.

<include> path - path to system include files, entries separated by ':'

Compiler - Wedit for Linux natively supports two compilers: GNU gcc(egcs) and lcc. Native support means that Wedit knows about compiler command line parameters and can parse compiler's error output. You can use different compilers, but you want be able to use all Wedit's features.

Code generation:

Debugging support level - debugging information can add significantly to the total size of executable and can sometimes hide errors (off-bounds memory access). Release applications should be compiled without this flag.

File for error messages - error output of compiler is stored in this file

Warning level - normal, all

Generate intermediate language files - not used in Wedit for Linux

Macros Tab

You may define shortcuts for frequently typed pieces of text. For example, if you define Alt+I as '#include <', every time you press Alt+I in the editor, #include < get inserted at the current cursor position.

Please note that X Window Managers often grab lot of keyboard shortcuts for their own use. Keep this in mind when defining keyboard macros.

Debugger Tab

Wedit for Linux currently has a full support for GDB, the standard GNU debugger. All applications compiled and linked with STABS debugging information can be debugged.

Command line arguments to pass to the program - parameters the program should be started with

Executable to start - normally, executable name is the same as name of the project.

Trap all exceptions - not used in Wedit for Linux. Debugging stops after any signal is received

Terminal for program output - for every debugging session, the target executable is run in a terminal window, so that you can see standard input and output. If your system doesn't have xterm (default), or you want to use more sophisticated terminal, specify it here.

Please note that terminal application must support xterm-style command line switch -e, and optionally -T.

Linker Tab

Output file name - normally, the name is the same as name of the project

Additional libraries - you can enter any additional switches to the linker here.

Please note that you have to specify full command line switch to link with an additional library. For example, to link with libm.a, type -lm

Do not include debug information - target executable will not contain STABS debug information

Type of output:

Library version - dynamic library only. Major and minor version of the library. If your library should have major version 2, and minor version 5.1, enter 2.5.1

Language Tab

Language tab controls Wedit for Linux support for programming languages. Wedit supports many programming languages, and level of support varies. All supported languages feature hilighting of keywords and comments. Colors used for syntax hilighting can be set in Project/Configuration, Workspace Tab.

Language drop-down list contains all programming languages supported by Wedit. In Keywords list, you can see all keywords for the selected language.

To add a keyword, exter it in the Keyword field and press Add. To delete a keyword, select it in the Keywords list and press Erase.

Language support enabled shows if current buffer contains source file in one of the supported programming languages.

Workspace Tab

In this tab, you can change colors of text elements and fonts used in Wedit for Linux editor.

Select text element from Change colors of list and click on Change color button. Reset Colors button reverts all colors to their default values.

Fonts opens font selection dialog.

Utilities Tab
You can define any number of external programs to be run within Wedit for Linux. If you use %s in Arguments to the program, it'll expand to the name of current buffer.

2.4.2 Create

New project is defined in several steps.

Every project's settings are stored in Wedit for Linux configuration files. Other menu items of 'Project' menu are used for project handling.

2.4.3 Open

Displays list of already defined projects. After selecting new project to open, current project will be closed.

2.4.4 Close

Closes current project

2.4.5 Erase

Displays list of defined projects. Selected project is removed from Wedit project repository

Please note that 'Erase' just removes project from Wedit project repository, leaving actual project files unchanged. If you want to remove project files as well, go to project directory and do it manually.

2.4.6 Add/Delete Files

When removed from project, files are not physically deleted from disk. You must do it manually, if neccessary.

2.4.7 Export

Selected project's settings will be exported into a .prj file in current directory. Name of the file is the same as name of project. Exported project can be imported back to Wedit using Import.

Please note that only project settings are exported to .prj file, not actual project files.

2.4.8 Import

Import previously exported .prj file back to Wedit. Import is done in two steps:

2.4.9 Open all files

Opens all files defined in the project in the editor.

2.4.10 Outline

Shows tree-like view of project files. For C source files also shows functions defined in respective modules.

For other programming languages, it is better to use CTAGS/ETAGS function to examine structure of the current project.

2.5 Compiler

2.5.1 Make

Makes the project. This usually involves calling make utility.

2.5.2 Show results

Opens 'Build' tab in the lower pane of Wedit for Linux window. This tab contains messages from the build process.

2.5.3 Link

Links object files and creates executable. This usually involves deleting current executable (if exists) and calling make utility.

2.5.4 Generate makefile

Generates makefile for the project.

2.5.5 Rebuild all

Deletes executable and all intermediate (object) files, and performs Make.

2.5.6 Debugger

Starts debugger. More on this topic in Debugger menu help.

2.5.7 Breakpoints

Breakpoints are normally set and used in debugger mode. However, you can manage list of breakpoints for current project in edit mode as well.

2.5.8 Set breakpoint

Sets breakpoint to current line in current source file buffer.

2.5.9 Execute

Start executable made by current project. Executable is started in terminal window, as specified by Project/Configuration, Debugger tab.

2.5.10 Compile

Compile current source file. Usually, object file for this source file is deleted and make is called.

2.6 Utils

2.6.1 Execute

Execute external program.

Please note that you may also define any number of external utilities for a project in Project/Configuration, Utilities tab

2.6.2 Diff

Do a diff on two files or contents of two directories. Diff arguments need not be contained within current project.

Unless you specified generating of patch file, Wedit for Linux will open both input files in editor and let you iterate over differences. Matching part of source texts for every difference chunk are hilighted with yellow color.

2.6.3 Analysis

2.6.3.1 Function Tree

Cfiles only. Function tree recursively examines all functions called from selected function. To generate function tree:

2.6.3.2 Strings

C files only. Strings function finds all C strings within the current file. Strings are tagged and can be saved to separate file either in rc format, or as a string table. Original occurences of strings may be optionally replaced by indexes to the generated table.

This function greatly simplifies e.g. locatization of source code.

2.6.3.3 File metrics

C files only. Analyses current file generates various function-wise metrics.

In Data menu, you can choose from following metrics:

In the upper right corner, you see type of metric displayed and its maximum value. Clicking on bars in the chart shows values for respective functions in the bottom field of the dialog. Clicking on Select button, you get detailed information on the selected function.

Symbols ... button takes you to the symbols view for selected function

There are three sorts of symbols in this view:

Clicking on the symbol shows in the upper pane all lines of the function which contain selected symbol. This is useful for example for tracing variable usage throughout the function.

2.6.3.4 Function metrics

Subset of File metrics. Shows metrics for selected function only, not the whole file

2.6.3.5 Write prototypes

C files only. Creates a file (usually header file .h) containing prototypes of C functions from current module.If Load into the editor is selected, generated file will be loaded into the editor after it has been generated.

2.6.3.6 Browse fn defs

C files only. For any selected function from current file displays which functions it calls, and by which functions it is called

2.6.3.7 Show globals

C files only. Searches for all global symbols in the current file, optionally taking into account #include files

You may choose if globals search should descend to application and system include files, and optionally set system include files path.

Clicking on a global symbol in the right pane shows usage of the symbol in the project (if any) in left pane. You can restrict usage display to a specific function in the drop-down list in right-top corner of the dialog.

2.6.3.8 Slice by local

Displays all symbols used in selected function. Clicking on a symbol shows all lines of code of fuction that contain selected symbol. This dialog is the same as 'Symbols' in File metrics

2.6.3.9 File relations

C files only. Shows relations between two files. Lists all identifiers defined in the first file (and files included in it) that are used in the second file, and vice versa.

2.6.3.10 Audit

Creates Xref format auditting file for current source file

2.6.4 Apply patch

Applies patch to source file

2.7 Debugger

Wedit for Linux has integrated frontend to the GDB debugger. Following menu items are used to control program execution and inspect data.

In debugger mode, several new tabs appear in the bottom pane of Wedit for Linux window:

Please note that you may experience a delay (1-5 seconds) between clicking on the Debugger menu item and actually seeing that Wedit went into the debugger mode.

2.7.1 Execute

Execute program. Program will stop due to one of following events:

2.7.2 Step in

Do one step of program execution. If current instruction is a fuction call, follow the call

2.7.3 Same level

Do one step of program execution. If current instruction is a fuction call, perform the call and stop immediately after it.

2.7.4 Step out

Run program until it returns from current fuction call. Stop immediately after return

2.7.5 Run to cursor

Run to source file line under cursor.

Please note that if line does not contain code, debugger may stop on the closest line containing code to the line under cursor. Also keep in mind that line under cursor might not be reached during execution of the program.

2.7.6 Stop debugging

Leave debugger and go back to editor mode.

2.7.7 CPU

Opens window with machine state information (registers, flags, current stack frame, FPU registers, if available)

2.7.8 Stack

Shows Stack tab in the bottom pane of Wedit for Linux window.

2.7.9 Memory

Opens window that allows you to inspect arbitrary memory location. Right-click menu in the window allows change of display granularity (bytes, shorts, longs), and base (decimal, hexadecimal)

2.7.10 Machine instructions

Opens window with assembler view of program being executed

2.7.11 Watches

Handle watches that can be inspected in Watches tab in bottom pane of Wedit for Linux window.

2.7.12 Evaluate symbol

Evaluate any valid C expression. Result is added to Watches tab.

2.7.13 Info

Information about memory image of program being executed

2.7.14 Restart

Stop debugging and restart from the beginnning.

2.7.15 Break

Break program execution.

2.7.16 Breakpoint

Toggle breakpoint on the line under cursor.

2.7.17 Edit breakpoints

Handle breakpoints.

2.7.18 Add/Remove watch

Handle watches in the Watches tab.

2.8 CVS

2.8.1 Introduction

In short, CVS is a version control system that allows multiple developers to work on the same project, and keeps a concise history of modifications to project's files, revisions and version.

Even if you're working on a project alone, you can still benefit from keeping it under version control system, because of the history of modification the system keeps.

Wedit for Linux supports CVS, a de facto standard version control system under Linux and other Unices. It is used by hundreds thousands developers to work together on projects over Internet.

To start using CVS in Wedit, you must have a project defined. Then go to Project / Configuration dialog and select CVS tab. Further actions depend on whether you plan to use CVS locally, or connect to a remote CVS server.

Using CVS locally

All CVS files are stored in Repository, which is a directory tree located somewhere in your directory structure. Repository contains all necessary information about projects stored in CVS. If you do not have a repository, you must create one now.

To create repository, use following command line command:

cvs -d <path_to_repository> init
Make sure that you have write access to directory where you intend to create the repository.

In the CVS tab of Project / Configuration dialog, select local CVS server and type name of the directory where CVS repository will reside.

Connecting to remote CVS server

In the CVS tab of Project / Configuration dialog, select remote CVS server fill in following entries:

After having setup the CVS, you may start using it for your project.

Note: If you add project to repository using Add Project, you must also do Checkout Project immediately afterwards to obtain a fresh local copy from CVS.

2.8.2 Checkout Project

Get a fresh copy of the project from CVS. All your local modifications will be lost.

2.8.3 Update Project

Synchronize your local copy with CVS. CVS informs you of any conflicts created during update operation.

2.8.4 Update File

Synchronize local copy of the current file with CVS version. CVS informs you of any conflicts created during update operation.

2.8.5 Commit Project

Commit all changes made to the project. Logging message may be entered to describe what modifications you have done.

2.8.6 Commit File

Commit changes to the current file to CVS.

2.8.7 Add Project

Adds current Wedit project to CVS. All files defined in project will be added.

Note: Vendor tag and release tag may be arbitrary values. Ask your CVS server administrator for any guidelines that may apply on a particular CVS server.

2.8.8 Add Directory

Add new directory (typically project's subdirectory) to CVS.

2.8.9 Add File

Add current file to repository.

2.8.10 Remove File From Project

Removes current file from repository.

2.8.11 Status of Project

Queries CVS for status of the project and its files.

2.8.12 Status of File

Queries CVS for status of the current file.

2.8.13 Diff Project

Shows difference between CVS version of the project and local copy for all files contained in the project.

2.8.14 Diff File

Shows difference between CVS version of the project and local copy for current file.

2.9 Help

2.9.1 Index

Display help index. All Wedit for Linux help files are in HTML format.

2.9.2 Bug reports

Go to the online bug reporting form at Wedit for Linux Home Site.

2.9.3 About

Display about box, that among other things, contains version of running copy of Wedit for Linux.