products/sources/formale sprachen/Isabelle/Tools/jEdit/dist/doc/users-guide image not shown  

Quellcode-Bibliothek

© Kompilation durch diese Firma

[Weder Korrektheit noch Funktionsfähigkeit der Software werden zugesichert.]

Datei: installing-modes.html   Sprache: HTML

Original von: Isabelle©

 products/sources/formale sprachen/Isabelle/Tools/jEdit/dist/doc/users-guide/installing-modes.html


<html><head>
      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
   <title>Chapter 11. Installing Edit Modes</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="jEdit 5.6 User's Guide"><link rel="up" href="writing-modes-part.html" title="Part II. Writing Edit Modes"><link rel="prev" href="mode-match-type.html" title="The MATCH_TYPE Attribute"><link rel="next" href="updating-modes.html" title="Chapter 12. Updating Edit Modes"></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">Chapter 11. Installing Edit Modes</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="mode-match-type.html">Prev</a> </td><th width="60%" align="center">Part II. Writing Edit Modes</th><td width="20%" align="right"> <a accesskey="n" href="updating-modes.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a name="installing-modes"></a>Chapter 11. Installing Edit Modes</h2></div></div></div><p>The easiest way to install a new mode locally is to use the Editing 
    dialog found under Utilities - Global Options. At the bottom of this dialog
    is an "Add Mode" button. Clicking this button shows a dialog to add a mode
    to jEdit. Simply fill in the blanks and the mode file will be put in the
    proper place and the catalog file will be updated appropriately. Modes added
    this way can be removed by selecting the mode in the Editing dialog, then
    clicking the "Delete Mode" button. This button will only appear for modes
    that exist in the user settings directory. Core modes, that is, those modes
    distributed with jEdit cannot be deleted this way. The details of adding a
    mode by hand are below.
    </p><p>jEdit looks for edit modes in two locations; the
    <code class="filename">modes</code> subdirectory of the jEdit settings directory, and
    the <code class="filename">modes</code> subdirectory of the jEdit install directory.
    The location of the settings directory is system-specific; see <a class="xref" href="settings-directory.html" title="The jEdit Settings Directory">the section called “The jEdit Settings Directory”</a>.</p><p>Each mode directory contains a <code class="filename">catalog</code> file. All
    edit modes contained in that directory must be listed in the catalog,
    otherwise they will not be available to jEdit.</p><p>Catalogs, like modes themselves, are written in XML. They consist of a
    single <code class="literal">MODES</code> tag, with a number of
    <code class="literal">MODE</code> tags inside. Each mode tag associates a mode name
    with an XML file, and specifies the file name and first line pattern for the
    mode. A sample mode catalog looks as follows:</p><pre class="programlisting"><?xml version="1.0"?>
<!DOCTYPE CATALOG SYSTEM "catalog.dtd">

<MODES>
    <MODE NAME="shellscript" FILE="shellscript.xml"
        FILE_NAME_GLOB="*.sh"
        FIRST_LINE_GLOB="#!/*sh*" />
</MODES></pre><p>In the above example, a mode named <span class="quote">“<span class="quote">shellscript</span>”</span> is
    defined, and is used for files whose names end with
    <code class="filename">.sh</code>, or whose first line starts with <span class="quote">“<span class="quote">#!/</span>”</span>
    and contains <span class="quote">“<span class="quote">sh</span>”</span>.</p><p>The <code class="literal">MODE</code> tag supports the following
    attributes:</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><code class="literal">NAME</code> - the name of the edit mode, as it
            will appear in the <span class="guimenuitem"><strong>Buffer Options</strong></spandialog
            box, the status bar, and so on.</p></li><li class="listitem"><p><code class="literal">FILE</code> - the name of the XML file containing
            the mode definition.</p></li><li class="listitem"><p><code class="literal">FILE_NAME_GLOB</code- files whose names match
            this glob pattern will be opened in this edit mode.
            This can also specify full paths, if the glob pattern contains a 
            path separator character. <code class="literal">FILE_NAME_GLOB</code> can be 
            specified in the <code class="literal">modes/catalog</code> file, or the mode 
            file itself. See the <code class="literal">FILE_NAME_GLOB</code> for 
            <code class="literal">apacheconf.xml</code> in <code class="literal">modes/catalog</code
            for an example of full path filename globbing.
            </p></li><li class="listitem"><p><code class="literal">FIRST_LINE_GLOB</code> - files whose first line
            matches this glob pattern will be opened in this edit mode.</p></li></ul></div><p>Glob pattern syntax is described in <a class="xref" href="globs.html" title="Appendix D. Glob Patterns">Appendix D, <i>Glob Patterns</i></a>.</p><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Tip</h3><p>If an edit mode in the user-specific catalog has the same name as
        an edit mode in the system catalog, the version in the user-specific
        catalog will override the system default.</p></div><p> When a buffer is opened, jEdit must choose an edit mode for that buffer.
    It checks conditions in this order to decide which edit mode to use: </p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p> the filename is an exact match for the <code class="literal">FILE_NAME_GLOB</code>. </p></li><li class="listitem"><p> the filename matches the <code class="literal">FILE_NAME_GLOB</code> and the first line of the file matches the <code class="literal">FIRST_LINE_GLOB</code></p></li><li class="listitem"><p> the filename matches the <code class="literal">FILE_NAME_GLOB</code> </p></li><li class="listitem"><p> the first line of the file matches the <code class="literal">FIRST_LINE_GLOB</code></p></li></ol></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="mode-match-type.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="writing-modes-part.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="updating-modes.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">The MATCH_TYPE Attribute </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 12. Updating Edit Modes</td></tr></table></div></body></html>

¤ Dauer der Verarbeitung: 0.1 Sekunden  (vorverarbeitet)  ¤





Download des
Quellennavigators
Download des
sprechenden Kalenders

in der Quellcodebibliothek suchen




Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.


Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.


Bot Zugriff