Software:Source-code editor

From HandWiki
Short description: Text editor specializing in software code
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).

Characteristics

Source-code editors have characteristics 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

References

  1. 1.0 1.1 Krill, Paul (27 June 2016). "Microsoft-backed Language Server Protocol strives for language, tools interoperability" (in en). https://www.infoworld.com/article/3088698/microsoft-backed-langauge-server-protocol-strives-for-language-tools-interoperability.html. 
  2. "LSP documentation - Neovim". https://neovim.io/doc/lsp/. 
  3. Shubham, Yadav. "Language Server Protocol Support in Brackets · adobe/brackets Wiki" (in en). https://github.com/adobe/brackets/wiki/Language-Server-Protocol-Support-in-Brackets. 
  4. "LSP Mode - Language Server Protocol support for Emacs - LSP Mode - LSP support for Emacs". https://emacs-lsp.github.io/lsp-mode/. 
  5. Devlieghere, Jonas (22 April 2018). "Using LSP & clangd in Vim" (in en). https://jonasdevlieghere.com/vim-lsp-clangd/. 
  6. "Home - Sublime Text Language Server Protocol Documentation". https://lsp.readthedocs.io/en/latest/. 
  7. "LPEX Editor's User Guide - Version 4". https://www.ibm.com/support/pages/system/files/support/swg/swgdocs.nsf/0/b056dfda5f29d02a85256ab000109653/$FILE/lpex.pdf. 
  8. Mike Cowlishaw FREng BSc CEng FIET FBCS CITP, IBM, http://domino.research.ibm.com/comm/research_people.nsf/pages/cowlishaw.bio.html, retrieved June 20, 2022 
  9. "The History of Vim". 5 June 2014. https://jovicailic.org/2014/06/the-history-of-vim/. 
  10. Orin, Andy (18 June 2015). "Behind The App: The Story Of Notepad++" (in en-AU). https://www.lifehacker.com.au/2015/06/behind-the-app-the-story-of-notepad/. 
  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". Microsoft. http://blogs.msdn.com/b/somasegar/archive/2015/04/29/introducing-visual-studio-code-visual-studio-2015-rc-application-insights-public-preview-and-net-core-for-linux-and-mac.aspx. 
  12. Petreley, Nicholas (11 Feb 2003). "Java text editing software for Linux". https://www.computerworld.com/article/2579485/java-text-editing-software-for-linux.html. 
  13. 13.0 13.1 13.2 13.3 13.4 13.5 "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". https://www.apexmarketsresearch.com/report/global-text-editor-market-by-product-type-cloud-468736/. "The major players operating into Text Editor Market include: Visual Studio Code, Notepad++, Sublime, Brackets, UltraEdit, Atom" 
  14. "Holy War (Hacker Jargon)". https://www.techfak.uni-bielefeld.de/~joern/jargon/holywars.HTML.