歡迎您光臨本站 註冊首頁

給新手推薦文本編輯器:nano

←手機掃碼閱讀     火星人 @ 2014-03-24 , reply:0

這個文本編輯器的好處是:很小,所以任何版本都有,
功能不大,所以使用簡便不用怎麼學。
啟動后全屏(或者佔用整個終端窗口),窗口下面有提示,可以是中文
開始使用只需要知道兩個快捷鍵:ctrl+O是保存,ctrl+X是關閉,沒有保存的話,退出是會提示你。

其他的跟windows下習慣差不錯,比如可以使用退格鍵刪除前面一個字元什麼的,這在vi上是需要設置的。
不用切換控制模式和輸入模式。

下面轉自ubuntu中文論壇,不是原創:
http://forum.ubuntu.org.cn/viewtopic.php?f=68&t=48708

Nano是一個簡單的沒有花梢及華麗效果的文本編輯器。Nano在做簡單文本文件編輯時相當不錯。但不要希望用它來做複雜的編輯工作。其它的編輯器諸如"emacs","vim","gedit"都提供了文本著色以及自動文本格式化。而Nano只做最基本的編輯操作,而不提供其它功能。
對於無需編程,只是偶爾修改配置文件的初學者而言,nano是很好的選擇。而且它一樣通過快捷鍵實現高效率的文本編輯,上手十分簡單。

然而網上還沒有關於nano詳細操作的中文幫助文檔,給不少E文不好的初學者增加學習的難度。
這篇中文文檔翻譯自nano的官方英文文檔的絕大部分。
http://www.nano-editor.org/

由於本人翻譯水平有限,所以採用了雙語文檔(^_^),並且在特定的位置標明的命令的常用性,方便初學者學習。部分極不常用部分沒有翻譯。不妥之處,大家指出。

=====================這是華麗的分割線=======================

1 Introduction 介紹

GNU nano is a small and friendly text editor. Besides basic textediting, nano offers many extra features like an interactive search andreplace, go to line and column number, auto-indentation, featuretoggles, internationalization support, and filename tab completion.
GNU nano是一個小巧友好的文本編輯器. 與基本的文本編輯相比, nano提供許多額外的特性,例如:互動式的查找和替換, 定位到指定的行列, 自動縮進, 特性切換, 國際化支持, 以及文件名標記完成.

1.1 Overview 概述

The original goal for nano was a complete bug-for-bug compatibleemulation of Pico, but nano's current goal is to be as compatible aspossible while offering a superset of Pico's functionality. See SeePico Compatibility, for more info.
nano原來的目標是很好的兼容模擬Pico,但現在nano的目標是儘可能的兼容並且提供超過Pico的功能.詳見"Pico兼容性"一節.

The usual way to invoke nano is:
通常調用nano的方法是:

代碼:
nano [OPTION]... [FILE]


Butit is also possible to edit several files in a row. Additionally, thecursor can be put on a desired line number by adding this number with aplus sign before any filename, and even in a desired column by addingit with a comma. So the complete synopsis is:
但是也可以同時編輯多個文件.另外,通過在文件名前增加一個行號可以將游標定位到期望的那一行,列號同理.一覽如下:

代碼:
nano [OPTION]... [[+LINE] FILE]...

nano [OPTION]... [[+,COLUMN] FILE]...

nano [OPTION]... [[+LINE,COLUMN] FILE]...


1.2 Command Line Options 命令行選項

nano takes the following options from the command line:
nano命令行有以下一些選項:

代碼:
+LINE,COLUMN

Start at line number LINE and column number COLUMN (at least one ofwhich must be specified) instead of the default of line 1, column 1.
從LINE行COLUMN列開始(二者至少指明其一),默認是從1行1列.
[注:不常用]

代碼:
-?

Same as -h, --help.
同-h,--help.
[注:一般Linux命令的參數如果用完整單詞就用兩個破折號"--",單個字母就一個破折號"-"]

