# Files and navigation

The file tree, the file finder, the command palette, tabs, and panes.


Rip keeps the file tree on the left, tabs on top, and one editor in each pane. Everything on this page works from the keyboard.

## The file tree

The sidebar lists the open folder. It hides the files that `.gitignore` names and reads each folder when you expand it. <kbd>secondary-b</kbd> hides and shows the sidebar. <kbd>secondary-shift-e</kbd> selects the current file in the tree.

In the tree, <kbd>up</kbd> and <kbd>down</kbd> move the selection. <kbd>right</kbd> expands a folder and <kbd>left</kbd> collapses it. <kbd>enter</kbd> opens the selected file. <kbd>escape</kbd> returns to the editor.

<kbd>secondary-n</kbd> creates a file next to the selection, and <kbd>secondary-shift-n</kbd> creates a folder. <kbd>f2</kbd> renames the selection, and <kbd>secondary-backspace</kbd> moves it to the trash. <kbd>secondary-c</kbd> copies the full path, and <kbd>secondary-alt-c</kbd> copies the path from the folder root.

Colors show git state. Added, modified, deleted, and ignored files each have their own color. A dot marks a file that changed on disk while you looked elsewhere. [Working with agents](/docs/working-with-agents.md) explains that dot.

## Find a file

Press <kbd>secondary-p</kbd> and type part of a name. The list narrows as you type. <kbd>enter</kbd> opens the selected file, and <kbd>secondary-enter</kbd> opens it in a new pane.

## Run a command

Press <kbd>secondary-shift-p</kbd> and type part of a command name. Every action appears here with its keys. <kbd>enter</kbd> runs the selected command.

## Tabs

Each file opens in a tab. <kbd>secondary-w</kbd> closes the tab, <kbd>secondary-shift-t</kbd> reopens the last closed tab, and <kbd>secondary-alt-w</kbd> closes the other tabs. <kbd>ctrl-tab</kbd> and <kbd>ctrl-shift-tab</kbd> cycle through the tabs. <kbd>secondary-1</kbd> to <kbd>secondary-8</kbd> jump to a tab by position, and <kbd>secondary-9</kbd> jumps to the last tab.

## Panes

<kbd>secondary-\</kbd> splits the editor to the right, and <kbd>secondary-alt-\</kbd> splits it down. <kbd>secondary-k</kbd> and then an arrow key splits in that direction. <kbd>secondary-k secondary-right</kbd> moves the focus to the pane on the right, and the other arrows work the same way.

The same file in two panes shares its text, its undo history, and its unsaved state. <kbd>secondary-k secondary-m</kbd> moves the current tab to the next pane. <kbd>secondary-k shift-enter</kbd> zooms the pane to fill the window. Press it again to restore the layout. <kbd>secondary-k w</kbd> closes the pane.

Layouts arrange every pane at once. <kbd>secondary-alt-1</kbd> to <kbd>secondary-alt-4</kbd> make one to four columns. <kbd>secondary-alt-5</kbd> makes a grid. <kbd>secondary-alt-8</kbd> and <kbd>secondary-alt-9</kbd> make two or three rows. Drag a divider to resize a pane.

## Focus and zoom

On macOS, <kbd>ctrl-0</kbd> focuses the sidebar and <kbd>ctrl-1</kbd> the editor. On Linux, the keys are <kbd>alt-0</kbd> and <kbd>alt-1</kbd>. <kbd>secondary-=</kbd> and <kbd>secondary--</kbd> zoom the text in and out, and <kbd>secondary-0</kbd> restores the size.

## Keys

| Keys | What happens |
| --- | --- |
| <kbd>secondary-p</kbd> | Find a file by name. |
| <kbd>secondary-shift-p</kbd> | Run a command by name. |
| <kbd>secondary-b</kbd> | Hide or show the sidebar. |
| <kbd>secondary-shift-e</kbd> | Select the current file in the tree. |
| <kbd>secondary-\</kbd> | Split the editor to the right. |
| <kbd>secondary-k shift-enter</kbd> | Zoom the pane, or restore the layout. |
| <kbd>secondary-shift-t</kbd> | Reopen the last closed tab. |

## Settings

| Key | What it changes |
| --- | --- |
| `show-sidebar` | Whether a new window shows the sidebar. |
| `sidebar-width` | The width of the sidebar in pixels. |
