1 Markdown Folders
liquibyte edited this page 2026-11-19 16:23:32 -06:00

Markdown Folders

Besides its own .yarn projects, Skein can work on ordinary Markdown files where they are: a folder of notes kept in git or a synced folder, or a single file. This page explains how to open folders and files, how they show in Skein, when Skein writes to them, how to close them, and how to turn them into a project.

1. Two ways of working

Markdown folders: your .md files on disk, a list of what is open, and an index rebuilt from the files at each start, shown in the tree. A .yarn project: one file that holds everything. Save Folder As Project copies the index into a new .yarn project

Markdown folders keep your notes as files; Skein's index of them is only a working copy. Save Folder As Project copies that index into a new project, which from then on is separate from the files.

While you work on Markdown folders, the title bar reads Skein - Markdown Folder, or, once something is selected, Skein - followed by the full path of the selected folder or the file name of the selected note (Skein - ideas.md). Skein remembers that you were working on Markdown folders and, when Settings > General > "Reopen last project on startup" is on, opens the same folders and files at the next start. A project file you name when you start Skein is opened instead.

2. Opening folders and files

Command What it does
File > Open... > Open Folder... Adds a folder to the folders and files that are open. The dialog is titled "Open Markdown Folder".
File > Open... > Open Markdown... Adds one .md file. The dialog is titled "Open Markdown File".
File > New... > New Folder Opens the folder you choose ("New Markdown Folder") as the only one open: the list of open folders and files is emptied first. Cancel in the dialog, or in the question about unsaved changes, leaves the list as it was.
File > New... > New Markdown The same for one file ("New Markdown File").

The dialogs show folders and Markdown files. Each of them takes either a file or a folder: to choose a folder, go into it (double-click it) and press OK with no file selected. A file must end in .md. A folder or file that is already open is not added twice.

After you choose, when you come from a project with unsaved changes, Skein asks "This project has unsaved changes. Save before switching to markdown-folder mode?" (Save, Discard or Cancel); when notes you changed are not saved yet, it asks "Some Markdown files have unsaved changes. Save them before the folders are read again?". Cancel stops, and nothing is added to the list. Then Skein reads the files again, selects the folder or file you added, and, for a folder, opens its row. A folder that cannot be read is named in a message.

3. How they show in Skein

  • Each open folder is a row at the top of the Project Tree, named after the folder. Under it are its subfolders, each with its own contents, and its Markdown files.
  • An open single file is a row of its own at the top.
  • Files show without the .md: ideas.md is "ideas".
  • Only files whose names end in .md are read. Files and folders whose names start with a dot are left out. Empty folders show too.
  • A file's text is its document, exactly as it is on disk. Selecting a folder shows a list of its subfolders and files, as links.
  • A picture with a relative path, such as ![map](images/map.png), is found in the note's own folder.
  • Folders and files that no longer exist are left out without a message.

Links between the files work as in other Markdown tools: [Dune](dune.md) or [[dune]] in a note goes to the file of that name in the same folder, and the Graph draws it.

4. When Skein writes your files

Skein writes a note's file only when you save: with File > Save (Ctrl+S), or with Save in the question about unsaved changes. Until then your edits are kept in Skein, also when you move to another note, and the title bar starts with *. Skein asks before anything would drop them: when you quit, open a project, open or close folders, close the file, or use Save Folder As Project. Discard there throws the edits away and leaves the files as they are. Autosave never writes Markdown files. When a file cannot be written, Skein says why, and the note keeps its edit.

The file is written safely: Skein writes the new text to name.md.tmp beside it and then puts that in the place of the old file in one step, so the file is never left half written. The text is written in Skein's own Markdown (see The Document Panel), so a note you edit can come back with some syntax written in Skein's way.

5. Closing

Command What it does
File > Close... > Close File Takes the selected file out of Skein. When it has edits that are not saved, Skein asks first: Save writes them to the file, Discard drops them, Cancel keeps the file open. A single file you opened is also taken off the list of open files; a file inside an open folder comes back the next time the folders are read. Only for a selected Markdown file.
File > Close... > Close Folder, or Ctrl+W Asks about unsaved edits, then empties the list of open folders and files and starts a new, empty project. The menu item is there only while at least one folder is open; Ctrl+W does the same whenever Markdown folders or files are open.

File > Open Project... also leaves the Markdown folders, but they stay on the list of open folders and files: the next Open Folder... or Open Markdown... brings them back together with the one you add.

6. Save Folder As Project

File > Save Folder As Project... (Ctrl+Shift+P) turns what is open into a .yarn project:

  1. With Settings > Files > "Confirm before "Save Folder As Project..."" on (it is at first), Skein asks "This leaves markdown-folder mode and creates a new .yarn project file. Continue?".
  2. When notes have edits that are not saved, Skein asks whether to save them to their files first (Save, Discard or Cancel), so that the files and the new project start out the same.
  3. Skein asks "Save markdown folder as project (path):". Type the full path of the new file, ending in .yarn. When it exists, Skein asks before it overwrites it.
  4. Skein copies its index of the folders into the new file and opens it as a project. Each folder is an object, with its files as child objects, all of the type "Markdown Folder".

The Markdown files are not changed by this, and the new project is separate from them: what you change in the project stays in the project, and is never written back to the files.

7. Known limitations

  • New Folder and New Markdown cannot make a new folder or file; they open an existing one.
  • Types and objects you make in the tree, and names you change, are not written to disk: renaming or deleting a note in the tree does not rename or delete its file, and what you made is gone the next time the folders are read.
  • Files ending in .MD or .markdown are not read.
  • Save Folder As Project asks for a typed path rather than showing a file dialog, and does not add .yarn itself.
  • Links between notes by name work only within one folder.