# Splitting a tab

Sometimes it's useful to see two different sections of the same file at once.

To split a file in Edit mode:

- Choose View > Split Horizontally, or
- Click the split button at the right edge of the tab bar

You'll see two different views of the same file, which can be scrolled independently. Since both views represent the same file, changes made in one split will also appear in the other.

Note: Each split can be set to a different mode by clicking one of the six mode icons in the toolbar. This allows you to, for example, edit a file while also viewing its preview.

Note: You can split the tab vertically instead by holding down the option key while issuing the split command.

To change the default orientation for new splits:

1. Choose Coda > Preferences...
2. Click General
3. Click on your preferred Split Direction

To view two different files side-by-side:

1. Start by displaying the first document in a tab by itself
2. In the file browser, control-click the second document you wish to open
3. Choose Open in Split

Alternatively, you san simply drag a file from the file browser into the desired split.

To close a split:

- Click the close button located in the bar directly beneath the split you wish to close.

If the split has unsaved changes, you'll be asked if you wish to save before closing the split.

To resize a split:

- Drag the bar between the two splits to either side