# Notes and folders

Every note is a Markdown file, and every folder in the sidebar is a real folder on your device. What you see in Niv is what's in the folder.

## Create a note

- Press ⌘N, or choose **File › New Note**.
- In the sidebar, choose **New note** in the **Notes** header, or hover a folder and choose **New note here**.
- Press ⌘O, type a name that doesn't exist yet and press ⇧↵.
- Write on Home: a line in **New note** becomes a note. See Home.

## Create a folder

Choose **File › New Folder**, **New folder** in the **Notes** header, or right-click a folder and choose **New folder**.

## Rename

Right-click a note or folder and choose **Rename**. You can also rename a note from its title at the top of the note.

When you rename a note, Niv updates the links that point to it. The sidebar shows how many links it updated, in how many notes.

Some names can't be used, and Niv says why as you type:

- characters some devices can't save in a file name;
- the characters # ^ [ ] and |, which would break links to the note;
- a dot at the start, which would hide the file.

## Move

Drag a note or folder onto another folder in the sidebar.

## Select several

⌘-click adds a note or folder to the selection. ⇧-click selects a range. Right-click the selection to delete it all at once.

## Delete

Right-click and choose **Delete**. Niv asks first and says what will happen:

- A note or folder only on this device goes to the folder's trash, `.niv/trash`. You can get it back from there.
- A note that syncs with a Space also leaves the Space, on every device. You can restore it from **Settings › History**. See Versions and history.

Right after a delete, a message offers **Undo**.

## More from the right-click menu

- **Reveal in Finder** (on macOS) shows the file or folder in Finder.
- **Open in Terminal** opens a Terminal window in that folder. See Your agent in the terminal.
- **Keep local only** keeps a note or folder off the Space. See Local-only files.
- On an empty spot in the sidebar: **Refresh** and **Collapse all**.

<!-- screenshot: the right-click menu on a note -->

## Notes outside the folder

A Markdown file you open that isn't in your folder opens on its own. Niv edits it where it is. It doesn't sync and has no history.

---

Published with [Niv](https://niv.md/) in the Space .
