*** Welcome to piglix ***

Snippet (programming)


Snippet is a programming term for a small region of re-usable source code, machine code, or text. Ordinarily, these are formally defined operative units to incorporate into larger programming modules. Snippet management is a feature of some text editors, program source code editors, IDEs, and related software. It allows the user to avoid repetitive typing in the course of routine edit operations.

Snippet management is a text editor feature popular among software developers or others who routinely require content from a catalogue of repeatedly entered text (such as with source code or boilerplate). Often this feature is justified because the content varies only slightly (or not at all) each time it is entered.

Text editors that include this feature ordinarily provide a mechanism to manage the catalogue, and separate "snippets" in the same manner that the text editor and operating system allow management of separate files. These basic management abilities include operations such as viewing, adding, editing, deleting, sorting, filtering, grouping, renaming, and storing snippets in a repository, catalogue, or database. Some editors provide a macro ability to snippets allowing function prototypes and variable control structures to be generated based on a standard template.

Some programmer's applications such as Eclipse, NetBeans, and Microsoft's Visual Studio (a keyword and Tab ↹) and other IDEs include built-in parts of structure for ease of coding.


...
Wikipedia

...