The use of linux nano (more convenient than vi)

If you want to save your changes, press Ctrl+O. To exit, press Ctrl+X. If you do not save your changes before exiting, it will prompt you if you want to save. If not, press N, otherwise, press Y. Then it will ask you to confirm the file name to save, press Enter after confirmation or modification.

If you accidentally press save without making changes, you can cancel by pressing Ctrl+C when asked to confirm the filename.

To cut an entire line, use Ctrl+K (hold Ctrl and press the K key). The line where the cursor was located disappears. To paste it, just move the cursor to where you want to paste and press Ctrl+U. To move multiple lines, just press Ctrl+K several times to cut all the content that needs to be moved, and then press Ctrl+U once to paste all the just-cut content.

If you want to use more precise cut control, you need to mark the text. Move the cursor to the beginning of the text to be cut, and press Ctrl+6 (or Alt+A). Then move the cursor to the end of the text to be cut: the marked text will be highlighted. To undo the text markup, just press Ctrl+6 again. Use Ctrl+K to cut marked text and Ctrl+U to paste.

When you want to search for a specific word, just think of "WhereIs" instead of "Search" and things are easy. Just press Ctrl+W, type the string you want to search for, and press Enter. To search for the same string again, press Alt+W directly.

Note:  In the nano help documentation, the Ctrl-key is represented as a caret (^), so Ctrl+W is written as ^W, etc. The Alt-key is represented as an M (from "Meta"), so Alt+W is written as MW.

-------------------------

Vi has always been said to be the most powerful editor, but gentoo and debian choose nano as the default editor, and
freebsd choose ee as the default editor. I believe that in the eyes of professionals, freebsd and redaht are compared.
RedHat basically has nothing to show off, why don't they choose vi, because the operation of vi is more complicated
, and the so-called simple editor nano is simple and very easy to use. It is not simple at all to say that it is a simple editor
, but nano is modest. nothing more

Here we declare that ^ means the ctrl key on the keyboard. As long as the last friend who has done programming should know it, ^G means pressing ctrl and g at the same time
(F1) means pressing (F1) is the same, M- means using alt+ back key

^G ==F1) Invoke the help
menu

^X ==(F2) Close currently loaded file/Exit from nano
退出

^O ==(F3) Write the current file to disk == ^O WriteOut to
save and press
Enter to save

^J ==(F4) Justify the current paragraph
to adjust the current paragraph (don't use this thing in the configuration file, there will be a problem with the format)

^R ==(F5) Insert another file into the current one,
insert another file into the current one, and support tab when searching for files

^W ==(F6) Search for text within the editor

查找
^Y ==(F7) Move to the previous screen
上一屏幕
^V ==(F8) Move to the next screen
下一屏幕
^K ==(F9) Cut the current line and store it in the cutbuffer
裁减当前一排并保存在缓冲区


^U ==(F10) Uncut from the cutbuffer into the current line
将缓冲区的东西粘贴到此

^C ==(F11) Show the position of the cursor
显示光标位置

^T ==(F12) Invoke the spell checker, if available

调用拼写检查程序

^P Move up one line

向上移动一行
^N Move down one line

向下移动一

^F Move forward one character
向前移动光标一格

^B Move back one character
向后移动光标一格

^A Move to the beginning of the current line
移动到当前行的开头

^E Move to the end of the current line
移动到当前行的末尾

^L Refresh (redraw) the current screen
刷新当前屏幕

^^ (M-A) Mark text at the current cursor location
标记文本

^D Delete the character under the cursor

删除光标后一个字母
^H Delete the character to the left of the cursor
向左边删一个字母
^I Insert a tab character
插入一个tab值
^\ (F14) (M-R) Replace text within the editor

查找并且替换
^M Insert a carriage return at the cursor position
插入一个回车
^_ (F13) (M-G) Go to a specific line number

跳转到某行
^Space Move forward one word

前进一个单词
M-Space Move backward one word
后退一个单词
M-] Find other bracket
搜索下一个括号

M-< Open previously loaded file
打开先前加载的文件

M-> Open next loaded file

打开下一个加载的文件

M-C Constant cursor position enable/disable


M-I Auto indent enable/disable
是否首行缩进

M-Z Suspend enable/disable
是否悬挂

M-X Help mode enable/disable
帮助模式

M-M Mouse support enable/disable

鼠标支持

M-Y Color syntax highlighting enable/disable
语法加亮


这个就是退出了哦

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326782316&siteId=291194637