The History Manager lets you view and compare versions of a file, including multiple backup versions, saved local changes, and the edit buffer of unsaved changes.
For simplicity, the following procedures uses a small text file to introduce the functionality of the History Manager. However, the History Manager is available for most files, including source code and HTML files.
To create and display file versions in the Contents page
- Choose ToolsOptionsEditor Options page and verify that the Create Backup Files option is checked.
- Choose FileNewOtherOther FilesText and click OK to display a blank text file in the Code Editor.
- On line one of the file, type First line of text and save the file using any name and location.
- On line two, type Second line of text and save the file.
- On line three, type Third line of text and save the file. There are now three versions of the file stored in the current directory in a hidden directory named __history.
- Click the History tab, which is next to the Code tab. The revision list at the top of the Contents tab displays three versions of the file. The first version is named ~1~, the second is named ~2~, and the current version is named File. The source viewer at the bottom of the tab displays the source for the selected version.
- Select the different versions to display their source in the source viewer.
- Click the Code tab to return to the Code Editor and on line four of the file, type Fourth line of text but do not save the file. Your change is stored in the editor buffer, but not saved to the file.
- Review the following toolbar and icon descriptions and then use the next procedure to compare the file versions that you just created.
Tip: To sort a column on any page of the History Manager
, click the column heading. The toolbar at the top of the
History Manager contains the following buttons. Not all buttons are available on all pages of the
History Manager.
Tip: The toolbar button functions are also available of the right-click context menus of the History Manager
pages.
To compare file versions using the Diff page
- Using the file that you created in the previous procedure, click the History tab.
- Click the Diff tab at the bottom of the History Manager. The Differences From and To panes at the top of the page shows the file versions that you can compare. At the bottom of the page, source lines that were deleted are highlighted and marked with a minus sign (–). Lines that were added are highlighted and marked with a plus sign (+). The highlighting colors depend on the Code Editor colors.
- Select the different file versions in both the Differences From pane and the To pane to see the results in source viewer.
To make a prior file version the current version
- Using the file from the previous procedures, click the Contents tab.
- Right-click the ~2~ version of the file and select Revert, or click the toolbar button. The Confirm dialog box indicates that reverting the file will lose any unsaved changes in the buffer.
- Click Yes on Confirm dialog box. The ~2~ version becomes the current version.
- Return to the Code Editor and save the change.
Tip: The Revert command is also available on the Info
page.