2

I love the nano feature that enables you to open multiple files at once and the fact that switching between them is very easy:

nano file1 file2 etc.

However, when I try to open a new file while working on one with ^R, it just inserts the whole fine within the file I was working on after I enter it. What I want to know is how to open a separate tab with a different file. M-F just gives me an error that says "[No formatter is defined for this type of file]".

Kusalananda
  • 333,661

1 Answers1

2

The M-F key combination must be used after first pressing ^R.

Unless you first press ^R, the M-R command is tied to "Invoke a program to format/arrange/manipulate the buffer". After pressing ^R, you'll see M-F at the bottom of the screen with the description "New Buffer".

So, to open a file in a new buffer in the nano editor, you do

^R
M-F
some filename
Enter

You may add set multibuffer to your ~/.nanorc file. Doing so will change the default behaviour of ^R so that it always inserts the read file into a new buffer. Pressing M-F then would revert to the old behaviour to insert the file into the current buffer.

Kusalananda
  • 333,661