All articles

How to Edit Markdown, Text and CSV Files in Your Mac File Manager

· 4 min read

A README to fix, a setting in a .env file, meeting notes in Markdown, a CSV exported from a bank or a shop: small text files that each send you to another app. TextEdit doesn't preview Markdown, a code editor takes a while to open a whole project for one line, and Numbers turns a CSV into a spreadsheet you then export back.

The short answer: in Folia Files 1.4, select the file and press ⌘E (File › Open in Folia's Editor). It opens in a pane next to its folder, with colored syntax for code, a Preview for Markdown and a Table for CSV files. ⌘S saves.

Open a file in the editor

  1. Select a text file in a pane.
  2. Press ⌘E, or Control-click it and choose Open in Folia's Editor.
  3. The Editor pane opens to the right of the folder. Open another file and it takes the same pane (Folia asks first if the current one has unsaved changes).

The command is offered for text files only: code (Swift, Python, JavaScript, TypeScript, HTML and XML, CSS, shell scripts, YAML, TOML, JSON, SQL, C, Go, Rust, Java, PHP, Ruby and more), Markdown, CSV and TSV, logs and subtitles, and the configuration files that have no extension (.gitignore, .zshrc, Makefile, README…). A PDF, a picture or an RTF document isn't offered: their own apps do that better. Files up to 10 MB open.

To open some kinds of files there with a double-click, list their extensions in Settings › Files and Network › Editor, separated by commas (for example md, txt, json). Left empty, as it is at first, a double-click opens files in their usual app.

Edit, find, save

The editor shows line numbers, colors the syntax of the languages above, and its bottom line gives the cursor's line and column, and the number of words and characters you selected. In the pane's header, the gear menu has Search…, Find and Replace… and Wrap Lines; it also tells you the file's encoding and line endings, which Folia keeps as they were when it saves.

  • ⌘S saves, or the gear's Save. The header shows when there are unsaved changes.
  • Closing the pane, the tab or the window, or quitting Folia, asks before losing changes.
  • If another app changes the file while it's open, the editor reads it again. If you had unsaved changes too, it asks: Keep My Changes or Reload.
  • A file on a server (SFTP, SMB…) is edited through a local working copy and sent back when you save, as described in How to Edit a File on an SFTP Server From Your Mac.

Markdown: write, preview, export as PDF

For a .md file, the editor's header has two buttons, Text and Preview.

  1. Write in Text, with the Markdown marks colored.
  2. Click Preview to see it laid out: headings, lists, check lists, links, tables, code and the pictures of the folder it links to.
  3. To share it, choose Export as PDF… in the gear menu.

Without opening anything, you can also turn Markdown files into PDFs straight from the folder: select one or several, Control-click and choose Convert to PDF. Each PDF is written next to its Markdown file, on A4 pages, or US Letter where your Mac measures in inches, with text you can select and search.

CSV: open it as a table

For a CSV or TSV file, the header has Text and Table. For a .txt file that is really a table, Control-click it and choose Open as Table.

In Table mode you can:

  • edit a cell, add a row or a column, and delete the rows you selected;
  • Sort by a column and Filter the rows, to find a line in a long export;
  • tell Folia whether the First row: headers or not, and change the Column separator (comma, semicolon, tab or vertical bar) when a file was cut the wrong way.

Saving writes a CSV again, with its separator and encoding. A file with thousands of columns shows the first 100 in the table; nothing beyond is lost when you save.

How it compares

  • TextEdit edits plain text well, but shows Markdown as plain text and has no syntax colors.
  • Quick Look (Space) previews Markdown, code and CSV in Folia, but doesn't edit them.
  • Numbers reads a CSV as a spreadsheet; you then export it back to CSV, and it can change the separator or the format of numbers on the way.
  • A code editor (VS Code, Cursor, Xcode…) is the right tool for a whole project: Folia opens folders in them from the right-click menu, see How to Open a Folder in VS Code, Cursor or Xcode on a Mac.

Folia's editor is for the quick edits in between, without leaving the folder you're in.

Good to know

  • The editor is a pane like the others: drag its header to put it below the folder, or close it with its button.
  • It's in both versions of Folia Files, from foliafiles.com and from the App Store.
  • In the version from foliafiles.com, it also edits a text file inside a ZIP or TAR archive opened as a folder: each save goes back into the archive.

For the other tools that work on files in place, see File tools.