PageRenderTime 27ms CodeModel.GetById 5ms app.highlight 16ms RepoModel.GetById 1ms app.codeStats 0ms


HTML | 52 lines | 52 code | 0 blank | 0 comment | 0 complexity | 623dd4c0cf480fd58d7d8ec1fef06d4d MD5 | raw file
 1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>How jEdit Organizes Macros</title><meta name="generator" content="DocBook XSL Stylesheets V1.65.1"><link rel="home" href="index.html" title="jEdit 4.2 User's Guide"><link rel="up" href="using-macros.html" title="Chapter 8. Using Macros"><link rel="previous" href="running-macros.html" title="Running Macros"><link rel="next" href="using-plugins.html" title="Chapter 9. Installing and Using Plugins"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">How jEdit Organizes Macros</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="running-macros.html">Prev</a> </td><th width="60%" align="center">Chapter 8. Using Macros</th><td width="20%" align="right"> <a accesskey="n" href="using-plugins.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="organizing-macros"></a>How jEdit Organizes Macros</h2></div></div><div></div></div><p>
 2   Every macro, whether or not you originally recorded it, is stored on
 3   disk and can be edited as a text file. The file name of a macro
 4   must have a <tt class="filename">.bsh</tt> extension in order for jEdit
 5   to be aware of it.
 6   By default, jEdit associates a
 7   <tt class="filename">.bsh</tt> file with the BeanShell edit
 8   mode for purposes of syntax highlighting, indentation and other
 9   formatting. However, BeanShell syntax does not impose any indentation or
10   line break requirements.
11  </p><p>
12   The <span><b class="guimenu">Macros</b></span> menu
13   lists all macros stored in two places: the <tt class="filename">macros</tt>
14   subdirectory of the jEdit home directory, and the
15   <tt class="filename">macros</tt> subdirectory of the user-specific
16   settings directory (see <a href="settings-directory.html" title="The jEdit Settings Directory">the section called &#8220;The jEdit Settings Directory&#8221;</a> for
17   information about the settings directory). Any macros you record will be
18   stored in the user-specific directory.
19  </p><p>
20    Macros stored elsewhere can be run using the
21    <span><b class="guimenu">Macros</b></span>&gt;<span><b class="guimenuitem">Run Other Macro</b></span>
22    command, which
23    displays a file chooser dialog box, and runs the specified file.
24  </p><p>
25   The listing of individual macros in the <span><b class="guimenu">Macros</b></span> menu
26   can be organized in a hierarchy using subdirectories in the general
27   or user-specific macro directories; each subdirectory
28   appears as a submenu. You will find such a hierarchy in the
29   default macro set included with jEdit.
30  </p><p>
31   When jEdit first loads, it scans the designated macro directories and
32   assembles a listing of individual macros in the <span><b class="guimenu">Macros</b></span>
33   menu. When scanning the names, jEdit will delete underscore characters
34   and the <tt class="filename">.bsh</tt> extension for menu labels, so that
35   <tt class="filename">List_Useful_Information.bsh</tt>, for example, will be
36   displayed in the <span><b class="guimenu">Macros</b></span> menu as <span><b class="guimenuitem">List
37   Useful Information</b></span>.
38  </p><p>
39   You can browse the user and system macro directories by opening the
40   <tt class="filename">macros</tt> directory from the
41   <span><b class="guimenu">Utilities</b></span>&gt;<span><b class="guimenuitem">jEdit Home Directory</b></span>
42   and <span><b class="guimenu">Utilities</b></span>&gt;<span><b class="guimenuitem">Settings Directory</b></span>
43   menus.
44  </p><p>
45    Macros can be opened and edited much like ordinary files from the
46    file system browser. Editing macros from within jEdit will
47    automatically update the macros menu; however, if you modify macros
48    from another program or add macro files to the macro directories, you
49    should run the
50    <span><b class="guimenu">Macros</b></span>&gt;<span><b class="guimenuitem">Rescan Macros</b></span>
51    command to update the macro list.
52  </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="running-macros.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="using-macros.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="using-plugins.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Running Macros </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 9. Installing and Using Plugins</td></tr></table></div></body></html>