Editor

 Description

You can open a file for editing in an internal built-in editor. There are default associations between frequently used file types and the internal editors in the File Types preferences panel.

The internal editor can be accessed either from the Working copy view or from the Synchronize view. The editor can also be used from the History view to view a selected revision of a file. In this case there are no edits allowed.

 

Figure 19.53. Editor View

Editor View


Only one file can be edited in an internal editor at a time. If you try to open another file it will be opened in the same editor window. The editor has syntax highlighting for known file types. This means that a different color will be used for each type of recognized token in the file. If the content type of the file is unknown you will be prompted to choose the proper way the file should be opened.

After editing the content of the file in an internal editor you can save it to disk by using the Save action from the File menu or the Ctrl + S key shortcut. After saving your file you can see the file changed status into Working copy view and Synchronize view.

If the internal editor associated with a file type is not the XML Editor then the encoding set in the preference Encoding for non XML files is used for opening and saving a file of that type. This is necessary because in case of XML files the encoding is usually declared at the beginning of the XML file in a special declaration or it assumes the default value UTF-8 but in case of non XML files there is no standard mechanism for declaring the encoding of the file.