# Window/File Management Options (Options Dialog Box)

## Overview

From this dialog you can access WndTabs' advanced window and file management features.

## Options

#### Window Management

> Limit open windows while editing

> With this feature on, WndTabs will automatically close document windows, so that the total number of opened windows doesn't exceed the amount you specified.
> Window closing strategy: the least recently used windows are closed first. Windows of modified documents are ignored (they won't be closed by this feature). If all of your documents are modified, you will be allowed to open one more window, even if the maximum window limit is exceeded.

> Limit open windows while debugging

> Same as above, but the limitation is enforced only while debugging. You may want to specify a different setting for debugging (or disable it altogether) because many extra windows might open while tracing into code. Use the auto close windows feature (see below) to automatically (and selectively) close windows from the debugging session.

> Count all windows belonging to the same tab group as one window

> With this option enabled, window limits are enforced on the number of tab groups, not the number of open windows.

> Auto close window from the following directories when done debugging

> Many times during debugging (and especially if you use the STL...), files of functions you have traced into will open. The windows of these files can quickly clutter your workspace. WndTabs allows you to battle the clutter with this powerful function.

> In the edit box, you can specify a list of directories (separated by a semi-colon) for WndTabs to monitor. If a file from one of these directories is opened during debugging, it will be automatically closed when debugging is done. WndTabs supplies macros for some useful directories (accessed from the arrow button to the right of the edit box):

> $(DS_INCLUDE) | All the directories in DevStudio's include path (see Tools|Options|Directories|Include Files)
> $(DS_LIB) | All the directories in DevStudio's library path (see Tools|Options|Directories|Library Files)
> $(DS_EXEC) | All the directories in DevStudio's executable path (see Tools|Options|Directories|Executable Files)
> $(DS_SOURCE) | All the directories in DevStudio's source path (see Tools|Options|Directories|Source Files)
> $(WORKSPACE) | The path of the currently open workspace
> $(ACTIVE_PRJ) | The path of the active project
> $(ALL_PRJS) | The paths of all the projects in the workspace

#### File Management

> Auto-open alternate file

> With this option enabled, a "header flip" will be executed every time you open a file. This means that whenever you open a .cpp file its corresponding header will automatically open, and vice-versa. This command is especially useful when the advanced tab control is active.