ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Quick​Line​Navigator

by ChenZhu-Xie ST3

A powerful pre-precision filtering fuzzy-search (in file/folder/project/open_files) ST3,4 plugin for Accurate (lines) + Fuzzy (sublines) Dual Retrieval

Labels search, grep, highlight

Details

Installs

  • Total 22
  • Win 13
  • Mac 5
  • Linux 4
Oct 24 Oct 23 Oct 22 Oct 21 Oct 20 Oct 19 Oct 18 Oct 17 Oct 16 Oct 15 Oct 14 Oct 13 Oct 12 Oct 11 Oct 10 Oct 9 Oct 8 Oct 7 Oct 6 Oct 5 Oct 4 Oct 3 Oct 2 Oct 1 Sep 30 Sep 29 Sep 28 Sep 27 Sep 26 Sep 25 Sep 24 Sep 23 Sep 22 Sep 21 Sep 20 Sep 19 Sep 18 Sep 17 Sep 16 Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10
Windows 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 2 1 0 0 0 1 0 1 0 2 1 0 0 0 2 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
Mac 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
Linux 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 1 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

QuickLineNavigator

A powerful Sublime Text plugin that applies accurate pre-filters to narrow candidate lines before performing fuzzy matching and navigating through (sub)lines in your codebase.

📺 Demo.gif

📺 Demo.mp4

https://github.com/user-attachments/assets/67b14314-0819-4472-95c2-8a4d6a2e9b4f

The actual performance & user experience should surpass that of the old demo.mp4 shown above ↑

🔖 Table of Contents

  1. Usage Tips
  2. Key Bindings
  3. File Extension Filtering
  4. Installation
  5. Ugrep Inhancement
  6. Acknowledgments
  7. License
  8. Contributing
  9. Issues

🎯 Usage Tips

  1. Quick Search: Select text and press Ctrl+Alt+F to search it instantly
    • word1 word2: Find lines containing both words.
    • Select next text and press Ctrl+Alt+F for incremental search.
  2. Multiple Keywords: Use spaces to separate multiple search terms
    • `phrase with backticks`: Alternative phrase syntax
  3. Exact Phrases: Use quotes for exact phrase matching: `error message`
  4. Filter Toggle: Quickly toggle filters with Ctrl+Alt+R when needed
  5. Persistent Highlights: Keywords remain highlighted until cursor move out of current line

⌨️ Key Bindings

🧭 Main Navigation

Command Windows/Linux Mac Description
Main Menu Alt+Shift+S Alt+Shift+S Open QuickLineNavigator main menu

🔍 Search Commands

Command Windows/Linux Mac Description
Search Current File Ctrl+Alt+F Ctrl+Alt+F Search keywords in the active file
Search Open Files Alt+Shift+F Alt+Shift+F Search keywords in all open files
Search Project Ctrl+Alt+E Ctrl+Alt+E Search keywords in all project folders
Search Folder Alt+Shift+E Alt+Shift+E Search keywords in specific folder

🎛️ Filter Controls

Command Windows/Linux Mac Description
Toggle Filters Temporarily Ctrl+Alt+R Ctrl+Alt+R Enable/disable extension filters for this session
Toggle Extension Filters Alt+Shift+R Alt+Shift+R Enable/disable extension filters permanently
Show Filter Status Ctrl+Alt+S Ctrl+Alt+S Display current filter settings

📁 Folder Settings

Command Windows/Linux Mac Description
Set Search Folder Alt+Shift+D Alt+Shift+D Choose a specific folder for searches
Clear Search Folder Ctrl+Alt+D Ctrl+Alt+D Remove custom search folder

🎛️ File Extension Filtering

The file_extensions setting supports various configurations:

Configuration Effect Search Scope / Examples
["."] Only files with extensions Files with extensions like main.py, index.html, but not README, Makefile
[""] Only files without extensions README, Makefile, LICENSE, etc.
[] or ["*"] All files (except blacklist) All files like main.py, README, etc., unless blacklisted
["py"] or [".py"] or ["*.py"] Only specific extension files *.py files like main.py, test.py

Examples

{
    "file_extensions": ["."],            // Only files with extensions
    "file_extensions": [""],             // Only files without extensions
    "file_extensions": ["*"],            // All files
    "file_extensions": [],               // All files (same as above)
    "file_extensions": ["py", "js"],     // Only .py and .js files
    "file_extensions": ["*.py", "*.js"], // Same as above (wildcard format)
    "file_extensions": ["py", ""],       // .py files + files without extensions
    "file_extensions": [".", "py"]       // All files with extensions (including .py)
}

