Source-code editor

Last updated
Screenshot of using Notepad++ to edit XML code Notepad++ v5.1.PNG
Screenshot of using Notepad++ to edit XML code

A source-code editor is a text editor program designed specifically for editing source code of computer programs. It may be a standalone application or it may be built into an integrated development environment (IDE).### Summary of Changes: 1. **Intent Creation**: An `Intent`

Contents

Features

Source-code editors have features specifically designed to simplify and speed up typing of source code, such as syntax highlighting, indentation, autocomplete and brace matching functionality. These editors also provide a convenient way to run a compiler, interpreter, debugger, or other program relevant for the software-development process. So, while many text editors like Notepad can be used to edit source code, if they do not enhance, automate or ease the editing of code, they are not source-code editors.

Structure editors 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 this case features such as syntax highlighting, validation, and code formatting are easily and efficiently implemented from the concrete syntax tree 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 prettyprinting it with consistent capitalization and spacing. A few source-code editors do both.[ citation needed ]

The Language Server Protocol, first used in Microsoft's Visual Studio Code, 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. [1] Many source code editors such as Neovim [2] and Brackets [3] have added a built-in LSP client while other editors such as Emacs, [4] vim, [5] and Sublime Text [6] have support for an LSP Client via a separate plug-in.

History

In 1985, Mike Cowlishaw of IBM created LEXX while seconded to the Oxford University Press. LEXX used live parsing and used color and fonts for syntax highlighting. IBM's LPEX (Live Parsing Extensible Editor) [7] was based on LEXX and ran on VM/CMS, OS/2, OS/400, Windows, and Java [8]

Although the initial public release of vim was in 1991, the syntax highlighting feature was not introduced until version 5.0 in 1998. [9] [ better source needed ]

In 2003, 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 [10]

In 2015, Microsoft released Visual Studio Code as a lightweight and cross-platform alternative to their Visual Studio IDE. [11] In 2016, Visual Studio Code became the Microsoft product using the Language Server Protocol. [1]

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. [12]

Notable examples

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. [14] [ better source needed ] Notable examples include vi vs. Emacs and Eclipse vs. NetBeans. These arguments have formed a significant part of internet culture and they often start whenever either editor is mentioned anywhere.

See also

Related Research Articles

The editor war is the rivalry between users of the Emacs and vi text editors. The rivalry has become an enduring part of hacker culture and the free software community.

An integrated development environment (IDE) is a software application that provides comprehensive facilities for software development. An IDE normally consists of at least a source-code editor, build automation tools, and a debugger. Some IDEs, such as IntelliJ IDEA, Eclipse and Lazarus contain the necessary compiler, interpreter or both; others, such as SharpDevelop and NetBeans, do not.

<span class="mw-page-title-main">Text editor</span> Computer software used to edit plain text documents

A text editor is a type of computer program that edits plain text. An example of such program is "notepad" software. Text editors are provided with operating systems and software development packages, and can be used to change files such as configuration files, documentation files and programming language source code.

<span class="mw-page-title-main">Vim (text editor)</span> Improved version of the Vi keyboard-oriented text editor

Vim is a free and open-source, screen-based text editor program. It is an improved clone of Bill Joy's vi. Vim's author, Bram Moolenaar, derived Vim from a port of the Stevie editor for Amiga and released a version to the public in 1991. Vim is designed for use both from a command-line interface and as a standalone application in a graphical user interface. Since its release for the Amiga, cross-platform development has made it available on many other systems. In 2018, it was voted the most popular editor amongst Linux Journal readers; in 2015 the Stack Overflow developer survey found it to be the third most popular text editor, and in 2019 the fifth most popular development environment.

<span class="mw-page-title-main">Syntax highlighting</span> Tool of editors for programming, scripting, and markup

Syntax highlighting is a feature of text editors that is 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. This feature facilitates writing in a structured language such as a programming language or a markup language as both structures and syntax errors are visually distinct. This feature is also employed in many programming related contexts, either in the form of colorful books or online websites to make understanding code snippets easier for readers. Highlighting does not affect the meaning of the text itself; it is intended only for human readers.

<span class="mw-page-title-main">Code folding</span> Tool of editors for programming, scripting and markup

Code or text folding, or less commonly holophrasting, is a feature of some graphical user interfaces that allows the user to selectively hide ("fold") or display ("unfold") parts of a document. This allows the user to manage large amounts of text while viewing only those subsections that are currently of interest. It is typically used with documents which have a natural tree structure consisting of nested elements. Other names for these features include expand and collapse, code hiding, and outlining. In Microsoft Word, the feature is called "collapsible outlining".

Code completion is an autocompletion feature in many integrated development environments (IDEs) that speeds up the process of coding applications by fixing common mistakes and suggesting lines of code. This usually happens through popups while typing, querying parameters of functions, and query hints related to syntax errors. Modern code completion software typically uses generative artificial intelligence systems to predict lines of code. Code completion and related tools serve as documentation and disambiguation for variable names, functions, and methods, using static analysis.

Ctags is a programming tool that generates an index file of names found in source and header files of various programming languages to aid code comprehension. Depending on the language, functions, variables, class members, macros and so on may be indexed. These tags allow definitions to be quickly and easily located by a text editor, a code search engine, or other utility. Alternatively, there is also an output mode that generates a cross reference file, listing information about various names found in a set of language files in human-readable form.

<span class="mw-page-title-main">Kate (text editor)</span> Text editor

