Skip to content

mycollablab/Sublime-Text-3-FindAll

Repository files navigation

Find All Listed

A Sublime Text 3 plugin that mirrors the find functionality from Notepad++. When searching for a phrase, you can use "Find All in Current Doc" and "Find All in All Docs" to get a list of all instances showing the file name, line number, and the actual line content. Clicking on any item will jump to the appropriate position in the document.

Features

  • Find All in Current Document: Search for all instances of a term in the currently active document
  • Find All in All Documents: Search for all instances of a term across all open documents
  • Interactive Results: Click on any result to jump directly to that location
  • Regex Support: Use regular expressions for advanced pattern matching
  • Quick Panel Interface: Results are displayed in Sublime Text's quick panel with monospace font for easy reading
  • Multiple Access Methods: Available through Command Palette, keyboard shortcuts, Tools menu, and right-click context menu
  • Smart Selection: Automatically uses selected text as search term when available

Installation

Manual Installation

  1. Download the plugin files
  2. Navigate to Sublime Text's Packages folder:
    • Windows: %APPDATA%\Sublime Text 3\Packages\
    • macOS: ~/Library/Application Support/Sublime Text 3/Packages/
    • Linux: ~/.config/sublime-text-3/Packages/
  3. Create a new folder called FindAllListed
  4. Copy all plugin files into this folder
  5. Restart Sublime Text

Package Control Installation

This plugin is not yet available through Package Control, but you can install it manually using the steps above.

Usage

Command Palette

Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and search for:

  • Find All Listed: Find All in Current Document
  • Find All Listed: Find All in All Documents
  • Find All Listed: Find Selected in All Documents
  • Find All Listed: Find Options
  • Find All Listed: Find All in Current Document (Regex)

Keyboard Shortcuts

  • Ctrl+Alt+L (or Cmd+Alt+L on Mac): Open Find Options menu
  • Ctrl+Alt+D: Find All in Current Document
  • Ctrl+Alt+A: Find All in All Documents
  • Ctrl+Alt+X: Find All in Current Document (Regex)

Note: These shortcuts are designed to avoid conflicts with Sublime Text's default find functionality

Right-Click Context Menu

Right-click in any document to access "Find All Listed" options:

  • Find Selected in Current Document (when text is selected)
  • Find Selected in All Documents (when text is selected)
  • Find in Current Document... (prompts for search term)
  • Find in All Documents... (prompts for search term)
  • Find Options... (shows main options menu)

Menu Access

Go to Tools → Find All Listed to access all commands through the menu.

How to Use

  1. With Selection: Select text in your document and run any of the find commands to search for that text
  2. Without Selection: Run a find command and you'll be prompted to enter a search term
  3. View Results: Results appear in a quick panel showing:
    • File name
    • Line number
    • Column number
    • The actual line content
  4. Navigate: Click on any result or press Enter to jump to that location

Example Output

MyFile.py:15:8 - def my_function(param):
MyFile.py:23:12 - result = my_function(value)
OtherFile.js:5:2 - function my_function() {

Regular Expression Support

The regex version of the current document search allows you to use regular expressions for more advanced pattern matching. This is useful for finding:

  • All function definitions: def\s+\w+\(
  • All URLs: https?://[^\s]+
  • All email addresses: \b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b

Plugin Structure

  • FindAllListed.py: Main plugin code with all command classes
  • Default.sublime-commands: Command Palette integration
  • Default.sublime-keymap: Windows/Linux keyboard shortcuts
  • Default (OSX).sublime-keymap: macOS keyboard shortcuts
  • Main.sublime-menu: Tools menu integration
  • Context.sublime-menu: Right-click context menu

Commands

  • FindAllInCurrentDocCommand: Search in the active document
  • FindAllInAllDocsCommand: Search across all open documents
  • FindAllInAllDocsWithSelectionCommand: Search selected text across all documents
  • FindAllWithOptionsCommand: Show options menu
  • FindAllInCurrentDocRegexCommand: Regex search in active document

Requirements

  • Sublime Text 3
  • Python 3.3+ (included with Sublime Text 3)

License

This plugin is released under the MIT License.

Contributing

Feel free to submit issues, feature requests, or pull requests to improve this plugin.

Changelog

Version 1.0.1

  • Fixed keyboard shortcuts to avoid conflicts with default Sublime Text actions
  • Added right-click context menu with smart selection detection
  • Fixed Tools menu integration
  • Added FindAllInAllDocsWithSelectionCommand for context menu functionality

Version 1.0.0

  • Initial release
  • Basic find all functionality for current document and all documents
  • Quick panel interface with navigation
  • Regex support for current document searches
  • Command Palette, keyboard shortcuts, and menu integration

About

Notepad++ style Find All in Current/All Documents Search

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages