40 lines
2.3 KiB
HTML
40 lines
2.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>Languages</title>
|
||
|
<link rel="stylesheet" href="styles.css" type="text/css">
|
||
|
</head>
|
||
|
<body>
|
||
|
<h1>Languages
|
||
|
</h1>
|
||
|
<p>Notepad++
|
||
|
can distinguish between different languages source code can be written in.
|
||
|
This is useful to allow certain modifications and visual aids to be
|
||
|
applied specifically designed for that language. For example, a
|
||
|
language could distinguish certain keywords that have to be
|
||
|
differently interpreted, and as such it can be useful to distinguish
|
||
|
these keywords using another color or font. The language also
|
||
|
determines the folding behavior (see <a href="Folding.html">Folding</a>) and how to handle
|
||
|
comments (see <a href="Commenting.html">Commenting</a>).
|
||
|
|
||
|
<p>Notepad++
|
||
|
offers a lot of languages that can be selected, and has a few methods
|
||
|
to add your own as will be discussed.</font><br>
|
||
|
<font face="Times New Roman, serif">By
|
||
|
default Notepad++ will try to guess the language of a document by the
|
||
|
extension of the filename (if it is a file) or the default setting if
|
||
|
it is a new document (see <a href="Preferences.html#New_Document_Open_Save_directory">Preferences</a>). To select another language, simply select it from the
|
||
|
<span class="menu_item">Language</span> menu. The language of the currently active document is
|
||
|
visible in the status bar in the first section (see <a href="Status%20Bar.html">Status Ba</a>r).</font>
|
||
|
By
|
||
|
default a language can have multiple keywords, divided in certain
|
||
|
categories. It also determines the symbols used for comments and what
|
||
|
extensions are associated with it by default. You can supplement the
|
||
|
keywords and the list of extensions using the <a href="Styler%20Configurator.html">Styler Configurator</a>, it also allows you to change the
|
||
|
colors used to print the text.
|
||
|
<p>
|
||
|
If
|
||
|
you like to define your own language, you can do so by two means. The
|
||
|
most simple and straightforward method is to make user of a User
|
||
|
Defined Language (see <a href="User%20Defined%20languages.html">User Defined Languages</a>), but you can also
|
||
|
create your own external lexer (see <a href="External%20Lexers.html">External Lexers</a>). This is more
|
||
|
flexible but also a lot more difficult to make.
|
||
|
</body></html>
|