Options dialog box: Environment > Documents

Use this page of the Options dialog box to control the display of documents in the integrated development environment (IDE) and manage external changes to documents and files. You can access this dialog box by clicking Options on the Tools menu and then selecting Environment > Documents.

Detect when file is changed outside the environment

When this option is selected, a message immediately notifies you of changes to an open file that have been made by an editor outside the IDE. The message lets you reload the file from storage.

Reload modified files unless there are unsaved changes

When you have Detect when file is changed outside the environment selected and an open file in the IDE changes outside the IDE, a warning message is generated by default. If this option is enabled, no warning appears and the document is reloaded in the IDE to pick up the external changes.

Allow editing of read-only files; warn when attempt to save

When this option is enabled, you can open and edit a read-only file. When you are finished, you must use the Save As command to save the file by a new name if you want to save a record of your changes.

Open file using directory of currently active document

When selected, this option specifies that the Open File dialog box displays the directory of the active document. When this option is cleared, the Open File dialog box displays the directory last used to open a file.

Check for consistent line endings on load

Select this option to have the editor scan the line endings in a file and display a message box if inconsistencies are detected in how line endings are formatted.

Display warning when global undo will modify edited files

Select this option to display a message box when the Global Undo command will roll back refactoring changes made in files that also were changed after the refactoring operation. Returning a file to its pre-refactoring state might discard subsequent changes made in the file.

Show Miscellaneous files in Solution Explorer

Select this option to display the Miscellaneous Files node in Solution Explorer. Miscellaneous files are files that are not associated with a project or solution but can appear in Solution Explorer for your convenience.

Note

Select this option to enable the View in Browser command on the File menu for web documents not included in the active web application.

Items saved in the Miscellaneous files project

Specifies the number of files to persist in the Miscellaneous Files folder of Solution Explorer. These files are listed even if they are no longer open in an editor. You can specify any whole number from 0 to 99. The default number is 0.

For example, if you set this option to 5 and have 10 miscellaneous files open, when you close all 10 files, the first 5 will still be shown in the Miscellaneous Files folder.

Save documents as Unicode when data cannot be saved in codepage

Select this option to cause files containing information incompatible with the selected codepage to be saved as Unicode by default.

Automatically save files when Visual Studio is in the background

Select this option when you want Visual Studio, after it loses focus, to save every file in the IDE. This includes project files, solution files, and even miscellaneous files that aren’t part of the project or solution. The intent is that when you switch to another tool, all your changes in Visual Studio are committed to disk.

To learn more, see the Suffer from Ctrl+S fatigue? We have a feature for you blog post.

See also