2015-12-30 19:31:49 +00:00
|
|
|
# nano
|
|
|
|
|
2023-01-08 08:07:06 +00:00
|
|
|
> Command-line text editor. An enhanced `Pico` clone.
|
2019-06-04 10:00:05 +01:00
|
|
|
> More information: <https://nano-editor.org>.
|
2015-12-30 19:31:49 +00:00
|
|
|
|
2023-01-08 08:07:06 +00:00
|
|
|
- Start the editor:
|
2021-07-28 15:10:07 +01:00
|
|
|
|
|
|
|
`nano`
|
|
|
|
|
2023-01-08 08:07:06 +00:00
|
|
|
- Start the editor without using configuration files:
|
2015-12-30 19:31:49 +00:00
|
|
|
|
2023-01-08 08:07:06 +00:00
|
|
|
`nano --ignorercfiles`
|
2020-01-29 15:16:44 +00:00
|
|
|
|
2023-01-08 08:07:06 +00:00
|
|
|
- Open specific files, moving to the next file when closing the previous one:
|
|
|
|
|
|
|
|
`nano {{path/to/file1 path/to/file2 ...}}`
|
|
|
|
|
|
|
|
- Open a file and position the cursor at a specific line and column:
|
2020-01-29 15:16:44 +00:00
|
|
|
|
|
|
|
`nano +{{line}},{{column}} {{path/to/file}}`
|
2015-12-30 19:31:49 +00:00
|
|
|
|
2023-01-08 08:07:06 +00:00
|
|
|
- Open a file and enable soft wrapping:
|
2015-12-30 19:31:49 +00:00
|
|
|
|
2021-07-28 15:10:07 +01:00
|
|
|
`nano --softwrap {{path/to/file}}`
|
2015-12-30 19:31:49 +00:00
|
|
|
|
2023-01-08 08:07:06 +00:00
|
|
|
- Open a file and indent new lines to the previous line's indentation:
|
2015-12-30 19:31:49 +00:00
|
|
|
|
2021-07-28 15:10:07 +01:00
|
|
|
`nano --autoindent {{path/to/file}}`
|
2020-10-05 14:56:27 +01:00
|
|
|
|
2023-01-08 08:07:06 +00:00
|
|
|
- Open a file and create a backup file (`path/to/file~`) on save:
|
2020-10-05 14:56:27 +01:00
|
|
|
|
2021-07-28 15:10:07 +01:00
|
|
|
`nano --backup {{path/to/file}}`
|