Specifying Additional Capabilities To Your Editor - Adobe 12001196 - Acrobat - Mac Manual

Javascript
Hide thumbs Also See for 12001196 - Acrobat - Mac:
Table of Contents

Advertisement

Edit > Preferences > JavaScript dialog. This ensures that your editing work is not
discarded.
If your editor accepts a starting line number on the command line, Acrobat also supports
the option of starting the editor on a line that contains a syntax error by making the line
number available as a parameter (%n) to insert in the command line.
Acrobat has pre-defined, command-line templates for many current external editors. The
external editor settings are defined in Edit > Preferences > JavaScript. If you use the
Browse button to specify an external editor and it has a pre-defined command line
template, that template will be sustituted in the command line field. You may edit the
command line options at this point if you wish. If your editor does not have a pre-defined
template, you may need to specify the appropriate command-line parameters in the
command-line field.

Specifying Additional Capabilities to Your Editor

Acrobat provides internal support for both of the commands described above on a few
editors such as CodeWrite, Emacs, and SlickEdit.
If your editor is not one that Acrobat currently supports, go to the Web site for your editor
and look up the editor documentation, or use the documentation provided with your
editor. To determine your editor's capability, you need answers to the following questions:
What are the command switches to tell the editor to always open a new instance?
Switches vary depending on the editor and include /NI and +new followed by the file
name, which is represented as %f and which should be enclosed in double quotes to
ensure that spaces in file and folder names are properly handled.
Is there a way to instruct the editor to open a file and jump to a line number?
Some example line number command switches include -#, -L, +, and -l each followed
by the line number, which is represented as %n.
Because the value of %n may be null if there is no line number to jump to, Acrobat
supports having that portion of the command be optional, only inserted if there is a line
number to jump to. Any command switches or parameters enclosed in square brackets
([...]) will only be inserted if the line number parameter is to be used. Thus, unless your
editor supports a null line number in a useful way, you should enclose the line number
switch and the %n parameter in square brackets.
If you need to insert %, [, or ] literally in your command line, you can use %%, %[, or %]
respectively.
For instance, Acrobat recognizes the Visual SlickEdit editor as vs.exe and will substitute
the command line:
"C:\Program Files\vslick\win\vs.exe" "%f" +new [-#%n]
This is what you will see in the Edit > Preferences > JavaScript dialog after you click Open
in the Browse dialog. The program must be installed and must be found using the Browse
dialog for Acrobat to properly recognize it and substitute the template.
Acrobat JavaScript Scripting Guide
Acrobat JavaScript Editor and Debugger Console
Using an External Editor
2
25

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Acrobat 6.0

Table of Contents