Basic Search
Starting a Search
Press S
to enter search mode:
- Press
S
to activate search - Start typing your search term
- Results appear instantly as you type
- Press
Esc
to finish searching and navigate results
Search Example
# Search for all JavaScript files
S → .js → Esc
# Search for component files
S → component → Esc
# Search for configuration files
S → config → Esc
Search Modes
Termix operates in different modes during search:
Search Mode (S
)
- Active typing: Characters are added to search query
- Real-time filtering: Results update as you type
- Visual indicator: Status bar shows "Search: query█"
- Background processing: Deep search runs in background
Filtered Navigation Mode (after Esc
)
- Normal navigation: Use arrow keys to move through results
- Maintained filter: Only matching files are shown
- Status indication: Shows current filter in status bar
- Operation support: All file operations work on filtered results
Combining Search with Sorting
Filtering finds what you're looking for; sorting helps you organize it. You can use the interactive sort menu on both a full directory listing and on a filtered search result set.
This creates a powerful workflow for finding exactly what you need.
Example Workflow: Find and Sort
Imagine you want to find the most recently edited Markdown document in your entire project.
- Search (
S
): PressS
and type.md
to find all Markdown files. - Navigate (
Esc
): PressEsc
to apply the filter and browse the results. - Sort (
T
): PressT
to open the sort menu. - Select: Use the arrow keys to highlight "Date: Newest First" and press
Enter
.
Instantly, your list of Markdown files is re-ordered, with the most recently modified file at the top, ready for you to open.
Search Features
Case-Insensitive Matching
Search is automatically case-insensitive:
# These searches are equivalent
S → README → Esc
S → readme → Esc
S → ReAdMe → Esc
Partial Matching
Search matches partial filenames:
# Find all files containing "test"
S → test → Esc
# Matches: test.js, MyTest.cs, testing.md, etc.
Recursive Search
Search automatically includes all subdirectories:
# Finds files in any subdirectory
S → controller → Esc
# Matches: src/controllers/UserController.cs, api/ProductController.js, etc.
Advanced Search Techniques
File Extension Search
Search by file extension to find specific file types:
# Find all C# files
S → .cs → Esc
# Find all image files
S → .png → Esc
S → .jpg → Esc
Path-Based Search
Search can match directory names in file paths:
# Find files in src directories
S → src/ → Esc
# Find test-related files
S → /test/ → Esc
Multiple Terms
While Termix doesn't support complex query syntax, you can search for multiple terms by using common substrings:
# Find user-related controller files
S → usercontroller → Esc
# Find configuration JSON files
S → config.json → Esc
Smart Filtering
Git Integration
Termix automatically respects .gitignore
files:
- Ignored files: Files in
.gitignore
are excluded from search results - Ignored directories: Entire directories can be ignored
- Nested gitignore: Supports
.gitignore
files in subdirectories - Global gitignore: Respects user's global git ignore settings
Default Ignore Patterns
Termix has built-in ignore patterns for common build and cache directories:
node_modules/ # Node.js dependencies
bin/ # Build outputs
obj/ # Build intermediates
.git/ # Git repository data
__pycache__/ # Python cache
.DS_Store # macOS system files
Thumbs.db # Windows thumbnails
Ignore Service Benefits
This smart filtering means your searches return only relevant files:
- Faster results: Fewer files to process
- Cleaner output: No noise from build artifacts
- Better focus: See only source files and documents
Search Performance
Background Processing
Termix optimizes search performance:
- Immediate local results: Shows matches from current directory instantly
- Background deep search: Recursively searches subdirectories in background
- Progressive results: Results improve as background search completes
- Search indicator: Status shows when background search is active
Caching Strategy
- Search cache: Results are cached for the current directory tree
- Invalidation: Cache is cleared when directory contents change
- Memory efficient: Cache size is managed automatically
Large Directory Handling
For very large directory trees:
- Responsive interface: UI remains responsive during search
- Cancellation: Starting a new search cancels previous ones
- Debouncing: Rapid typing doesn't trigger excessive searches
Navigation Within Search Results
Moving Through Results
Once you've applied a filter (pressed Esc
after searching), you can easily navigate and organize the results. You can also press T
at any time to sort the current list (e.g., by date or size).
Key | Action | Description |
---|---|---|
↑ / ↓ | Navigate | Move through filtered results |
J / K | Navigate | Vim-style movement |
Enter / L | Open | Open selected file |
H / Backspace | Up | Navigate to parent directory |
Maintaining Search Context
When navigating from search results:
- Enter directory: Search context is temporarily saved
- Use
B
: Returns to original search results - Clear filter: Use
Esc
to clear and show all files - New search: Press
S
to start a new search
Search State Management
Termix tracks several aspects of search state:
- Active query: Current search terms
- Result set: Files matching the query
- Navigation position: Where you are in the results
- Original context: How to return to search results
Search Examples and Use Cases
Code Development
# Find all TypeScript component files, then sort by newest
S → .tsx → Esc → T → Select "Date: Newest First"
# Find specific component
S → Button → Esc
# Find test files
S → .test. → Esc
S → .spec. → Esc
Configuration Management
# Find all config files and sort by most recently modified
S → config → Esc → T → Select "Date: Newest First"
# Find environment files
S → .env → Esc
# Find package files
S → package.json → Esc
Documentation
# Find README files
S → README → Esc
# Find all markdown docs, then sort alphabetically
S → .md → Esc → T → Select "Name: A to Z"
# Find specific docs
S → api → Esc
Project Structure
# Explore source directories
S → src/ → Esc
# Find build scripts
S → build → Esc
S → script → Esc
Search Tips and Tricks
Efficient Searching
- Start broad, then narrow: Begin with general terms, then add specificity
- Use extensions: File extensions are very effective filters
- Combine with sorting: Search to find, sort to organize
- Use partial matches: Don't type full filenames
Search Patterns
- By file type:
.js
,.py
,.md
,.json
- By purpose:
test
,config
,util
,helper
- By feature:
auth
,user
,payment
,api
- By location:
src/
,lib/
,docs/
Workflow Integration
- Search → Sort → Operate: Find files, organize them, then perform operations
- Search → Open → Return: Use
B
to return to search results after opening files - Iterative refinement: Refine search terms based on initial results
Clearing and Managing Filters
Clear Active Filter
To remove an active filter and show all files:
- Press
Esc
: If in normal mode, clears active filter - Status confirmation: Status bar confirms filter is cleared
- Full directory: Shows complete directory contents again
Search History
While Termix doesn't persist search history between sessions:
- Current session: Last search query is remembered
- Quick re-search: Easy to repeat recent searches
- Context switching: Can switch between filtered and unfiltered views
Keyboard Shortcuts Reference
Key | Mode | Action |
---|---|---|
S | Normal | Start search |
T | Normal / Filtered | Open the interactive sort menu |
Esc | Search | Apply filter and enter navigation mode |
Esc | Filtered | Clear filter and show all files |
B | Any | Return to search results (when available) |
Character keys | Search | Add to search query |
Backspace | Search | Remove from search query |
Performance Tips
Optimize Search Performance
- Use specific terms: More specific searches are faster
- Leverage ignore patterns: Let Termix skip irrelevant directories
- Don't over-search: Find what you need, then navigate normally
- Clear when done: Clear filters to improve general navigation
Best Practices
- Search before navigate: Use search to find the right area, then navigate normally
- Combine techniques: Use search with sorting and other Termix features
- Understand your project: Know your directory structure to search effectively
- Practice patterns: Develop consistent search patterns for your workflow
Next Steps
Now that you understand search and filtering:
- Check out Keyboard Shortcuts for a complete reference
- Learn Tips & Tricks for advanced workflows
- Explore Troubleshooting if you encounter issues
Pro Search Technique
The most powerful workflow: Use Search (S
) to find files, Navigate (Esc
) the results, Sort (T
) them to find the right one, perform operations, then use Return (B
) to go back to your sorted results and continue. This creates an efficient find-organize-operate-repeat cycle!