3

When justifying paragraphs, nano by default justifies into the number of columns in the screen. How can I force it to justify to a different number of columns (e.g. 80 characters)?

Thomas Dickey
  • 76,765
brandizzi
  • 2,864
  • 3
  • 22
  • 29

1 Answers1

4

To set the number of characters in a justified line, just use the set fill configuration in ~/.nanorc:

set fill 80

If you need a different size for only one file, you can use the -r flag:

nano -r 60 myfile.txt

In this case, however, the lines will be justifined while you are typing (which my not be always convenient).

Both options accept zero or negative values. In this case, the size of the lines will be the number of columns in the terminal plus the non-positive number. I.e. if your terminal has 80 columns and .nanorc contains set fill -8 then the lines will be justified to 72 columns.

brandizzi
  • 2,864
  • 3
  • 22
  • 29