97 lines
5.3 KiB
HTML
97 lines
5.3 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|
<html><head><meta content="text/html; charset=UTF-8" http-equiv="content-type"><title>User Defined languages</title>
|
|
<link rel="stylesheet" href="styles.css" type="text/css"></head>
|
|
<body>
|
|
<h1>>User Defined Languages</h1>
|
|
<p>User
|
|
defined languages allow you to add your own language to Notepad++.
|
|
This is a very quick and easy way to do so.
|
|
|
|
<p>The NpWiki++ page about <a href="http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=User_Defined_Language_Files">user defined language files</a> lists all known such languages and allows sharing new contributed files.
|
|
|
|
<p>Notepad++
|
|
always has the main User Defined language available. You can use this
|
|
to test your settings and then later on create a new language based
|
|
on this. The User Defined language gets reset each time you restart
|
|
Notepad++, its settings will not be saved. User defined languages are
|
|
available from the bottom of the language menu.<p>
|
|
To
|
|
define one, you need the User Defined Dialog, which can be accessed by
|
|
selecting <span class="menu_item">View->User Define Dialog...</span> or pressing the <img style="width: 16px; height: 16px;" alt="" src="Images/Toolbar/showPannel.png"> button.<p>
|
|
The
|
|
dialog can float like any regular dialog when open, or be docked in
|
|
the main Notepad++ window. Simply click <span class="button">Dock</span>/<span class="button">Undock</span> to do
|
|
so. If the dialog is undocked (floating) you can control its
|
|
transparency. Enable the transparency checkbox and control the amount
|
|
using the slider. Note that transparency is only available on Windows
|
|
2000 and later.<p>
|
|
The
|
|
dialog shows a dropdownlist of the currently defined user languages.
|
|
Select one to change its parameters, if possible they will be
|
|
automatically saved. To create a new user language based on the
|
|
current state of the main User Defined language, click the <span class="button">Create
|
|
New...</span> button, a dialog will pop up asking for the name. To create a
|
|
new User language based on the currently selected language, click
|
|
<span class="button">Save As...</span> and enter the new name. If you have selected an user
|
|
created language, you can click on the <span class="button">Rename</span> button to enter a new
|
|
name if necessary, and the <span class="button">Remove</span> button will delete the language.
|
|
<p>If
|
|
you want the user language to ignore the case of the text (so it will
|
|
be case insensitive when looking for keywords), enable the <span class="checkbox">ignore
|
|
case</span> checkbox.<p>
|
|
For
|
|
user created languages, you can also define what file extensions to
|
|
associate with them for language autodetection in the textbox with
|
|
the <span class="label">Ext</span> label.<p>
|
|
Most
|
|
settings have a certain text style associated with them. These work
|
|
the same as in the Styler Configurator (see <a href="Styler%20Configurator.html">Styler
|
|
Configurator</a> for details).<p>
|
|
Other
|
|
aspects of the language are controlled by the settings divided in
|
|
four groups:
|
|
<h3>Default style and Folding (Folder & Default tab)</h3>
|
|
<p>This
|
|
tab control the style of the default text (text that has no special
|
|
attributes or meaning) and the keywords that control the folding. A
|
|
keyword in the Folder Open group will trigger a new Fold group that
|
|
can be expanded and collapsed. A keyword in the Folder Close group
|
|
will close any opened group.
|
|
<p>
|
|
<h3>Keywords (Keywords Lists tab)</h3>
|
|
<p>This
|
|
tab controls what keywords are registered with the language. You can
|
|
define up to four groups of keywords, each with their own style. If
|
|
you enable the <span class="checkbox">Prefix</span> option for a group, that means that these
|
|
keywords can be prefixes of entire words, and thus will be detected
|
|
even if the keyword is directly followed by other text. In that case
|
|
the other text will be styled the same as the keyword.<p>
|
|
<h3>Comments/Numbers (Comment & Number tab)</h3>
|
|
<p>This
|
|
tab controls the behavior and appearance of comments, and the
|
|
appearance of numbers.</font>
|
|
You
|
|
can define multiple comment symbols that are comment line symbols.
|
|
These comments run from the symbol itself to the end of the line. You
|
|
can also define comment block symbols. These symbols start commenting
|
|
from any comment open symbol, until and comment close symbol is
|
|
reached.<p>
|
|
If
|
|
you enable the <span class="checkbox">Treat keyword as symbol</span> checkbox, the comment symbols
|
|
also trigger comments if they are the beginning of a word, much like
|
|
prefix keywords.<p>
|
|
Numbers
|
|
are only recognized if they start a word with characters ranging from
|
|
0-9, where only the number symbols are styled as such.
|
|
<p>
|
|
<h3>Operators and Delimiters (Operators tab)</h3>
|
|
<p>This
|
|
tab controls what operator symbols exists and what symbols act as
|
|
delimiters. Operator symbols are characters that split two words.
|
|
They behave much as whitespace but can be styled differently.</p><p>
|
|
Delimiters
|
|
are single characters and usually defined in pairs. Any text between
|
|
a pair of delimiters as styled as such. A good example is a string,
|
|
which is delimited on both sides with double quotes and drawn in a
|
|
different color. Since, in many languages, a string may contain the string delimiter with a special prefix, you can enable and choose this prefix, the escape character.
|
|
</body></html> |