Resource Explorer
The Resource Explorer in Trae is a powerful file and folder management tool that provides an intuitive interface for navigating your project structure, managing files, and accessing project resources efficiently.
Overview
The Resource Explorer offers:
- File Tree Navigation: Hierarchical view of your project structure
- File Operations: Create, rename, delete, and move files and folders
- Search Functionality: Quick file and content search capabilities
- Context Menus: Right-click actions for common operations
- Drag and Drop: Intuitive file management through drag and drop
- Integration: Seamless integration with other Trae features
Accessing the Resource Explorer
The Resource Explorer is typically located in the left sidebar of Trae:
- Default Location: Left sidebar, usually the first panel
- Keyboard Shortcut:
Cmd+Shift+E(macOS) orCtrl+Shift+E(Windows/Linux) - Command Palette: Open Command Palette and search for "Explorer"
- View Menu: Access through View > Explorer
Basic Navigation
File Tree Structure
The Resource Explorer displays your project as a hierarchical tree:
- Folders: Expandable/collapsible containers for files
- Files: Individual project files with appropriate icons
- Nested Structure: Reflects your actual file system organization
- Root Directory: Top-level project folder
Expanding and Collapsing
- Click Arrow: Click the arrow icon next to folders to expand/collapse
- Double-Click: Double-click folder names to toggle expansion
- Keyboard Navigation: Use arrow keys to navigate and Enter to expand
- Expand All: Right-click and select "Expand All" for bulk expansion
File Icons and Indicators
The Resource Explorer uses visual indicators to provide information:
- File Type Icons: Different icons for various file types
- Git Status: Color coding for version control status
- Modified Indicators: Dots or markers for unsaved changes
- Hidden Files: Dimmed appearance for hidden or ignored files
File Operations
Creating Files and Folders
New File
- Right-click in the desired location
- Select New File from the context menu
- Enter the file name and extension
- Press Enter to create the file
New Folder
- Right-click in the desired location
- Select New Folder from the context menu
- Enter the folder name
- Press Enter to create the folder
Keyboard Shortcuts
- New File:
Cmd+N/Ctrl+N(when Explorer is focused) - New Folder:
Cmd+Shift+N/Ctrl+Shift+N
Renaming Files and Folders
- Right-click on the file or folder
- Select Rename from the context menu
- Edit the name in the input field
- Press Enter to confirm or Esc to cancel
Alternative Method:
- Select the file/folder and press
F2 - Or click once to select, then click again to enter rename mode
Deleting Files and Folders
- Select the file or folder to delete
- Right-click and select Delete from the context menu
- Confirm the deletion in the dialog box
Keyboard Shortcut: Delete key (or Cmd+Backspace on macOS)
Moving and Copying
Drag and Drop
- Move: Drag files/folders to new locations
- Copy: Hold
Ctrl(Windows/Linux) orOption(macOS) while dragging - Visual Feedback: Indicators show valid drop targets
Cut, Copy, and Paste
- Right-click on the file/folder
- Select Cut or Copy
- Navigate to the destination
- Right-click and select Paste
Keyboard Shortcuts:
- Cut:
Cmd+X/Ctrl+X - Copy:
Cmd+C/Ctrl+C - Paste:
Cmd+V/Ctrl+V
Advanced Features
Search Functionality
Quick File Search
- Use
Cmd+P/Ctrl+Pto open Quick Open - Type part of the file name
- Select from the filtered results
- Press Enter to open the file
Search in Files
- Use
Cmd+Shift+F/Ctrl+Shift+Fto open search panel - Enter search terms
- Optionally specify file patterns or folders
- View results with context and line numbers
Filtering and Sorting
File Filters
- Show/Hide Hidden Files: Toggle visibility of hidden files
- Git Ignored Files: Control display of ignored files
- File Type Filters: Filter by specific file extensions
Sorting Options
- Alphabetical: Sort files and folders alphabetically
- Type: Group by file type
- Modified Date: Sort by last modification time
- Size: Sort by file size
Multi-Selection
- Ctrl+Click (Windows/Linux) or Cmd+Click (macOS): Select multiple individual items
- Shift+Click: Select a range of items
- Ctrl+A / Cmd+A: Select all items in current folder
Context Menu Actions
Right-click context menus provide quick access to:
- File Operations: New, rename, delete, copy, cut, paste
- Open Actions: Open, open with, reveal in system explorer
- Source Control: Git operations (if applicable)
- Terminal Actions: Open terminal in folder location
- AI Integration: Add to AI context, analyze with AI
Integration with Other Features
Source Control Integration
The Resource Explorer integrates with Git and other version control systems:
- Status Indicators: Visual indicators for modified, added, deleted files
- Color Coding: Different colors for different Git statuses
- Context Actions: Git operations available in context menus
- Branch Information: Display current branch and status
AI Integration
Adding Files to AI Context
- Right-click on files or folders
- Select Add to AI Context
- Files become available for AI analysis and assistance
- Use
#symbol in chat to reference added files
AI-Powered Operations
- Smart Rename: AI suggestions for better file names
- Code Analysis: Analyze file structure and dependencies
- Documentation Generation: Generate documentation for selected files
Terminal Integration
- Open Terminal Here: Right-click folders to open terminal in that location
- Copy Path: Copy file/folder paths for use in terminal commands
- Reveal in Terminal: Navigate terminal to file location
Customization Options
Explorer Settings
Customize the Resource Explorer through settings:
Display Options
{
"explorer.compactFolders": true,
"explorer.confirmDelete": true,
"explorer.confirmDragAndDrop": true,
"explorer.sortOrder": "default",
"explorer.autoReveal": true
}File Associations
- Default Programs: Set default applications for file types
- Custom Icons: Assign custom icons to specific file types
- File Patterns: Define patterns for file grouping and filtering
Workspace-Specific Settings
Configure explorer behavior per workspace:
- Excluded Files: Hide specific files or patterns
- Folder Structure: Customize folder display and organization
- Search Scope: Define default search scopes and filters
Performance Optimization
Large Project Handling
For large projects, optimize performance:
Exclude Unnecessary Files
{
"files.exclude": {
"**/node_modules": true,
"**/dist": true,
"**/.git": true,
"**/build": true
}
}Limit File Watching
{
"files.watcherExclude": {
"**/node_modules/**": true,
"**/dist/**": true
}
}Memory Management
- Lazy Loading: Files are loaded on-demand
- Virtual Scrolling: Efficient rendering of large file lists
- Caching: Intelligent caching of file metadata
Troubleshooting
Common Issues
Files Not Appearing
- Check if files are excluded in settings
- Verify file permissions
- Refresh the explorer view
- Check if files are hidden by filters
Performance Issues
- Exclude large directories from file watching
- Reduce the number of files in workspace
- Check system resources and disk space
- Restart Trae if issues persist
Sync Issues
- Verify file system permissions
- Check if files are locked by other applications
- Refresh workspace or restart Trae
- Check for file system errors
Refresh and Reset
- Refresh Explorer: Right-click and select "Refresh"
- Reload Window:
Cmd+R/Ctrl+Rto reload the entire window - Reset Workspace: Close and reopen the workspace
Best Practices
Organization
- Logical Structure: Organize files in a logical hierarchy
- Naming Conventions: Use consistent naming conventions
- Folder Grouping: Group related files in appropriate folders
- Clean Up Regularly: Remove unused files and folders
Efficiency
- Use Keyboard Shortcuts: Learn and use keyboard shortcuts for common operations
- Quick Open: Use
Cmd+P/Ctrl+Pfor fast file access - Search Effectively: Use search filters and patterns for better results
- Bookmark Frequently Used: Keep frequently accessed files easily accessible
Collaboration
- Consistent Structure: Maintain consistent project structure across team
- Documentation: Document folder structure and organization
- Version Control: Use proper version control practices
- Shared Settings: Share workspace settings with team members
Keyboard Shortcuts Reference
| Shortcut | Action | Description |
|---|---|---|
Cmd+Shift+E / Ctrl+Shift+E | Toggle Explorer | Show/hide Resource Explorer |
Cmd+P / Ctrl+P | Quick Open | Open file by name |
Cmd+Shift+F / Ctrl+Shift+F | Search in Files | Search across all files |
F2 | Rename | Rename selected file/folder |
Delete | Delete | Delete selected items |
Cmd+N / Ctrl+N | New File | Create new file |
Cmd+Shift+N / Ctrl+Shift+N | New Folder | Create new folder |
Enter | Open/Expand | Open file or expand folder |
Space | Preview | Preview file without opening |