个人工具

UbuntuHelp:NanoHowto

来自Ubuntu中文

Oneleaf讨论 | 贡献2007年5月13日 (日) 11:32的版本 (New page: {{From|https://help.ubuntu.com/community/NanoHowto}} {{Languages|php5}} #REDIRECT Nano <pre><nowiki> Draft </nowiki></code> == Nano Howto == === Introduction === attachment:IconsP...)

(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航, 搜索
  1. REDIRECT Nano


    Draft
</code>

== Nano Howto ==

=== Introduction ===

attachment:IconsPage/IconGNOMETerminal.png

This page will explain simple things with nano, and will give links to off site help.

=== What is nano ===

Nano is a text editor that is not flashy or fancy.  It is a clone of the pico editor which is shipped with the pine email client.  Nano is nice to just make quick edits in text files, but most do not prefer it to do heavy editing.  Other editor's such as "emacs", "vim", "gedit" all offer coloring of text and auto formating.  Nano gets the job done without any distractions.

=== How to start nano ===

To just start a regular nano session.

<pre>
    bash:~$ nano -w <nameoffile>
</code>

This will open <nameoffile> into a editing window.  You can create new files like this or edit existing files.  The "-w" is present to disable wordwrapping, which can cause problems in some types of files.

=== How to use nano ===

The basic controls for nano are shown on the bottom of the screen.  The <code><sup></code> mark means to hold the control key and press the letter following it.  For example, </sup>X (quit) means hold control and press X.  To see more nano commands, hit '''control-G'''.  On the help screen, M- before a letter means to hold down Meta or Alt and press it.  So M-M (enable mouse support) means hold alt and press M.  nano uses some odd conventions:
* '''WriteOut''' (control-O) - save
* '''Cur Pos''' (control-C) - tells you what line and letter the cursor is on
* '''Read File''' (control-R) - inserts the contents of another file
** pressing Alt-F after control-R behaves just like an Open command in other text editors.
* '''Where Is''' (control-W) - searches for some text in the file

The help screen explains most of the commands very well.  Press Control-G to read it!

=== Links ===

* [http://www.nano-editor.org/ Nano site]
* [http://www.nano-editor.org/dist/v1.2/nano.html Nano manual]

`note`: How does Justify/Unjustify work?

`note`: Near the top the page implies that text highlighting is not possible in nano. In fact, it is, but is turned off by default. You have to enable it in `~/.nanorc`.

UserDocumentation

CategoryDocumentation CategoryCleanup

[[category:UbuntuHelp]]