Northern Commander

Viewer and editor

How a file’s text is laid out as you read and edit it — tab stops, invisibles, line numbers — and what the editor does as you type.

Options › Settings, then Viewer and editor.

Tab width tabWidth

How wide a tab looks, wherever a file's text is shown. Indent size is set separately, under Spaces in an indent.

Default: 8 · 1 to 16

A tab moves what follows it on to the next stop, so this is how deep a file indented with tabs looks.

It only says how wide a tab looks. For how many spaces one indent is, see Spaces in an indent.

Show spaces and line endings showWhitespace

Whether spaces, tabs and line endings start out drawn in the viewer and the editor.

Default: off · on or off

On: every tab and every line's end is drawn.
Off.
You see It is
→ then blank to the next stop A tab
· at the end of a line A trailing space
° A space that is not the ordinary one — a no-break or thin space
↓ ↵ ← at the end The line’s ending: a line feed, a carriage return and line feed, a carriage return alone

The ordinary space between words is left alone, so text stays readable. A control character is drawn as a red · either way, since it would otherwise take no room at all. ⇧F9 turns it on and off as you read or edit.

A file that mixes line endings shows it line by line — usually the fastest way to find out why a script works on one machine and not another.

Reopen files where they were left reopenWhereLeft

Whether the viewer and the editor reopen a file at the line, page, table cell or tree node it was closed on. Off, every file opens at the start.

Default: on · on or off

Indent with spaces spacesForIndent

Whether a new file, or one with no indent yet, is indented with spaces rather than a tab. A file that already has an indent keeps its own.

Default: off · on or off

Off: a tab.
On: spaces, up to the next stop — ordinary spaces are never drawn.
  • This is for a new file and for a file with no indent yet. A file that already has one is indented the way it is: the editor header says “tab indent” or, say, “2-space indent”.
  • On, Tab puts in spaces up to the next multiple of the indent, so text still lines up wherever the cursor starts.
  • ⇧Tab takes one level off either way: a tab, or up to an indent’s worth of spaces.
  • With a selection across lines, Tab and ⇧Tab indent and unindent every line of it.
  • How many spaces a level is comes from Spaces in an indent, not from Tab width.

Spaces in an indent indentWidth

How many spaces one indent is, in a file that has no indent of its own yet. Used only when Indent with spaces is on.

Default: 4 · 1 to 16

The editor works out how a file is indented when it opens, and uses that: a file indented with two spaces gets two spaces from Tab, Enter after a bracket and the line keys, and the header says “2-space indent”. This is the width for a new file, and for a file with no indent yet, when Indent with spaces is on.

  • It is separate from Tab width, which only says how wide a tab looks.
  • A file that mixes tabs and spaces takes whichever most of its lines use; when the two are nearly even, this setting and Indent with spaces decide.
  • Settings carried over from 1.0 with Indent with spaces on start it at their Tab width, which is how far an indent went then. New settings start at 4.

Line numbers in the editor showLineNumbers

Whether the editor draws line numbers down its left.

Default: on · on or off

On.
Off.

This is the editor’s. The viewer has its own, F5, for the file in front of you.

Close brackets as they are typed closeBrackets

Whether the editor puts in the closing bracket or quote when the opening one is typed.

Default: on · on or off

Each closer appears as its opener is typed; typing it steps over it.
  • (, [ and { bring their closer when what follows is a space, the end of the line, a closing bracket, or , ; : — not when a word follows, since the bracket is opening onto it.
  • " and ' bring theirs, but not against a word — so an apostrophe in don’t is just an apostrophe — and not where the quote ends a string.
  • Nothing is closed inside a string or a comment, or in a file whose language is not known.
  • Typing the closer steps over the one put in. Backspace straight after takes the pair.
  • The pair is one step of undo with what you typed.

Mark other uses of a name markNameUses

Whether the editor marks the other uses of the name the cursor is on.

Default: on · on or off

The other uses of the name under the cursor, marked where you can see them.
  • Whole names only, capitals and small letters as written — name is not part of filename.
  • Not in strings or comments.
  • Only while nothing is selected, and only in a file whose language is known.

Web pages load everything webPagesLoadEverything

Whether a web page opened from disk may load from the internet and from files outside its own folder.

Default: off · on or off

Off, a web page opened from disk — and a Markdown file shown typeset — loads nothing from the internet and no file outside its own folder. The viewer says how much it held back, and F5 asks what to do:

Answer Does
Allow once Loads it all, for this page, this time
Always allow Loads it, and turns this setting on
Keep blocked Leaves it as it is

On, every page loads everything it asks for.

Differences side by side compareSideBySide

Whether differences are shown side by side, old on the left, not one under the other. Its key sets this too.

Default: off · on or off