tldr/pages/common/nano.md

29 lines
653 B
Markdown
Raw Normal View History

2015-12-30 19:31:49 +00:00
# nano
> Simple, easy to use command-line text editor. An enhanced, free Pico clone.
2019-06-04 10:00:05 +01:00
> More information: <https://nano-editor.org>.
2015-12-30 19:31:49 +00:00
2021-07-28 15:10:07 +01:00
- Open a new file in nano:
`nano`
- Open a specific file:
2015-12-30 19:31:49 +00:00
`nano {{path/to/file}}`
2021-07-28 15:10:07 +01:00
- Open a specific file, positioning the cursor at the specified line and column:
`nano +{{line}},{{column}} {{path/to/file}}`
2015-12-30 19:31:49 +00:00
2021-07-28 15:10:07 +01:00
- Open a specific 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
2021-07-28 15:10:07 +01:00
- Open a specific file and indent new lines to the previous lines' indentation:
2015-12-30 19:31:49 +00:00
2021-07-28 15:10:07 +01:00
`nano --autoindent {{path/to/file}}`
2021-07-28 15:10:07 +01:00
- Open nano and create a backup file (`file~`) when saving edits:
2021-07-28 15:10:07 +01:00
`nano --backup {{path/to/file}}`