Searching
One of the most powerful tools baked into the Pieces for Sublime Text Plugin is the search functionality which allows you to utilize three different searching methods.
To get started, open the command palette using ⌘+shift+p
(macOS) or ctrl+shift+p
(Windows / Linux) and type Pieces: Search
.
Fuzzy Search
Fuzzy Search is a technique used to find matches that are likely to be relevant, even if they are not exact matches.
It is beneficial for handling typos, misspellings, and data variations, such as minor typos, and quickly narrows down search results to save time.
Try using fuzzy search to locate a code snippet that matches a partially-remembered function name.
You can also locate relevant error messages, log entries, or comments with minor variations, which makes it a highly flexible search method.
Full Text Search
Full text search is a technique for finding documents or records that contain the exact sequence of words in the search query.
It indexes all the words in a document to enable fast and efficient searching, making it ideal for specific queries.
For example, type a function's declaration into the search bar. The Full Text Search will then pull up all snippets that contain a matching code declaration, including the snippet that contains the class to which the function belongs.
Neural Code Search
Neural Code Search is a technique that leverages neural networks and machine learning to improve the search and retrieval of code snippets.
It allows you to use natural language to describe what you are looking for, capturing the semantics and context of the code to provide more accurate and relevant results, which is especially helpful for new developers.
The Neural Code Search is exceptional at retrieving code snippets that match complex, context-specific requirements.