Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Source-code editor
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Features== Source-code editors have features specifically designed to simplify and speed up typing of source code, such as [[syntax highlighting]], [[Indentation style|indentation]], [[autocomplete]] and [[brace matching]] functionality. These editors also provide a convenient way to run a [[compiler]], [[Interpreter (computing)|interpreter]], [[debugger]], or other program relevant for the [[software-development process]]. So, while many text editors like [[Microsoft Notepad|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 editor]]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 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 <!-- such as [[PBASIC]], the [[Applesoft BASIC]] editor, the [[Commodore BASIC]] editor --> compress source code, typically converting common keywords into [[BASIC interpreter#Tokenizing and encoding lines | 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]]ing it with consistent capitalization and spacing. A few source-code editors do both.{{citation needed|date=June 2022}} 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.<ref name="Krill 2016">{{cite web |last1=Krill |first1=Paul |title=Microsoft-backed Language Server Protocol strives for language, tools interoperability |url=https://www.infoworld.com/article/3088698/microsoft-backed-langauge-server-protocol-strives-for-language-tools-interoperability.html |website=InfoWorld |access-date=19 June 2022 |language=en |date=27 June 2016}}</ref> Many source code editors such as Neovim<ref name="neovim LSP">{{cite web |title=LSP documentation - Neovim |url=https://neovim.io/doc/lsp/ |website=neovim.io |access-date=19 June 2022}}</ref> and Brackets<ref name="Shubham 2019">{{cite web |last1=Shubham |first1=Yadav |title=Language Server Protocol Support in Brackets Β· adobe/brackets Wiki |url=https://github.com/adobe/brackets/wiki/Language-Server-Protocol-Support-in-Brackets |website=GitHub |access-date=19 June 2022 |language=en}}</ref> have added a built-in LSP client while other editors such as Emacs,<ref name="Emacs LSP">{{cite web |title=LSP Mode - Language Server Protocol support for Emacs - LSP Mode - LSP support for Emacs |url=https://emacs-lsp.github.io/lsp-mode/ |website=emacs-lsp.github.io |access-date=19 June 2022}}</ref> vim,<ref name="Devlieghere 2018">{{cite web |last1=Devlieghere |first1=Jonas |title=Using LSP & clangd in Vim |url=https://jonasdevlieghere.com/vim-lsp-clangd/ |website=Jonas Devlieghere |access-date=19 June 2022 |language=en |date=22 April 2018}}</ref> and Sublime Text<ref name="LSP Sublime">{{cite web |title=Home - Sublime Text Language Server Protocol Documentation |url=https://lsp.readthedocs.io/en/latest/ |website=lsp.readthedocs.io |access-date=19 June 2022 |archive-date=12 June 2022 |archive-url=https://web.archive.org/web/20220612152851/https://lsp.readthedocs.io/en/latest/ |url-status=dead }}</ref> have support for an LSP Client via a separate plug-in.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)