Skip to content
| Marketplace
Sign in
Visual Studio Code>Visualization>Only FilesNew to Visual Studio Code? Get it now.
Only Files

Only Files

Max Bass

| (0) | Free
Select and work only with the files you will use
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Only Files 📂💗

🚀 Use only files that you really need!

vscode Version github

Wasting too much time looking for a file or folder among a ton of files and directories? Only Files helps you work with only the ones you need right now.

Only Files keeps your focus strictly on the files and folders you add to the view while preserving their original hierarchy. It automatically updates when you change the structure or manipulate files and it fully supports drag-n-drop.

🎯 It is the perfect choice if you want a clean productive environment that saves valuable screen space in VS Code.

What the extension can do?

Only Files - 3 views you can manage:

  • Folder View: this treeview replicates the standard Explorer view but adds enhanced capabilities and a streamlined short context menu, also making project navigation much easier.

  • Only Files View: this treeview displays only the items you manually add to it. So it behaves like a container. It includes advanced features and turns it into a comfortable tool for managing your projects.

  • Preview View: a webview that lets you load and preview HTML, PDF, TXT, LOG and MD files. It fully supports zooming and drag-n-drop.

✨Key Features

Folder View (FILES)

🔸Switching ON use ignore-files hides the folders and files listed in your chosen ignore-file.
🔸Switching ON plain view shows all folder and file names as paths relative to the workspace folder. Once ON you can uncollapse any folder.
🔸Uncollapsing all to plain view switches ON plain view, displaying all files decoupled from their folders.

Only Files View (ONLY)

🔹Drag-n-drop or inline Send to Only Files sends an item or selected items with its content to this view from anywhere.
🔹Drag-n-drop from this view or inline Remove from Only Files removes the item with its content from the view.
🔹Marked items can be used anytime you want to collect them here.

Preview View

 ⬥ Drag-n-drop-with-Shift or inline Preivew in Only Files sends an item from Only Files View to be previewed.
 ⬥ Preivew in Only Files context menu item does the same from anywhere. The view preserves its state.
 ⬥ Holding Ctrl by using scroll changes zoom, holding Shift - scrolls horizontally. Context menu shows file name and options.

Specs

  • All Built-in Explorer-like feautures, e.g. rename, copy, delete, cut, paste are supported in both treeviews.

  • All changes made in your workspace are reflected in the Folder and Only Files views in real time.

  • Rename file from the opened tab is supported.

  • Context menu call on an empty Preview suggests to open its settings.

  • Context menu call on a non-empty Preview suggests to open Tip.

  • Tip suggests to open hot keys and all commands.

  • The item changes its label color during renaming.

  • Use 🤖 commands:

    • Rename file/folder: F2
    • Rename opened file: Shift+F2
    • Send/Add from the Explorer, an editor tab, or a selected tree item: Shift+Space, then C (macOS: Shift+Space, then C)
    • Remove from an editor tab or selected tree item: Shift+Space, then X (macOS: Shift+Space, then X)
    • Preview the selected file or active editor: Shift+Space, then V
    • Refresh the Files view: Shift+Space, then A
    • Refresh the Only Files view: Shift+Space, then Z
    • Switch between classic and plain views: Shift+Space twice

📽️Demo

How to use

flowchart TD
  Start([Install Only Files]) --> Workspace[Open one or more workspace folders]
  Workspace --> Explorer[Open the Only Files Explorer]
  Explorer --> FilesView[Files view<br/>Browse workspace folders and files]
  Explorer --> OnlyView[Only Files view<br/>Browse selected items]
  Explorer --> PreviewView[Preview view<br/>View supported files]

  FilesView --> Select[Select a file or folder]
  Select --> Add[Add to Only Files]
  Tab[Open editor tab] --> AddFromTab[Add active tab to Only Files]
  Command[Run Add shortcut<br/>Shift+Space, C] --> Add
  AddFromTab --> Add
  Add --> OnlyView

  OnlyView --> Open[Open a selected file]
  Open --> Edit[Edit in the VS Code editor]
  Open --> Preview[Show preview]
  Preview --> PreviewView

  OnlyView --> Remove[Remove from Only Files]
  Remove --> Keep[File remains on disk]

  Workspace --> Changes[Workspace changes]
  Changes --> Sync[Files and Only Files refresh automatically]
  Sync --> FilesView
  Sync --> OnlyView

