Skip to content

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:

  1. Default Location: Left sidebar, usually the first panel
  2. Keyboard Shortcut: Cmd+Shift+E (macOS) or Ctrl+Shift+E (Windows/Linux)
  3. Command Palette: Open Command Palette and search for "Explorer"
  4. 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

  1. Right-click in the desired location
  2. Select New File from the context menu
  3. Enter the file name and extension
  4. Press Enter to create the file

New Folder

  1. Right-click in the desired location
  2. Select New Folder from the context menu
  3. Enter the folder name
  4. 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

  1. Right-click on the file or folder
  2. Select Rename from the context menu
  3. Edit the name in the input field
  4. 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

  1. Select the file or folder to delete
  2. Right-click and select Delete from the context menu
  3. 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) or Option (macOS) while dragging
  • Visual Feedback: Indicators show valid drop targets

Cut, Copy, and Paste

  1. Right-click on the file/folder
  2. Select Cut or Copy
  3. Navigate to the destination
  4. 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

  1. Use Cmd+P / Ctrl+P to open Quick Open
  2. Type part of the file name
  3. Select from the filtered results
  4. Press Enter to open the file

Search in Files

  1. Use Cmd+Shift+F / Ctrl+Shift+F to open search panel
  2. Enter search terms
  3. Optionally specify file patterns or folders
  4. 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

  1. Right-click on files or folders
  2. Select Add to AI Context
  3. Files become available for AI analysis and assistance
  4. 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

json
{
  "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

json
{
  "files.exclude": {
    "**/node_modules": true,
    "**/dist": true,
    "**/.git": true,
    "**/build": true
  }
}

Limit File Watching

json
{
  "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

  1. Check if files are excluded in settings
  2. Verify file permissions
  3. Refresh the explorer view
  4. Check if files are hidden by filters

Performance Issues

  1. Exclude large directories from file watching
  2. Reduce the number of files in workspace
  3. Check system resources and disk space
  4. Restart Trae if issues persist

Sync Issues

  1. Verify file system permissions
  2. Check if files are locked by other applications
  3. Refresh workspace or restart Trae
  4. Check for file system errors

Refresh and Reset

  • Refresh Explorer: Right-click and select "Refresh"
  • Reload Window: Cmd+R / Ctrl+R to reload the entire window
  • Reset Workspace: Close and reopen the workspace

Best Practices

Organization

  1. Logical Structure: Organize files in a logical hierarchy
  2. Naming Conventions: Use consistent naming conventions
  3. Folder Grouping: Group related files in appropriate folders
  4. Clean Up Regularly: Remove unused files and folders

Efficiency

  1. Use Keyboard Shortcuts: Learn and use keyboard shortcuts for common operations
  2. Quick Open: Use Cmd+P / Ctrl+P for fast file access
  3. Search Effectively: Use search filters and patterns for better results
  4. Bookmark Frequently Used: Keep frequently accessed files easily accessible

Collaboration

  1. Consistent Structure: Maintain consistent project structure across team
  2. Documentation: Document folder structure and organization
  3. Version Control: Use proper version control practices
  4. Shared Settings: Share workspace settings with team members

Keyboard Shortcuts Reference

ShortcutActionDescription
Cmd+Shift+E / Ctrl+Shift+EToggle ExplorerShow/hide Resource Explorer
Cmd+P / Ctrl+PQuick OpenOpen file by name
Cmd+Shift+F / Ctrl+Shift+FSearch in FilesSearch across all files
F2RenameRename selected file/folder
DeleteDeleteDelete selected items
Cmd+N / Ctrl+NNew FileCreate new file
Cmd+Shift+N / Ctrl+Shift+NNew FolderCreate new folder
EnterOpen/ExpandOpen file or expand folder
SpacePreviewPreview file without opening

Your Ultimate AI-Powered IDE Learning Guide