From TNG_Wiki
(Redirected from Notepad-plus-plus)
Jump to navigation Jump to search

Many TNG programmers - and non-programmer administrators - have found this remarkable free multi-purpose text editor to be very useful in editing .php, .html, .css, .cfg, and other file. It can be downloaded from [1]. (Unfortunately, it is not available for the Macintosh.)


This is, of course, an incomplete list:

  1. It knows the syntax of a remarkable number of computer languages (e.g. PHP, HTML, Javascript, CSS, XML, LISP(!?!), Visual Basic, etc., etc.), and associates a language with specific filename extensions. Once it knows the language,
    • It does auto-completion on language keywords and function and variable names; it even knows the meaning of each argument in built-in functions.
    • It does "syntax highlighting"; that is, when it displays code, it colors different elements of the language in different colors. (See details below)
  2. It knows about paired tags and delimiters
    • When you position the editing cursor at a brace, parenthesis, bracket, or HTML tag, it highlights the paired character or tag.
    • When you position the editing cursor at a brace, parenthesis, or bracket, it can jump to the paired character.
  3. It can display line numbers, and wrap physical lines within the file onto multiple lines within the editor.
  4. It allows you to set "bookmarks", which are just lines in an open file that you can jump to quickly.
  5. It can "fold" blocks of code, which essentially means that it can hide everything between a pair of braces, or between opening and closing HTML tags.

More subtle features [Show/Hide Content]

  1. Searching and Replacing
    • It can search (and do search-and-replace) for text not only within the current file, but also within selected text, within all open files, or within files that match a given filename specification and a folder specification.
    • When you search for a string, it will highlight all instances of that string in the file.
  2. It can convert the selected text into a comment (or vice versa)
  3. It can show 2 "views" (panels) per window, and can have multiple windows open.
  4. It can display a panel that links to all function names in a file.
  5. It maintains a clipboard history, which it displays in a panel.
  6. It handles UTF-8 files correctly, unlike Notepad and Wordpad, and can convert between UTF-8 and ANSI.
  7. It automatically handles different end-of-line marks, and can convert files to use the EOL marks for Windows(CRLF), Unix(LF), and MacIntosh(CR).

[Hide Content]

It has embedded or downloadable add-ons, including :

Compare: allows you to compare two files. The differences will be highlighted.


nppFTP: allows you to access directly your web server, like a local directory, load, edit and save files.


See the feature list on the Notepad++ web site

Syntax Highlighting for some Standard Languages

Syntax Highlighting is a powerful and flexible feature of Notepad++. Syntax highlighting is extremely useful for finding syntax errors in files - including, but not limited to the HTML, PHP, JavaScript, and CSS files.

Here are some description of the default Notepad++ syntax highlighting rules for some of the computer languages that are fundamental to TNG. Some Notepad++ screenshots illustrating syntax highlighting can be found in the Wiki articles Notepad++ Mod Manager Language [Show/Hide Content]

PHP syntax highlighting
  1. PHP code:
    • The <?php and ?> directives that switch between HTML and PHP mode are red,
    • PHP keywords and operators are blue,
    • Variable names and function names are navy,
    • Function names are black,
    • Strings are grey, and
    • Comments are green
  2. HTML code, whether in HTML files or PHP files:
    • Tags are blue,
    • Tag attribute names are orange,
    • Tag attribute values are purple,
    • Text is black,
    • HTML entities are black with a pale background, and
    • Comments are green.
  3. Javascript code, whether within .php, .html, or js files:
    • Keywords and operators are blue
    • Variable names are black
    • Object names and function names are brown
    • Numeric constants are orange,
    • Strings are grey. (document, form,
  4. CSS
    • Well, you get the idea...

[Hide Content]

Mod Manager Syntax Highlighting

Notepad++ supports user-defined languages (i.e. user-defined syntax highlighting rules). Those user-defined languages can be used to modify the syntax highlighting of previously defined languages, or to define new languages, such as the Mod Manager.

At least two sets of syntax highlighting rules for Mod Manager .cfg files have been developed by TNG programmers. They use rather different coloring schemes; only one understands Mod Manager keywords that were introduced in TNGv10.1 and TNGv12. Instructions for downloading and installing both sets of rules are in the Notepad++ Mod Manager Language Wiki article.

Related Links

Other text editors: