HOME

TheInfoList



OR:

A source-code editor is a
text editor A text editor is a type of computer program that edits plain text. Such programs are sometimes known as "notepad" software (e.g. Windows Notepad). Text editors are provided with operating systems and software development packages, and can be ...
program designed specifically for editing
source code In computing, source code, or simply code, is any collection of code, with or without comments, written using a human-readable programming language, usually as plain text. The source code of a program is specially designed to facilitate the ...
of
computer program A computer program is a sequence or set of instructions in a programming language for a computer to Execution (computing), execute. Computer programs are one component of software, which also includes software documentation, documentation and oth ...
s. It may be a standalone application or it may be built into an
integrated development environment An integrated development environment (IDE) is a software application that provides comprehensive facilities to computer programmers for software development. An IDE normally consists of at least a source code editor, build automation tools ...
(IDE) or
web browser A web browser is application software for accessing websites. When a user requests a web page from a particular website, the browser retrieves its files from a web server and then displays the page on the user's screen. Browsers are used o ...
. Source-code editors are a fundamental
programming tool A programming tool or software development tool is a computer program that software developers use to create, debug, maintain, or otherwise support other programs and applications. The term usually refers to relatively simple programs, that can b ...
, as the fundamental job of programmers is to write and edit source code.


Characteristics

Source-code editors have characteristics specifically designed to simplify and speed up typing of source code, such as
syntax highlighting Syntax highlighting is a feature of text editors that are used for programming, scripting, or markup languages, such as HTML. The feature displays text, especially source code, in different colours and fonts according to the category of terms ...
, indentation,
autocomplete Autocomplete, or word completion, is a feature in which an application predicts the rest of a word a user is typing. In Android and iOS smartphones, this is called predictive text. In graphical user interfaces, users can typically press the ta ...
and brace matching functionality. These editors also provide a convenient way to run a
compiler In computing, a compiler is a computer program that translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primarily used for programs tha ...
, interpreter,
debugger A debugger or debugging tool is a computer program used to test and debug other programs (the "target" program). The main use of a debugger is to run the target program under controlled conditions that permit the programmer to track its executi ...
, or other program relevant for the software-development process. So, while many text editors like
Notepad A notebook (also known as a notepad, writing pad, drawing pad, or legal pad) is a book or stack of paper pages that are often ruled and used for purposes such as note-taking, journaling or other writing, drawing, or scrapbooking. History ...
can be used to edit source code, if they don't enhance, automate or ease the editing of code, they are not ''source-code editors''.
Structure editor A structure editor, also structured editor or projectional editor, is any document editor that is cognizant of the document's underlying structure. Structure editors can be used to edit hierarchical or marked up text, computer programs, diagrams, c ...
s are a different form of source-code editor, where instead of editing raw text, one manipulates the code's structure, generally the
abstract syntax tree In computer science, an abstract syntax tree (AST), or just syntax tree, is a tree representation of the abstract syntactic structure of text (often source code) written in a formal language. Each node of the tree denotes a construct occurr ...
. In this case features such as syntax highlighting, validation, and code formatting are easily and efficiently implemented from the
concrete syntax tree A parse tree or parsing tree or derivation tree or concrete syntax tree is an ordered, rooted tree that represents the syntactic structure of a string according to some context-free grammar. The term ''parse tree'' itself is used primarily in comp ...
or abstract syntax tree, but editing is often more rigid than free-form text. Structure editors also require extensive support for each language, and thus are harder to extend to new languages than text editors, where basic support only requires supporting syntax highlighting or indentation. For this reason, strict structure editors are not popular for source code editing, though some IDEs provide similar functionality. A source-code editor can check syntax while code is being entered and immediately warn of syntax problems. A few source-code editors compress source code, typically converting common keywords into single-byte tokens, removing unnecessary whitespace, and converting numbers to a binary form. Such tokenizing editors later uncompress the source code when viewing it, possibly
prettyprint Pretty-printing (or prettyprinting) is the application of any of various stylistic formatting conventions to text files, such as source code, markup, and similar kinds of content. These formatting conventions may entail adhering to an indentatio ...
ing it with consistent capitalization and spacing. A few source-code editors do both. The
Language Server Protocol The Language Server Protocol (LSP) is an open, JSON-RPC-based protocol for use between source code editors or integrated development environments (IDEs) and servers that provide programming language-specific features like code completion, syntax hi ...
, first used in Microsoft's
Visual Studio Code Visual Studio Code, also commonly referred to as VS Code, is a source-code editor made by Microsoft with the Electron Framework, for Windows, Linux and macOS. Features include support for debugging, syntax highlighting, intelligent code comple ...
, allows for source code editors to implement an LSP client that can read syntax information about any language with a LSP server. This allows for source code editors to easily support more languages with syntax highlighting, refactoring, and reference finding. Many source code editors such as neovim and Brackets have added a built-in LSP client while other editors such as Emacs, vim, and Sublime Text have support for an LSP Client via a separate plug-in.


History

In 1985,
Mike Cowlishaw Mike Cowlishaw is a visiting professor at the Department of Computer Science at the University of Warwick, and a Fellow of the Royal Academy of Engineering. He is a retired IBM Fellow, and was a Fellow of the Institute of Engineering and Techn ...
of IBM created
LEXX ''Lexx'' (also known as ''LEXX: The Dark Zone Stories'' and ''Tales from a Parallel Universe'') is a science fiction television series created by Lex Gigeroff and brothers Paul Donovan (writer), Paul and Michael Donovan (producer), Michael Dono ...
while seconded to the
Oxford University Press Oxford University Press (OUP) is the university press of the University of Oxford. It is the largest university press in the world, and its printing history dates back to the 1480s. Having been officially granted the legal right to print book ...
. LEXX used live parsing and used color and fonts for syntax highlighting. IBM's LPEX (Live Parsing Extensible Editor) was based on LEXX and ran on
VM/CMS VM (often: VM/CMS) is a family of IBM virtual machine operating systems used on IBM mainframes System/370, System/390, zSeries, System z and compatible systems, including the Hercules emulator for personal computers. The following ver ...
,
OS/2 OS/2 (Operating System/2) is a series of computer operating systems, initially created by Microsoft and IBM under the leadership of IBM software designer Ed Iacobucci. As a result of a feud between the two companies over how to position OS/2 r ...
,
OS/400 IBM i (the ''i'' standing for ''integrated'') is an operating system developed by IBM for IBM Power Systems. It was originally released in 1988 as OS/400, as the sole operating system of the IBM AS/400 line of systems. It was renamed to i5/OS ...
,
Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for se ...
, and
Java Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's mo ...
Although the initial public release of vim was in 1991, the syntax highlighting feature was not introduced until version 5.0 in 1998. In 2003,
Notepad++ Notepad++ is a text and source code editor for use with Microsoft Windows. It supports tabbed editing, which allows working with multiple open files in a single window. The product's name comes from the C postfix increment operator. Notepad ...
, a source code editor for Windows, was released by Don Ho. The intention was to create an alternative to the java-based source code editor, JEXT In 2015,
Microsoft Microsoft Corporation is an American multinational technology corporation producing computer software, consumer electronics, personal computers, and related services headquartered at the Microsoft Redmond campus located in Redmond, Washi ...
released Visual Studio Code as a lightweight and cross-platform alternative to their
Visual Studio Visual Studio is an integrated development environment (IDE) from Microsoft. It is used to develop computer programs including web site, websites, web apps, web services and mobile apps. Visual Studio uses Microsoft software development platfor ...
IDE. In 2016, Visual Studio Code became the Microsoft product using the Language Server Protocol.


Comparison with IDEs

A source-code editor is one component of a Integrated Development Environment. In contrast to a standalone source-code editor, an IDE typically also includes debugger and build tools. Standalone source code editors are preferred over IDEs by some developers when they believe the IDEs are bloated with features they do not need.


Notable examples

*
Atom Every atom is composed of a nucleus and one or more electrons bound to the nucleus. The nucleus is made of one or more protons and a number of neutrons. Only the most common variety of hydrogen has no neutrons. Every solid, liquid, gas, a ...
*
Brackets A bracket is either of two tall fore- or back-facing punctuation marks commonly used to isolate a segment of text or data from its surroundings. Typically deployed in symmetric pairs, an individual bracket may be identified as a 'left' or 'r ...
*
Eclipse An eclipse is an astronomical event that occurs when an astronomical object or spacecraft is temporarily obscured, by passing into the shadow of another body or by having another body pass between it and the viewer. This alignment of three c ...
*
Emacs Emacs , originally named EMACS (an acronym for "Editor MACroS"), is a family of text editors that are characterized by their extensibility. The manual for the most widely used variant, GNU Emacs, describes it as "the extensible, customizable, ...
* Gedit *
NetBeans NetBeans is an integrated development environment (IDE) for Java. NetBeans allows applications to be developed from a set of modular software components called ''modules''. NetBeans runs on Windows, macOS, Linux and Solaris. In addition to Java ...
*
Notepad++ Notepad++ is a text and source code editor for use with Microsoft Windows. It supports tabbed editing, which allows working with multiple open files in a single window. The product's name comes from the C postfix increment operator. Notepad ...
(Windows only) * SlickEdit *
Sublime Text Sublime Text is a shareware text and source code editor available for Windows, macOS, and Linux. It natively supports many programming languages and markup languages. Users can customize it with themes and expand its functionality with ...
*
TextMate TextMate is a general-purpose GUI text editor for macOS created by Allan Odgaard. TextMate features declarative customizations, tabs for open documents, recordable macros, folding sections, snippets, shell integration, and an extensible bund ...
(macOS only) *
UltraEdit UltraEdit is a commercial text editor for Microsoft Windows, Linux and OS X created in 1994 by the founder of IDM Computer Solutions Inc., Ian D. Mead, and owned by Idera, Inc. since August 2021. The editor contains tools for programmers, includ ...
* vi/ Vim *
Visual Studio Code Visual Studio Code, also commonly referred to as VS Code, is a source-code editor made by Microsoft with the Electron Framework, for Windows, Linux and macOS. Features include support for debugging, syntax highlighting, intelligent code comple ...


Controversy

Many source-code editors and IDEs have been involved in ongoing user arguments, sometimes referred to jovially as "holy wars" by the programming community. Notable examples include vi vs. Emacs and
Eclipse An eclipse is an astronomical event that occurs when an astronomical object or spacecraft is temporarily obscured, by passing into the shadow of another body or by having another body pass between it and the viewer. This alignment of three c ...
vs.
NetBeans NetBeans is an integrated development environment (IDE) for Java. NetBeans allows applications to be developed from a set of modular software components called ''modules''. NetBeans runs on Windows, macOS, Linux and Solaris. In addition to Java ...
. These arguments have formed a significant part of
internet culture Internet culture is a culture based on the many way people have used computer networks and their use for communication, entertainment, business, and recreation. Some features of Internet culture include online communities, gaming, and social medi ...
and they often start whenever either editor is mentioned anywhere.


See also

*
Integrated development environment An integrated development environment (IDE) is a software application that provides comprehensive facilities to computer programmers for software development. An IDE normally consists of at least a source code editor, build automation tools ...
*
Comparison of integrated development environments The following tables list notable software packages that are nominal IDEs; standalone tools such as source code editors and GUI builders are not included. These IDEs are listed in alphabetical order of the supported language. ActionScript ...
*
Comparison of online source code playgrounds The following table lists notable online software source code playgrounds. A playground allows learning about, experimenting with and sharing source code. Online compiled source code playgrounds Online web client-side source code playgrounds ...
* * Comparison of JavaScript-based source code editors *
Comparison of hex editors The following is a comparison of notable hex editors. General Features {, class="wikitable sortable" style="font-size: 85%; border: gray solid 1px; border-collapse: collapse; text-align: center; width: 100%;" , - style="background: #ec ...
*
Comparison of HTML editors The following tables compare general and technical information for a number of HTML editors. Please see the individual products' articles for further information, comparison of text editors for information on text editors, and comparison of word ...
* List of text editors * Editor War


References

{{Reflist * Programming tools Types of tools used in software development