GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  MPEDIT (1)

NAME

mpedit - edits a text file at a specific line number in a new window

CONTENTS

Synopsis
Description
Options
See Also
Author
Copyright

SYNOPSIS

mpedit [options] [sourcefile [linenumber]]

DESCRIPTION

The mpedit command is used to invoke a text editor on a given source file and optionally jump to a specific line number. It is used as a support command by the mpatrol library when the EDIT or LIST options are used but it can quite easily be used as a command in its own right if properly configured. Because it is a shell script it can be easily configured to support other editors, but this unfortunately limits it to UNIX platforms at the moment.

The sourcefile argument must be the filename of the source file to be edited or listed. If the source file does not exist then the contents of the MPATROL_SOURCEPATH environment variable will be used to help locate the source file, even if the filename contained an absolute or relative path component. This environment variable should consist of a colon-separated list of directory names which may contain absolute paths or be relative to the current directory; the first directory in the list will be searched first. If the MPATROL_SOURCEPATH environment variable is not set then only the current directory will be searched.

If the linenumber argument is omitted then it is assumed to be 1. The text editor will attempt to jump to the specified line after opening the source file. The text editor that mpedit uses is controlled by setting the EDITOR environment variable. This can be set to the full pathname of the text editor to use or it can be set to the command that would normally be used to invoke the text editor, but it cannot also contain command line options.

The currently supported editors are vi, vim, elvis, emacs, xemacs, pico and nano, and if the EDITOR environment variable is not set then the default will be vi. Selecting an unsupported text editor will result in an error. However, you can edit the mpedit file to add support for your own favourite text editor as long as it supports a way to immediately jump to a specific line number when it is first started up. Note that the text editor must also open a new window to edit the source file so that it does not obscure any mpatrol diagnostic messages, and if it does not support this then a new terminal window must be opened for it to use.

If the --listing option is given on the command line then the mpedit command will display a context listing of the source file at the specified line number to the standard error output stream instead of invoking the text editor. The listing will be annotated with line numbers and will also show the contents of the five lines before and after the specified line if possible.

OPTIONS

--editor <filename> [-e]
  Specifies the text editor to use. This overrides the contents of the EDITOR environment variable.
--help [-h]
  Displays a quick-reference option summary.
--listing [-l]
  Displays a context listing of the source line instead of invoking the text editor.
--source-dir <directory> [-I]
  Adds a directory to the search path used to locate the source file. Multiple --source-dir options may be given, and each will be prepended to the MPATROL_SOURCEPATH environment variable in the order given on the command line.
--version [-V]
  Displays the version number of the mpedit command.

SEE ALSO

mpatrol(1), mprof(1), mptrace(1), mleak(1), mpsym(1), hexwords(1), vi(1), vim(1), elvis(1), emacs(1), xemacs(1), pico(1), nano(1), libmpatrol(3), libmpalloc(3).

The mpatrol manual and reference card.

http://www.cbmamiga.demon.co.uk/mpatrol/

AUTHOR

Graeme S. Roy <graeme.roy@analog.com>

COPYRIGHT

Copyright (C) 1997-2002 Graeme S. Roy <graeme.roy@analog.com>

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.

You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.

Search for    or go to Top of page |  Section 1 |  Main Index


Release 1.4 MPEDIT (1) 8 January 2002

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.