Grepmark
A Sublime Text 3 plugin that searches a file for a pipe delimited regular expressions and bookmarks all matches.
Details
Installs
- Total 2K
- Win 784
- Mac 494
- Linux 260
Apr 3 | Apr 2 | Apr 1 | Mar 31 | Mar 30 | Mar 29 | Mar 28 | Mar 27 | Mar 26 | Mar 25 | Mar 24 | Mar 23 | Mar 22 | Mar 21 | Mar 20 | Mar 19 | Mar 18 | Mar 17 | Mar 16 | Mar 15 | Mar 14 | Mar 13 | Mar 12 | Mar 11 | Mar 10 | Mar 9 | Mar 8 | Mar 7 | Mar 6 | Mar 5 | Mar 4 | Mar 3 | Mar 2 | Mar 1 | Feb 28 | Feb 27 | Feb 26 | Feb 25 | Feb 24 | Feb 23 | Feb 22 | Feb 21 | Feb 20 | Feb 19 | Feb 18 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 1 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
Sublime Grepmark
A Sublime Text 3 plugin that searches a file for a pipe delimited regular expressions and bookmarks all matches.
Installation
Git Clone
First, find out where the packages directory is by going to (Preferences->Browse Packages), use that location in the git clone command.
Package Control
Install from Package Control here.
Usage
Press the key bound to the grepmark command; by default f1
, type in a query (either string or reqular expression, depending on what your search_flags
are set to in the Settings), and hit enter; results will be marked with one of two ways.
If you have BetterBookmarks installed and enabled in the Grepmark settings, the BetterBookmarks layer can be configured in the
better_bookmarks
area of the Grepmark settings file; different layers can have different images configured to represent the mark. You can use Better Bookmarks to cycle through the marks, hide them through a layer change, or save them out to a file.A mark using the default Sublime bookmark caret (greater than sign) will be added to the gutter. You can use the default Sublime commands
next_bookmark
andprev_bookmark
to cycle through the marks.
NOTE: If you enable BetterBookmarks with it being installed, marks will not be added.
Auto Grep
Greps can be preformed automatically when a file is opened. For example, in the Settings below, any file with the .py
extension will have all of its functions marked in the BetterBookmarks functions
layer. Each file extension can have multiple greps run at load time; each of the greps is individually configurable to allow overloading of the global options of the same name.
Note: For search_flags
, setting the key to anything (even an empty list) will cause the grep to completely ignore the global search_flags
values.
Settings
{
"auto_grep":
{
// Should marks be added to files with matching extensions based on the configured rules
"enabled": true,
// A dictionary of file extensions that contain the auto_grep configuration
"extensions":
{
"py":
[
{
// Should this specific search be run
"enabled": false,
// A list of patterns to search for
"pattern_list": ["def.*"],
// See 'better_bookmarks' in the 'global' section
"better_bookmarks":
{
"use": true,
"layer": "functions"
},
// See 'ui' in the 'global' section
"ui":
{
// Should the viewport scroll to the first occurrence
"goto_first": false,
// Should all matches become the active selection
"make_selection": false
},
// See 'search_flags' in the 'global' section
"search_flags": []
},
],
}
},
"global":
{
"ui":
{
// Should the viewport scroll to the first occurrence
"goto_first": true,
// Should all matches become the active selection
"make_selection": true
},
// Search flags:
// ignore_case: Searching doesn't care about letter case
// literal: Searches using strings instead of regular expressions
"search_flags": ["ignore_case", "literal"],
"better_bookmarks":
{
// Should Better Bookmarks be used to mark the file
"use": true,
// Which Better Bookmarks layer should be marked
"layer": "bookmarks"
}
}
}