Index: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Home > Syntax highlighting
Syntax highlighting is a feature of some text editors that displays text—especially source code—in different colors and fonts according to the category of terms. This feature eases writing in a structured language such as a programming language or a markup language as both structures and syntax errors are visually distinct.Users can specify the language of the text, such as C, LaTeX, HTML, or the text editor can automatically recognize it based on the contents or name of the file.
Text editors that have syntax highlighting include the following:
- BBEdit
- Eclipse
- EditPad
- Emacs
- Microsoft Visual Studio
- NEditNEdit the Nirvana editor, is a popular text editor for the X Window System. It has an interface similar to text editors on Microsoft Windows and Macintosh, rather than to older UNIX editors like Emacs. It was initially developed by Mark Edel for Fermilab
- NetBeansNetBeans is an open-source integrated development environment (IDE) written entirely in Java. Sun ONE Studio (formerly called Forte for Java) is based on this. NetBeans is open source and is licensed under the Sun Public License (SPL), which is similar to
- SharpDevelop
- TextPadTextPad is a popular text editor for the Microsoft Windows family of operating systems. First released in 1992 and still being updated today, this shareware software is currently in its fourth major version. It is produced by Helios Software Solutions.
- UltraEditUltraEdit is a text editor created by IDM Computer Solutions. The editor contains very powerful tools for programmers, including macros, syntax highlighting, regular expressions, and more. References UltraEdit home page: http://www. php?name Content&pa sh
- vimVim which stands for Vi IMproved is a free multi-platform text editor. Vim's multi-mode full screen editing paradigm is a conceptual outgrowth of the original vi editor implementation that, since the early 1980s, has been distributed as an essential part
1 Example
Below is a snippet of C++ code which the editor has automatically highlighted based on the syntax:
// Allocate all the windows
for( int i=0; i < max; i++ )
{
pWins[i] = new Window();
}
In this example, the editor has recognized the keywordIn computer science, a keyword is an identifier which indicates a specific command, and in most circumstances, has been reserved for core language usage. Some common keywords in many programming languages are: else, end, goto, if, print, return, switch, ts for, int and new. It recognized the variable names i, pWins and max and highlighted them accordingly. The comment before the code is also highlighted in a specific manner to distinguish it from working code. When looking at pages and pages of code, syntax hightlighting greatly improves the readability and context of the text. The reader can automatically ignore large sections of comments or code, depending on what one desires.
Read more »