Special Values

  • "*" - Match all files
  • "." - Match only files with extensions
  • "" - Match only files without extensions

📦 Installation

Package Control Installation (Recommended)

  1. Install Package Control if you haven't already
  2. Open Command Palette:
    • Windows/Linux: Ctrl+Shift+P
    • macOS: Super+Shift+P
  3. Type Package Control: Install Package and press Enter
  4. Search for QuickLineNavigator and press Enter
  5. Wait for installation to complete

🔧 Ugrep Inhancement

QuickLineNavigator uses ugrep for high-performance searching. While the plugin works without ugrep (falling back to Python search), having ugrep significantly improves search speed (for heavy lines and multiple keywords).

Obtaining Ugrep

How-to-install ugrep: https://github.com/Genivia/ugrep#install

Without Ugrep

The plugin will automatically detect and use the appropriate binary for your platform. If ugrep is not found, it will fall back to Python-based search, which is slower but fully functional.

🙏 Acknowledgments

This plugin was inspired by and built upon the ideas from several excellent projects and resources:

Plugin Inspirations

  • Fuzzy Search Plugin Discussion + SimpleFuzzy
    • The original concept discussion & plugin that sparked the idea for fuzzy searches enhanced quick line navigation in Sublime Text.
  • SearchInProject by Leonid Shevtsov
    • An excellent implementation of project-wide search that influenced our multi-scope search design.
  • StickySearch by vim-zz
    • A brilliant plugin that inspired our persistent keyword highlighting feature, showing how visual feedback can enhance search workflows.

Conceptual Alignment

  • Jeff Huber's Vision at Chroma
    • This plugin shares the same philosophy of first matching for pre filtering most irrelevant content, and second matching for further scoring, sorting, and retrieval of the remaining small portion, as beautifully articulated (in a different way) by Jeff Huber.

Development Tools

  • Pieces Copilot
    • An invaluable AI-powered development assistant that helped streamline the coding process and improve code quality throughout this project.

Special Thanks

  • ugrep by Robert van Engelen et al.
    • for the blazing-fast search engine which supports --and
  • All contributors and users who help make sublime searching experience better

📝 License

MIT License - see LICENSE file for details

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request. Focus areas:

  • [x] Hit the sub-line accurately = directly jump into that sub-line.
  • [ ] Fuzzy search the whole line like SimpleFuzzy, while jump to the specific subline?
  • [ ] Performance issue -_+ (should always on one's mind), including segmentation, attaining + prefiltering lines, fuzzy search, fuzzy-search jump-into-line…
    • [x] attaining + prefiltering lines: ugrep = fast enough for multi-keywords grep?
    • [x] segmentation: The complexity of single-line slicing has been reduced from “binary × substring scan” to “binary × O(1) + bisect”, which has an order of magnitude improvement for long lines (especially multiple keywords).
    • [x] The keyword preparation overhead of multiple result formatting is almost eliminated.
  • [ ] More mature whole-subline segmentation algorithms for more common Chinese and English languages, as well as for staccato sentences in programming languages.
  • [ ] Perfect segmentation vs approaching quick panel's max_display_length but not exceeding it. (Now tend toward the former rather than the latter, so that there is still a very low probability that exceeds the maximum display length <= bug or feature?)
  • [ ] Concurrent highlighting within the right-hand “minimap”
  • [ ] Refine the search for Chinese phrases
  • [ ] Refined log outputs
  • [ ] More appropriate interaction logic? (I think it seems to have been optimized quite well now)
  • [ ] Highlight (behavior) while editing?

🐛 Issues

Found a bug or have a feature request? Please open an issue on GitHub Issues.

  • Highlight bugs?
    • Some highlights cannot be cleared? (such as forcibly switching search scope, switching projects, closing files, or closing the Sublime window during the search process)
    • Some highlights are not applied to the corresponding keywords (within the editor) in time?
  • [x] Currently, immediately closing Sublime or switching projects will cause the highlight to be unable to be eliminated, when the 4 main search functions of the plugin are running. (not a problem anymore, have been figured out.)
    • [x] I have tried cleaning by view in ST 4 instead of viewid in ST 3, but it seems to have no effect.
  • [x] {Keywords dict} are not retained?
    • [x] Before executing the precise search, switch the scope.
    • [x] After the precise retrieval is executed, switch the scope in the quick panel.
    • [x] After the precise retrieval is executed, switch the scope outside the quick panel.
    • [x] cursor inside the text editor.
    • [x] cursor inside the keywords input panel.
  • [ ] More appropriate delimiter and identifying logic for keyphrases?