Change Tracking

When you are in the midst of editing a source code file, it is tremendously useful to understand which lines of code have been committed (that is, saved to disk) and which have not. Change tracking provides this functionality; a yellow vertical bar in the text editor’s selection margin (and vertical scrollbar if enabled; see the prior chapter) spans any lines in the editor that have been changed but not saved. If content has been changed and subsequently saved, it is marked with a green vertical bar in the selection margin.

By looking at the yellow and green tracking bars, you can quickly differentiate between the following:

Image Code that hasn’t been touched since the file was loaded (no bar)

Image Code that has been touched and saved since the file was loaded (green bar)

Image Code that has been touched but not saved since the file was loaded (yellow bar)

Change tracking is valid only for as long as the editor window is open. In other words, change tracking is significant only for the current document “session”; if you close and reopen the window, the track bars disappear because you have established a new working session with that specific document.

Figure 7.3 shows a section of a code file displaying the change tracking bars.

Image

FIGURE 7.3 Change tracking.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset