Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>File ArrangerNew to Visual Studio Code? Get it now.
File Arranger

File Arranger

Janik Heiler

|
3 installs
| (0) | Free
Enables the user to easily switch between (parametrized) arrangement of files.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

File Arranger

This extension allows quickly switching between different arrangements of files.

Usage

Configuration File

You will need a file called .file-arrangements. If you are using a workspace, it needs to lie in the same directory as the workspace file. If you have opened multiple files, but not as a workspace, it needs to lie directly in the first folder. In previous versions, the name had to be file-arrangements. This still works, but it is easier to gitignore a file containing a dot, so the new name should be used. If you have both, the one with the new name will be used.

Here's an example .file-arrangements.

{
    "studying": [
        [
            [
                "script.pdf"
            ]
        ],
        [
            [
                "lectureNotes.pdf"
            ]
        ]
    ],
    "exercise": [
        [
            [
                "exercise/ex$(exnum)/[a-zA-Z0-9_]*\.tex",
                "exercise/ex$(exnum)/code/"
            ]
        ],
        [
            [
                "exercise/ex$(exnum)/[a-zA-Z0-9_]*\.pdf"
            ],
            [
                "exercise/ex$(exnum)/graphics/"
            ]
        ]
    ]
}

You can give each arrangement a name by setting the key name. Each arrangement is a list of columns. Each column is a list of rows. Each row is a list of tabs. Each tab is a string. When an arrangement is loaded, each file in all open files will be compared to each tab. If the absolute path to a file matches (RegEx) a tab, it will be openend at this position. It is imperative to use forward slashes (/) in file paths. All occurrences of $(abc) are treated as parameter placeholders. When loading an arrangement, those will be replaced by the passed value or by a standard value, which at first is just an empty string. You can have multiple occurrences of the same placeholder and you can have different placeholders. There is no way to escape placeholders.

Loading Arrangements

Press [ctrl]+[alt]+[s] (mac: [cmd]+[alt]+[s]) to open a prompt for loading arrangements. Your input will be split at whitespaces. The first argument is the name of the arrangement. Arguments of the form key=value will be used to replace placeholders $(key) with value. If there is an argument of form value, it will be used to set the default value. If the default value is not set, it is an empty string.

So studying will do the following.

+----------------+----------------+
|                |                |
| script         | lectureNotes   |
|                |                |
+----------------+----------------+

And exercise exnum=7 will do the following.

+----------------------------------------+----------------------------------------+
|                                        |                                        |
| exercise/ex7/<.tex-files>              | exercise/ex7/<.pdf-files>              |
| exercise/ex7/code/<everything>         |                                        |
|                                        +----------------------------------------+
|                                        |                                        |
|                                        | exercise/ex7/graphics/<everything>     |
|                                        |                                        |
+----------------------------------------+----------------------------------------+

The main reason why I added the default value for placeholders is that it suffices to write exercise 7 if you only have one parameter.

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