The KDE Advanced Text Editor, or Kate, is a source code editor developed by the KDE free software community. It has been a part of KDE Software Compilation since version 2.2, which was first released in 2001. Intended for software developers, it features syntax highlighting, code folding, customizable layouts, multiple cursors and selections, regular expression support, and extensibility via plugins. The text editor's mascot is Kate the Cyber Woodpecker.

This article provides basic comparisons for notable text editors. More feature details for text editors are available from the Category of text editor features and from the individual products' articles. This article may not be up-to-date or necessarily all-inclusive.

<span class="mw-page-title-main">Vala (programming language)</span> Programming language

Vala is an object-oriented programming language with a self-hosting compiler that generates C code and uses the GObject system.

Emmet is a set of plug-ins for text editors that allows for high-speed coding and editing in HTML, XML, XSLT, and other structured code formats via content assist. The project was started by Vadim Makeev in 2008 and continues to be actively developed by Sergey Chikuyonok and Emmet users. Since 2015, Mikael Geletsyan is responsible for UX at Emmet. The tools have been incorporated into several popular text editors, as well as some plug-ins developed by the Emmet team and others implemented independently. However, Emmet is primarily independent from any text editor, as the engine works directly with text rather than with any particular software.

Twig is a template engine for the PHP programming language. Its syntax originates from Jinja and Django templates. It's an open source product licensed under a BSD License and maintained by Fabien Potencier. The initial version was created by Armin Ronacher. Symfony PHP framework comes with a bundled support for Twig as its default template engine since version 2.

In computing, a full-screen writing program or distraction-free editor is a text editor that occupies the full display with the purpose of isolating the writer from the operating system (OS) and other applications. In this way, one should be able to focus on the writing alone, with no distractions from the OS and a cluttered interface. Often, distraction-free editors feature a dark background and a text field, with lighter colored text. However, most distraction-free editors include customisable user interfaces. Some editors support rich text editing.

<span class="mw-page-title-main">Sublime Text</span> Text editor

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 plugins, typically community-built and maintained under free-software licenses. To facilitate plugins, Sublime Text features a Python API. The editor utilizes minimal interface and contains features for programmers including configurable syntax highlighting, code folding, search-and-replace supporting regular-expressions, terminal output window, and more. It is proprietary software, but a free evaluation version is available.

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 "language intelligence tools": programming language-specific features like code completion, syntax highlighting and marking of warnings and errors, as well as refactoring routines. The goal of the protocol is to allow programming language support to be implemented and distributed independently of any given editor or IDE. In the early 2020s, LSP quickly became a "norm" for language intelligence tools providers.

Erlang is an open source programming language. Multiple development environments have support for Erlang.

EditorConfig is an open specification and file format for Syntax highlighting, text editors and integrated development environment (IDEs) that aims to maintain a consistent coding style, particularly aimed at groups working together. It can help keep multiple editors as well as individuals using the same conventions. It stores configurations in a file which can be shared by multiple people or used in multiple editors. It defines rules for how to format different programming languages or other structured text files with conventions such as what character to end a line with and how to manage indentation.

References

  1. 1 2 Krill, Paul (27 June 2016). "Microsoft-backed Language Server Protocol strives for language, tools interoperability". InfoWorld. Retrieved 19 June 2022.
  2. "LSP documentation - Neovim". neovim.io. Retrieved 19 June 2022.
  3. Shubham, Yadav. "Language Server Protocol Support in Brackets · adobe/brackets Wiki". GitHub. Retrieved 19 June 2022.
  4. "LSP Mode - Language Server Protocol support for Emacs - LSP Mode - LSP support for Emacs". emacs-lsp.github.io. Retrieved 19 June 2022.
  5. Devlieghere, Jonas (22 April 2018). "Using LSP & clangd in Vim". Jonas Devlieghere. Retrieved 19 June 2022.
  6. "Home - Sublime Text Language Server Protocol Documentation". lsp.readthedocs.io. Archived from the original on 12 June 2022. Retrieved 19 June 2022.
  7. "LPEX Editor's User Guide - Version 4" (PDF). IBM. Retrieved 19 June 2022.
  8. Mike Cowlishaw FREng BSc CEng FIET FBCS CITP, IBM, archived from the original on 2006-10-18, retrieved June 20, 2022
  9. "The History of Vim". Jovica Ilic. 5 June 2014.
  10. Orin, Andy (18 June 2015). "Behind The App: The Story Of Notepad++". Lifehacker Australia. Retrieved 17 June 2022.
  11. Somasegar, S (4 July 2015). "Introducing Visual Studio Code, Visual Studio 2015 RC, Application Insights Public Preview and .NET Core Preview for Linux and Mac - Somasegar's blog - Site Home - MSDN Blogs". blogs.msdn.com/. Microsoft. Archived from the original on 4 July 2015. Retrieved 17 June 2022.
  12. Petreley, Nicholas (11 Feb 2003). "Java text editing software for Linux". Computer World. Retrieved 17 June 2022.
  13. 1 2 3 4 5 6 "Global Text Editor Market By Product Type (Cloud Based, Web Based) And By End-Users/Application (Large Enterprises, SMEs) Global Market Share, Forecast Data, In-Depth Analysis, And Detailed Overview, and Forecast, 2013–2026". The major players operating into Text Editor Market include: Visual Studio Code, Notepad++, Sublime, Brackets, UltraEdit, Atom
  14. "Holy War (Hacker Jargon)". Archived from the original on 2012-04-02. Retrieved 2016-11-30.