Sign in Join
Wiki copytemporary

Syntax highlighting

English · Polski · Suomi

Syntax highlighting is a feature which displays text in different colors and fonts according to the category of terms. It is the feature of text editors that are used for programming (source code), scripting, markup languages (HTML, JSON, or XML), or configuration files (LFM, or Ini-files).

Example

pascal
program Project1;

const
  text = 'Press any key to continue!';
  { Computer programmers historically used 'Press any key to continue' as
    a prompt to the user when it was necessary to pause processing.
    The system would resume after the user pressed any keyboard button. }
begin
  WriteLn(text);
  ReadLn;
end.

In the Pascal example, the editor has recognized the keywords program, const, begin, and end. The comment is also highlighted in a specific manner to distinguish it from working code.

Components

Icon Component Description
TSynPasSyn Generic Pascal syntax-highlighting
TSynFreePascalSyn Free-Pascal syntax-highlighting
TSynCppSyn C++ syntax-highlighting
TSynJavaSyn Java syntax-highlighting
TSynPerlSyn perl syntax-highlighting
TSynHTMLSyn HTML syntax-highlighting
TSynXMLSyn XML syntax-highlighting
TSynLFMSyn LFM syntax-highlighting
TSynDiffSyn
TSynUNIXShellScriptSyn Unix shell syntax-highlighting
TSynCssSyn CSS syntax-highlighting
TSynPHPSyn PHP syntax-highlighting
TSynTeXSyn (La)TeX syntax-highlighting
TSynSQLSyn SQL syntax-highlighting
TSynPythonSyn Python syntax-highlighting
TSynVBSyn Visual Basic syntax-highlighting
TSynAnySyn
TSynMultiSyn
TSynBatSyn Batch-file syntax-highlighting
TSynIniSyn INI-file syntax-highlighting
TSynPoSyn

From the Free Pascal wiki, page "Syntax highlighting", as it stood on 2023-09-15 after a change by Myrmidon, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.

Revision 2, last changed by WikiArchive .

Talk about this page

Nobody has opened a bench for this page yet. Sign in to open one.