代碼:
-A, --smarthome

Make the Home key smarter. When Home is pressed anywhere but at thevery beginning of non-whitespace characters on a line, the cursor willjump to that beginning (either forwards or backwards). If the cursor isalready at that position, it will jump to the true beginning of theline.
啟用智能HOME鍵.無論何處按下HOME鍵,游標跳到該行第一個非空格字元.如果已在該處,則跳到本行第一個字元.
[注:不常用]

代碼:
-B, --backup

When saving a file, back up the previous version of it to the current filename suffixed with a ~.
自動備份保存修改前的文本,同一文件名前加個~.
[注:視情況而定,一般重要的配置文件最好加上,當然也可以手動備份]

代碼:
-C , --backupdir=

Set the directory where nano puts unique backup files if file backups are enabled.
如果啟用備份,可以通過這個選項指定備份目錄.
[注:同上]

代碼:
-D, --boldtext

Use bold text instead of reverse video text.
使用粗體文本代替反顯文本.
[注:一般不常用]

代碼:
-E, --tabstospaces

Convert typed tabs to spaces.
替換製表符TAB為空格.
[注:視情況開啟]

代碼:
-F, --multibuffer

Enable multiple file buffers, if available.
如果可能,就啟用多文本緩衝.
[注:可以開啟]

代碼:
-H, --historylog

Log search and replace strings to ~/.nano_history, so they can beretrieved in later sessions, if nanorc support is available.
nano的日誌文件.
[注:不常用]

代碼:
-I, --ignorercfiles

Don't look at SYSCONFDIR/nanorc or ~/.nanorc, if nanorc support is available.
不在SYSCONFDIR/nanorc或~/.nanorc找日誌文件.
[注:不常用]

代碼:
-K, --rebindkeypad

Interpret the numeric keypad keys so that they all work properly. Youshould only need to use this option if they don't, as mouse supportwon't work properly with this option enabled.
滑鼠支持和小鍵盤衝突時開啟.
[注:不常用]

代碼:
-L, --nonewlines

Don't add newlines to the ends of files.
文件尾不要加入新行.
[注:可以開啟]

代碼:
-N, --noconvert

Don't convert files from DOS/Mac format.
不轉換來自DOS/Mac格式的文件.
[注:不常用]

代碼:
-O, --morespace

Use the blank line below the title bar as extra editing space.
取消標題欄以增加編輯空間一行.
[注:可以開啟]

代碼:
-Q , --quotestr=

Set the quoting string for justifying. The default value is
設置匹配引用字元串.默認為

