个人工具

“UbuntuHelp:NanoHowto”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
(New page: {{From|https://help.ubuntu.com/community/NanoHowto}} {{Languages|php5}} #REDIRECT Nano <pre><nowiki> Draft </nowiki></code> == Nano Howto == === Introduction === attachment:IconsP...)
 
(正在重定向到 UbuntuHelp:Nano
 
(未显示2个用户的10个中间版本)
第1行: 第1行:
{{From|https://help.ubuntu.com/community/NanoHowto}}
+
#REDIRECT [[UbuntuHelp:Nano]]
{{Languages|php5}}
+
#REDIRECT Nano
+
 
+
 
+
 
<pre><nowiki>
 
<pre><nowiki>
 
     Draft
 
     Draft
</nowiki></code>
+
</nowiki></pre>
 
+
 
== Nano Howto ==
 
== Nano Howto ==
 
 
=== Introduction ===
 
=== Introduction ===
 
+
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconGNOMETerminal.png
attachment:IconsPage/IconGNOMETerminal.png
+
 
+
 
This page will explain simple things with nano, and will give links to off site help.
 
This page will explain simple things with nano, and will give links to off site help.
 
 
=== What is nano ===
 
=== 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.
 
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 ===
 
=== How to start nano ===
 
 
To just start a regular nano session.
 
To just start a regular nano session.
 
 
<pre><nowiki>
 
<pre><nowiki>
 
     bash:~$ nano -w <nameoffile>
 
     bash:~$ nano -w <nameoffile>
</nowiki></code>
+
</nowiki></pre>
 
+
 
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.
 
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 ===
 
=== How to use nano ===
 
+
The basic controls for nano are shown on the bottom of the screen.  The <code><nowiki>^</nowiki></code> mark means to hold the control key and press the letter following it.  For example, ^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:
The basic controls for nano are shown on the bottom of the screen.  The <code><nowiki><sup></nowiki></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
 
* '''WriteOut''' (control-O) - save
 
* '''Cur Pos''' (control-C) - tells you what line and letter the cursor is on
 
* '''Cur Pos''' (control-C) - tells you what line and letter the cursor is on
 
* '''Read File''' (control-R) - inserts the contents of another file
 
* '''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.
+
* 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
 
* '''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!
 
The help screen explains most of the commands very well.  Press Control-G to read it!
 
 
=== Links ===
 
=== Links ===
 
 
* [http://www.nano-editor.org/ Nano site]
 
* [http://www.nano-editor.org/ Nano site]
 
* [http://www.nano-editor.org/dist/v1.2/nano.html Nano manual]
 
* [http://www.nano-editor.org/dist/v1.2/nano.html Nano manual]
 
 
`note`: How does Justify/Unjustify work?
 
`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`.
 
`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`.
 
+
{{From|https://help.ubuntu.com/community/NanoHowto}}
UserDocumentation
+
{{Languages|UbuntuHelp:NanoHowto}}
 
+
CategoryDocumentation CategoryCleanup
+
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2008年10月20日 (一) 00:08的最新版本

重定向至:

    Draft

Nano Howto

Introduction

IconsPage?action=AttachFile&do=get&target=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.

    bash:~$ nano -w <nameoffile>

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 ^ mark means to hold the control key and press the letter following it. For example, ^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

`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`.