Snippet is a fragment of the page text or of a program code used in search engines, text editors and integrated development environments.
Snippet management - the functionality of some code editors and development environments. It allows the user to save snippets for later use in the code development process in this editor.
Search Engine Snippets
The term snippet refers to small part of text from a search engine's site page used as a description of a link in search results. Typically, they contain the context in which the keyword appears in the text on the page. Text from the meta tag "Description" can be outputted as a snippet, if it’s relevant to the user’s request, otherwise any part of the page, relevant to the user’s query, can be used by SE to form the snippet. For more information, see search engine results page.
After viewing the snippet, a user can understand whether the page matches the request, even without opening the page itself.
Snippets in text editors
The control function of snippets in text editors is popular among app developers and those who constantly need to enter a repeating text. This need is explained by the fact that the text fragment being entered does not change, or changes very little.
- Text editors that include such functionality usually have a mechanism that allows you to manage a set of snippets in a similar way to how editors or operating systems allow you to manage documents or files. This mechanism includes operations such as viewing, modifying, adding, deleting, filtering, sorting, grouping and renaming snippets in a repository, directory or database.
Snippets in development environments
Here a snippet is a small piece of source code or text, suitable for reuse. Snippets are not a substitute for procedures, functions, or other similar notions of structured coding. They are usually used to easily read code functions that, without using them, look too overloaded with details, or to eliminate the repetition of the same common parts of the code.