^([ \t]*[|>:}#])+

if extended regular expression support is available, or "> "otherwise. Note that \t above stands for a literal Tab character.
如果開啟額外的規則表達式支持,或有">".注意"\t"代表一個TAB製表符.
[注:不常用]

代碼:
-R, --restricted

Restricted mode: don't read or write to any file not specified on thecommand line; read any nanorc files; allow suspending; allow a file tobe appended to, prepended to, or saved under a different name if italready has one; or use backup files or spell checking. Also accessibleby invoking nano with any name beginning with 'r' (e.g. "rnano").
啟用受限模式:命令行為指明就不讀寫任何文件,任何宏,允許終止,允許追加,預載,另存為覆蓋,使用備份文件,拼寫檢查.同時可以用"rnano"來進入這個模式.
[注:不常用]

代碼:
-S, --smooth

Enable smooth scrolling. Text will scroll line-by-line, instead of the usual chunk-by-chunk behavior.
開啟平滑捲動.文本逐行捲動,而非塊捲動.
[注:可以開啟,不加此參數時每次捲動半屏]

代碼:
-T <#cols>, --tabsize=<#cols>

Set the displayed tab length to #cols columns. The value of #cols must be greater than 0. The default value is 8.
設置顯示製表符TAB的大小#cols.默認為8.
[注:可以根據自己情況修改]

代碼:
-U, --quickblank

Do quick statusbar blanking. Statusbar messages will disappear after 1 keystroke instead of 25. Note that -c overrides this.
快速狀態欄消隱.狀態欄消息在擊鍵1次后消失,而非25次.注意-c使它無效.
[注:不常用]

代碼:
-V, --version

Show the current version number and exit.
顯示版本並退出.
[注:不常用]

代碼:
-W, --wordbounds

Detect word boundaries more accurately by treating punctuation characters as parts of words.
檢測單詞邊界時把標點視為單詞的一部分.
[注:不常用]

代碼:
-Y , --syntax=

Specify a specific syntax highlighting from the nanorc to use, if available. See See Nanorc Files, for more info.
指明使用特別的nano資源文件以語法高亮.
[注:不常用]

代碼:
-c, --const

Constantly display the cursor position and line number on the statusbar. Note that this overrides -U.
狀態欄恆顯示游標所在行列號.注意此命令使-U無效.
[注:不常用]

代碼:
-d, --rebinddelete

Interpret the Delete key differently so that both Backspace and Deletework properly. You should only need to use this option if Backspaceacts like Delete on your system.
使Backspace和Delete各自正常工作.當二者功能相同時開啟.
[注:不常用]

代碼:
-h, --help

Show a summary of command line options and exit.
顯示命令行參數總結並退出.
[注:見-?]

代碼:
-i, --autoindent

Automatically indent new lines to the same number of spaces and tabs as the previous line.
自動縮進.
[注:可以開啟]

代碼:
-k, --cut

Cut from the current cursor position to the end of the current line.
從當前游標位置剪貼到本行未.
[注:不常用]

代碼:
-l, --nofollow

When writing files, if the given file is a symbolic link, it is removed and a new file is created.
如果編輯符號鏈接文件,新建一個物理文件替代之.
[注:不常用]

代碼:
-m, --mouse

Enable mouse support, if available for your system. When enabled, mouseclicks can be used to place the cursor, set the mark (with a doubleclick), and execute shortcuts. The mouse will work in the X WindowSystem, and on the console when gpm is running.
開啟滑鼠支持.單擊游標定位,雙擊標記文本,以及執行快捷命令.
[注:可以開啟,不過過多的使用滑鼠是編輯效率低下的原因之一]

代碼:
-o , --operatingdir=

Set operating directory. Makes nano set up something similar to a chroot.
設置工作目錄.
[注:不常用]

代碼:
-p, --preserve

Preserve the ^Q (XON) and ^S (XOFF) sequences so data being sent to the editor can be can be stopped and started.
保留^Q和^S使數據送到編輯器時可以被停止或開始.
[注:不常用]

代碼:
-r <#cols>, --fill=<#cols>

Wrap lines at column #cols. If this value is 0 or less, wrapping willoccur at the width of the screen less #cols, allowing it to vary alongwith the width of the screen if the screen is resized. The defaultvalue is -8.
以#cols為界自動換行,默認-8意味屏寬-8.
[注:一般不修改該值]

代碼:
-s , --speller=

Invoke the given program as the spell checker. By default, nano usesthe command specified in the SPELL environment variable, or, if SPELLis not set, its own interactive spell checker that requires the spellprogram to be installed on your system.
設定拼寫檢查程序.
[注:不常用]

代碼:
-t, --tempfile

Don't ask whether or not to save the current contents of the file whenexiting, assume yes. This is most useful when using nano as thecomposer of a mailer program.
退出時不詢問就直接保存修改.
[注:初學者建議不用]

代碼:
-v, --view

Don't allow the contents of the file to be altered. Note that thisoption should NOT be used in place of correct file permissions toimplement a read-only file.
不得修改打開的文件.只讀文件無須用此命令.
[注:不常用]

代碼:
-w, --nowrap

Don't wrap long lines at any length. This option overrides any value for -r.
取消自動換行.
[注:修改配置文件時一定要開啟]

代碼:
-x, --nohelp

Expert Mode: don't show the Shortcut Lists at the bottom of the screen.This affects the location of the statusbar as well, as in Expert Modeit is located at the very bottom of the editor.
專家模式:屏底沒有快捷鍵列表,只有狀態條.

Note: When accessing the help system, Expert Mode is temporarily disabled to display the help system navigation keys.
注意:聯機幫助將不再顯示導航快捷鍵.
[注:不常用]

代碼:
-z, --suspend

Enable nano's suspend ability using the system's suspend keystroke (usually ^Z).
允許nano接受系統終止命令(^Z).
[注:不常用]

代碼:
-a, -b, -e, -f, -g, -j

Ignored, for compatibility with Pico.
忽略,和Pico兼容.
[注:不常用]

2 Editor Basics 編輯器基礎

2.1 Entering Text 輸入文本

All key sequences in nano are entered using the keyboard. nano is a"modeless" editor. All keys, with the exception of Control and Meta keysequences, will enter text into the file being edited.
所有的輸入靠鍵盤.nano是一個"無模式"的編輯器.除了Control和Alt的快捷鍵外,都是文本輸入.

2.2 Special Functions 特定功能

Special functions use the Control (Ctrl) key, displayed in the helpand shortcut lists as ^; the Meta key, displayed as M; or the Escape(Esc) key.
特定功能用到Control鍵,顯示為^.Meta鍵,顯示為M.還有Esc鍵.

* Control key sequences are entered by holding down the Ctrl keyand pressing the desired key, or by pressing the Esc key twice andpressing the desired key.
Control快捷鍵是先按住Ctrl再同時按特定的鍵,或者按兩下Esc再按特定的鍵.
* Pressing Esc twice and then typing a three-digit number from 000to 255 will enter the character with the corresponding value.
按Esc兩次在按三個數字(從000到255),可以輸入特定ASCII字元.
* Meta key sequences are entered by holding down the Meta key(normally the Alt key) and pressing the desired key, or by pressing theEsc key once and pressing the desired key. Certain operating systems"swallow" the Alt key so that it never reaches the application; if youroperating system does this, you should use the Esc key to generate Metakey sequences.
Meta鍵一般被映射為Alt鍵,也可以按一下Esc再按特定的鍵.

2.3 The Titlebar 標題欄

The titlebar is the line displayed at the top of the editor. Thereare three sections: left, center and right. The section on the leftdisplays the version of nano being used. The center section displaysthe current filename, or "New Buffer" if the file has not yet beennamed. The section on the right will display "Modified" if the file hasbeen modified since it was last saved or opened.
標題欄顯示在編輯器的頂上,有三個部分:左,中,右.左邊顯示nano的版本,中間顯示當前文件名,新文件則顯示"New Buffer".右邊顯示文件是否被修改.

Special modes: When nano is in "File browser" mode, the centersection will display the current directory instead of the filename. SeeSee The File Browser, for more info.
"文件瀏覽"模式下,中間顯示目錄.詳見"文件瀏覽"一節.

2.4 The Statusbar 狀態欄

The statusbar is the third line from the bottom of the screen, orthe bottom line in Expert Mode. See See Expert Mode, for more info. Itshows important and informational messages. Any error messages thatoccur from using the editor will appear on the statusbar. Any questionsthat are asked of the user will be asked on the statusbar, and any userinput (search strings, filenames, etc.) will be input on the statusbar.
狀態欄顯示在倒數第3行,專家模式下顯示在最後一行.它用於顯示重要的消息,如錯誤消息等.還有交互的詢問消息(如查找,文件名等).

2.5 Shortcut Lists 快捷鍵列表

The Shortcut Lists are the two lines at the bottom of the screenwhich show some of the more commonly used functions in the editor.
快捷鍵列表在最下兩行,它們都是編輯器最常用的功能.

2.6 Using the Mouse 使用滑鼠

When mouse support has been configured and enabled, a single mouseclick places the cursor at the indicated position. Clicking a secondtime in the same position toggles the mark. Clicking in the shortcutlist executes the selected shortcut.
當滑鼠支持開啟時,單擊滑鼠可以定位游標到指定位置.雙擊則選中標記.單擊快捷鍵列表執行快捷操作.

The mouse will work in the X Window System, and on the console when gpm is running.
滑鼠在X Window,控制台的gpm下運行.

3 Online Help 聯機幫助

The online help system in nano is available by pressing ^G. It isfairly self explanatory, documenting the various parts of the editorand available keystrokes. Navigation is via the ^Y (Page Up) and ^V(Page Down) keys. ^X exits the help system.
按^G開啟聯機幫助,它自適應當前功能.導航通過^Y(或Page Up)和^V(Page Down)鍵.^X退出聯機幫助.

4 Feature Toggles 特性切換

Toggles allow you to change certain aspects of the editor thatwould normally be done via command line options. They are invoked viaMeta key sequences. See See Special Functions, for more info. Thefollowing global toggles are available:
由命令行選項指定的特性也可以用切換來改變.他們通過Meta鍵實現,詳見"特定功能"一節.以下為全局切換:

Backup Files Toggle (Meta-B)
toggles the -B (--backup) command line option.
備份文件.
Constant Cursor Position Display Toggle (Meta-C)
toggles the -c (--const) command line option.
游標位置恆顯示.
Multiple File Buffers Toggle (Meta-F)
toggles the -F (--multibuffer) command line option.
多文件緩衝.
Smart Home Key Toggle (Meta-H)
toggles the -A (--smarthome) command line option.
智能Home鍵.
Auto Indent Toggle (Meta-I)
toggles the -i (--autoindent) command line option.
自動縮進.
Cut To End Toggle (Meta-K)
toggles the -k (--cut) command line option.
剪貼到行尾.
Long Line Wrapping Toggle (Meta-L)
toggles the -w (--nowrap) command line option.
關閉自動換行.
Mouse Support Toggle (Meta-M)
toggles the -m (--mouse) command line option.
滑鼠支持.
No Conversion From DOS/Mac Format Toggle (Meta-N)
toggles the -N (--noconvert) command line option.
不轉換DOS/Mac格式文件.
More Space For Editing Toggle (Meta-O)
toggles the -O (--morespace) command line option.
取消標題欄以增加編輯空間一行.
Whitespace Display Toggle (Meta-P)
toggles whitespace display mode if you have a "whitespace" option in your nanorc. See See Nanorc Files, for more info.
切換空格模式.詳見"Nanorc文件"一節.
Tabs to Spaces Toggle (Meta-Q)
toggles the -E (--tabstospaces) command line option.
替換製表符TAB為空格.
Smooth Scrolling Toggle (Meta-S)
toggles the -S (--smooth) command line option.
平滑捲動.
Expert/No Help Toggle (Meta-X)
toggles the -x (--nohelp) command line option.
專家模式.
Color Syntax Highlighting Toggle (Meta-Y)
toggles color syntax highlighting if you have color syntaxes in your nanorc. See See Nanorc Files, for more info.
彩色語法高亮.詳見"Nanorc文件"一節.
Suspend Toggle (Meta-Z)
toggles the -z (--suspend) command line option.
允許nano接受系統終止命令(^Z).

5 Nanorc Files "Nanorc"文件
[注:nano的配置文件,以擴展nano,初學不常用,譯略,^_^]

The nanorc files contain the default settings for nano. They shouldnot be in DOS or Mac format. During startup, nano will first read itssystem-wide settings from SYSCONFDIR/nanorc, and then user-specificsettings from ~/.nanorc.
A nanorc file accepts a series of "set" and "unset" commands,which can be used to configure nano on startup without using thecommand line options. Additionally, the "syntax", "color", and "icolor"keywords are used to define syntax highlighting rules for differenttext patterns. nano will read one command per line.
Options in nanorc files take precedence over nano's defaults, andcommand line options override nanorc settings. Options are also unsetby default, except for those that take arguments.
Quotes inside string parameters don't have to be escaped withbackslashes. The last double quote in the string will be treated as itsend. For example, for the "brackets" option,
""')>]}"
will match ", ', ), >, ], and }.
The supported commands and arguments are:
set/unset autoindent
Use auto-indentation.
set/unset backup
Create backup files in "filename~".
set backupdir "directory"
Set the directory where nano puts unique backup files if file backups are enabled.
set/unset backwards
Do backwards searches by default.
set/unset boldtext
Use bold text instead of reverse video text.
set brackets "string"
Set the characters treated as closing brackets when justifyingparagraphs. They cannot contain blank characters. Only closingpunctuation, optionally followed by closing brackets, can endsentences. The default value is
""')>]}"
set/unset casesensitive
Do case sensitive searches by default.
set/unset const
Constantly display the cursor position in the status bar.
set/unset cut
Use cut to end of line by default, instead of cutting the whole line.
set fill "n"
Wrap lines at column number "n". If "n" is 0 or less, the maximumline length will be the screen width less "n" columns. The defaultvalue is -8.
set/unset historylog
Enable ~/.nano_history for saving and reading search/replace strings.
set matchbrackets "string"
Set the opening and closing brackets that can be found by bracketsearches. They cannot contain blank characters. The former set mustcome before the latter set, and both must be in the same order. Thedefault value is
"(<[{)>]}"
set/unset morespace
Use the blank line below the titlebar as extra editing space.
set/unset mouse
Enable mouse support, so that mouse clicks can be used to placethe cursor, set the mark (with a double click), or execute shortcuts.
set/unset multibuffer
Allow inserting files into their own buffers.
set/unset noconvert
Don't convert files from DOS/Mac format.
set/unset nofollow
Don't follow symlinks when writing files.
set/unset nohelp
Don't display the help lists at the bottom of the screen.
set/unset nonewlines
Don't add newlines to the ends of files.
set/unset nowrap
Don't wrap text at all.
set operatingdir "directory"
nano will only read and write files inside "directory" and itssubdirectories. Also, the current directory is changed to here, sofiles are inserted from this directory. By default, the operatingdirectory feature is turned off.
set/unset preserve
Preserve the XON and XOFF keys (^Q and ^S).
set punct "string"
Set the characters treated as closing punctuation when justifyingparagraphs. They cannot contain blank characters. Only closingpunctuation, optionally followed by closing brackets, can endsentences. The default value is "!.?".
set/unset quickblank
Do quick statusbar blanking. Statusbar messages will disappear after 1 keystroke instead of 25.
set quotestr "string"
The email-quote string, used to justify email-quoted paragraphs.This is an extended regular expression if your system supports them,otherwise a literal string. The default value is
"^([ \\t]*[#:>\\|}])+"
if you have extended regular expression support, or "> " otherwise. Note that '\\t' stands for a literal Tab character.
set/unset rebinddelete
Interpret the Delete key differently so that both Backspace andDelete work properly. You should only need to use this option ifBackspace acts like Delete on your system.
set/unset rebindkeypad
Interpret the numeric keypad keys so that they all work properly.You should only need to use this option if they don't, as mouse supportwon't work properly with this option enabled.
set/unset regexp
Do extended regular expression searches by default.
set/unset smarthome
Make the Home key smarter. When Home is pressed anywhere but atthe very beginning of non-whitespace characters on a line, the cursorwill jump to that beginning (either forwards or backwards). If thecursor is already at that position, it will jump to the true beginningof the line.
set/unset smooth
Use smooth scrolling by default.
set speller "spellprog"
Use spelling checker "spellprog" instead of the built-in one, which calls "spell".
set/unset suspend
Allow nano to be suspended.
set tabsize "n"
Use a tab size of "n" columns. The value of "n" must be greater than 0. The default value is 8.
set/unset tabstospaces
Convert typed tabs to spaces.
set/unset tempfile
Save automatically on exit, don't prompt.
set/unset view
Disallow file modification.
set whitespace "string"
Set the two characters used to display the first characters of tabs and spaces. They must be single-column characters.
set/unset wordbounds
Detect word boundaries more accurately by treating punctuation characters as part of a word.
syntax "str" ["fileregex" ... ]
Defines a syntax named "str" which can be activated via the-Y/??syntax command line option, or will be automatically activated ifthe current filename matches the extended regular expression"fileregex". All following "color" and "icolor" statements will applyto "syntax" until a new syntax is defined.
The "none" syntax is reserved; specifying it on the command lineis the same as not having a syntax at all. The "default" syntax isspecial: it takes no "fileregex", and applies to files that don't matchany other syntax's "fileregex".
color fgcolor,bgcolor "regex" ...
For the currently defined syntax, display all expressions matchingthe extended regular expression "regex" with foreground color "fgcolor"and background color "bgcolor", at least one of which must bespecified. Legal colors for foreground and background color are: white,black, red, blue, green, yellow, magenta, and cyan. You may use theprefix "bright" to force a stronger color highlight for the foreground.If your terminal supports transparency, not specifying a "bgcolor"tells "nano" to attempt to use a transparent background.
icolor fgcolor,bgcolor "regex" ...
Same as above, except that the expression matching is case insensitive.
color fgcolor,bgcolor start="sr" end="er"
Display expressions which start with the extended regularexpression "sr" and end with the extended regular expression "er" withforeground color "fgcolor" and background color "bgcolor", at least oneof which must be specified. This allows syntax highlighting to spanmultiple lines. Note that all subsequent instances of "sr" after aninitial "sr" is found will be highlighted until the first instance of"er".
icolor fgcolor,bgcolor start="sr" end="er"
Same as above, except that the expression matching is case insensitive.
include "syntaxfile"
Read in self-contained color syntaxes from "syntaxfile". Note that"syntaxfile" can only contain "syntax", "color", and "icolor" commands.

6 The File Browser 文件瀏覽

When reading or writing files, pressing ^T will invoke the filebrowser. Here, one can navigate directories in a graphical manner inorder to find the desired file.
讀寫文件時,按下^T激活文件瀏覽器.以圖形話的方式導航尋找需要的文件.

Basic movement in the file browser is accomplished with the arrowkeys, page up, and page down. More advanced movement is accomplished bysearching via ^W (or 'w') and changing directories via ^_ (or 'g'). Thebehavior of the Enter (or 's') key varies by what is currentlyselected. If the currently selected object is a directory, the filebrowser will enter and display the contents of the directory. If theobject is a file, this filename and path are copied to the statusbar,and the file browser exits.
文件瀏覽中的基本移動可以通過方向鍵,PageUp,PageDown完成.查找用^W(或^w),改變目錄用^_(或'g').回車(或's')改變當前選中.如果選中的是目錄,文件瀏覽器就進入該目錄.如果選中的是文件,就打開.

7 Pico Compatibility "Pico"兼容性
[注:nano是向Pico編輯器兼容的,內容對初學者意義不大,譯略,^_^]

nano attempts to emulate Pico as closely as possible, but there are certain differences between the editors:

Search and Replace History
As of version 1.1.99pre1 of nano, text entered as search orreplace strings will be stored and can be accessed with the up/downarrow keys. Previously, nano offered a more consistent, butincompatible with Pico, method for entering search and replace strings.In the old method, previous entries would be displayed by default aseditable text in front of the cursor, as opposed to being bracketed anduneditable as it is in Pico. The old behavior could be made compatiblewith Pico via the -p option, but recent versions of Pico use the -poption to preserve the XON and XOFF sequences within the editor. Since,with the new method, search and replace strings can still be edited bysimply hitting the up arrow key once, the old method was removedcompletely.
Writing, Appending, or Prepending Selected Text to Files
Text selected using the marking key (^^) can be written out,appended, or prepended to a new or existing file using the WriteOut key(^O).
Toggles
Many options which alter the functionality of the program can be"toggled" on or off using Meta key sequences, meaning the program doesnot have to be restarted to turn a particular feature of the editor onor off. Please see the internal help function (^G) for a list of whatfunctions can be toggled for a particular version of nano. See SeeFeature Toggles, for more info.
Cursor Position Display
The output of the "Display Cursor Position" in nano displays thegiven column position, as well as the row and total character positionof the cursor.
Interactive Replace and Spell Checker
It is worth noting that nano's replace function is interactive,i.e. it does not stop after one search string is found andautomatically replace it. The nano implementation will pause at eachsearch string found and query whether to replace this instance or not.The internal spell checker operates similarly. Note that there is noway to force these functions to behave in the Pico fashion. As ofversion 1.1.99pre1, misspelled words are sorted and trimmed foruniqueness in the internal spell checker such that the words 'apple'and 'Apple' will be prompted for correction separately.

8 Building and Configure Options 構建和配置
[注:從源文件編譯安裝nano,方法和其他程序安裝相同,譯略,^_^]

Building nano from source is fairly straightforward if you are familiar with compiling programs with autoconf support:

* tar xvfz nano-x.y.z.tar.gz (where x.y.z is the version of nano)
* cd nano-x.y.z/
* ./configure
* make
* make install

The possible options to ./configure are:

--disable-browser
Disable the mini file browser when reading or writing files.
--disable-help
Disable the help function. Doing this makes the binary muchsmaller, but makes it difficult for new users to learn more than verybasic things about using the editor.
--disable-justify
Disable the justify and unjustify functions.
--disable-mouse
Disable all mouse functionality. This also disables the -m command line option, which enables the mouse functionality.
--disable-operatingdir
Disable setting the operating directory. This also disables the -o command line option, which sets the operating directory.
--disable-speller
Disable use of the spell checker. This also disables the -scommand line option, which allows specifying an alternate spellchecker.
--disable-tabcomp
Disable the tab completion code when reading or writing files.
--disable-wrapping
Disable all long line wrapping. This also eliminates the -w command line option, which enables long line wrapping.
--enable-tiny
This option disables all the above. It also disables some of thelarger internals of the editor, like the marking code and the cut toend of line code. It also disables the function toggles.
--enable-debug
Enable support for runtime debug output. This can get prettymessy, so chances are you only want this feature to work on the nanosource.
--enable-extra
Enable extra features. At the moment, this is just easter egg-type stuff.
--enable-color
Enable support for syntax coloring of files using the nanorc file. This enables nanorc support as well.
--enable-multibuffer
Enable support for opening multiple files at a time and switching between them on the fly.
--enable-nanorc
Enable support for reading the nanorc file at startup. You canstore custom settings in the nanorc file rather than having to passcommand line options to get desired behavior. See See Nanorc Files, formore info.
--enable-all
Shortcut for enabling the above four features (extra, color, multibuffer, and nanorc).
--disable-nls
Disables Native Language support. This will disable use of the available GNU nano translations.
--disable-wrapping-as-root
Disable long line wrapping by default when nano is run as root.
--enable-utf8
Enable support for reading and writing Unicode files. This willrequire either the wide version of ncurses, or a UTF-8-enabled versionof Slang.
--disable-utf8
Disable support for reading and writing Unicode files.
--with-slang
Compiling nano with Slang is supported, and will make the binarynotably smaller than if compiled with ncurses or other curses libraries.

[火星人 ] 給新手推薦文本編輯器:nano已經有1480次圍觀

http://coctec.com/docs/linux/show-post-147363.html