All in one


📑Menu

Notes

  • The currently active view displays a green magnifier icon  

    (indicating which treeview is controlling the file system at the moment)

  • Magnifier icon button is used for a list search.

  • Uncollapsed folders have background tint and they cannot be added to Only Files View.

  • Uncollapsing every folder in the Folder View gives you the same effect as Uncollapse All to Plain has.

  • Since Uncollapse All to Plain and Reveal References are highly time-consuming tasks the extension suggests to specify a gitignore file to exclude irrelevant folders from the target operative scope if needed.

  • Show All Possible Files resets all top-level folders in the Only Files View to the state like they were freshly added.

  • Show only This One removes the top-level folder of a target item from Only Files View and add exactly that item to this view.

  • An item removed from the Only Files View is highlighted in orange if its parent folder is still present. This can be disabled in settings.

  • Refreshing Only Files View toggles the sorting order: green colored icon indicates that items are sorted by their base names instead of their file paths; refreshing again restores the original order and reloads displayed items from the file system; it also switches to plain view if it is ON.

  • The extension provides a fallback system for file operations: if VS Code cannot complete an operation, the extension tries to achieve the goal in a more aggresive way and warns the user.

  • Single click selects the item, fast double click opens; slow double click opens autopick item rename dialog.

  • Via the settings the user can manage the built-in autopick dialog time, click and rename time; the user can enable/disable showing empty or uncollapsed folders.

  • The user can change default Postfix in the file name used by Duplicate.


⚡Keyboard Shortcuts

Be sure to explore all the commands and shortcuts available to you!

The extension uses the following default shortcuts.

Ctrl is mapped to Cmd on macOS. Send(Add)/Remove chords intentionally use Shift+Space on both platforms.

Action Windows/Linux macOS
Rename selected item F2 F2
Rename active tab Shift+F2 Shift+F2
Delete selected item Delete Delete
Permanently delete selected item Shift+Delete Shift+Delete
Copy selected item Ctrl+C Cmd+C
Cut selected item Ctrl+X Cmd+X
Paste into a view Ctrl+V Cmd+V
Copy file path Ctrl+Shift+C Cmd+Shift+C
Send item Shift+Space, then C Shift+Space, then C
Remove item Shift+Space, then X Shift+Space, then X
Preview item Shift+Space, then V Shift+Space, then V
Refresh Files Shift+Space, then A Shift+Space, then A
Refresh Only Shift+Space, then Z Shift+Space, then Z
Switch classic/plain mode Shift+Space twice Shift+Space twice

Contribution

Contributions are welcome! 🙏 Feel free to take part in the extension evolving, ask question, open issue and discuss.

Whether you are fixing a bug, adding a feature, or improving documentation, here is how you can get involved:

1. Reporting Bugs & Feature Requests

  • Check the Issues tab to see if your topic is already being discussed.
  • If not, open a new issue. Please include clear steps to reproduce bugs, or a detailed description for new features.

2. Making Changes

  1. Fork the repository.
  2. Create a new branch for your feature or fix: git checkout -b feature/your-feature-name.
  3. Make your changes and commit them with clear messages.
  4. Ensure your code follows the existing project style and that all tests pass if possible.

3. Submitting a Pull Request

  • Open a Pull Request (PR) against the main branch.
  • Describe your changes clearly in the PR description.
  • Wait for review! I will look over your code and suggest changes if needed.

Thank you for helping make this project better!


Misc

Theme used in the examples: Dark SynthWave Version

Changelog

   LOG

License

   MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft