Northern Commander

File types

Every kind of file the application knows, a page for each family: how it is recognized, what the viewer shows, and what the editor does with it.

Three keys, three questions

KeyAction
EnterOpen
F3View
F4Edit
⇧F3View as text or hex
⇧F4Edit as text
  • Enter does what the file is for: goes into a folder, shows a picture, starts an app, hands a document to the app macOS would use.
  • F3 shows it here, in a view made for its kind — or as text when there is none.
  • F4 changes it here when it is text, and in the app macOS would use when it is not.
  • ⇧F3 and ⇧F4 skip the question: the text viewer, or the editor, whatever the file is.

These act on the row under the cursor only, never on marked rows.

What each kind does

Kind Enter F3 F4
Folders Goes in Measures it and shows its size —
Apps Asks: look inside or launch — —
Disk images — .dmg Goes inside it As bytes —
Other disk images The app macOS would use As bytes —
Installers and Java archives Asks what to do As bytes —
Archives Goes inside it As bytes —
Pictures Shows it here Shows it here The app macOS would use
Films and recordings Plays it here Plays it here The app macOS would use
Documents — PDF and the like The app macOS would use Here, if it is a PDF The app macOS would use
Text, code and data The app macOS would use Here Here
Scripts named .sh, .zsh, .command… The app macOS would use — a .command runs in Terminal Here, as text Here
Programs, and scripts with no extension Asks what to do A Mac program on a page of its own; a script as text; others as bytes Here, for a script
Kept searches Runs the search Opens its form Opens its form
Anything else The app macOS would use Here, as text or bytes The app macOS would use

All of it can be changed, for a kind of file or one name — see Opening files.

How a file’s kind is decided

  1. Your own rows in the file types come first.
  2. The name — its extension, or for some kinds, such as archives and text, the kind macOS files it under. Pictures, films and sounds are matched by extension alone. Nothing is read.
  3. What is in it, only when the name says nothing: a script’s #! line, a program’s header, an archive’s signature, or text that reads as text.
  4. Anything else — the last row, so every file has an answer.

A file whose name says one thing and whose contents another — a .png that is really text — is shown as what it is.

The families

Text and documents

  • Text and code — plain text and source code, colored by language.
  • Markdown — laid out as it reads, or typeset as a page.
  • Web pages — HTML shown as a page, kept off the network.
  • Notebooks — Jupyter notebooks, a cell at a time.
  • Structured data — JSON, YAML, XML and property lists as trees you can read and edit.
  • Tables — CSV and TSV as tables you can sort and edit, and JSON Lines files (one record per line) as tables you can sort.
  • Diffs and patches — a change, file by file and hunk by hunk or side by side, and two files compared, with changes taken from one into the other.
  • PDF — a page at a time.

Media and everything else