歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> 關於Linux >> debian默認編輯器nano的用法

debian默認編輯器nano的用法

日期:2017/3/1 16:05:26   编辑:關於Linux
debian默認編輯器nano的用法 這裡聲明一下^表示鍵盤上的ctrl鍵,上個只要是做過編程的朋友應該都清楚,^G表示同時按下ctrl和g (F1)表示按(F1)也是一樣的 ,M-表示使用alt+後面的鍵 ^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 保存 然後回車就保存了 ^J ==(F4) Justify the current paragraph 調整當前段落(配置文件的不要用這東西,格式一下就出問題了哦) ^R ==(F5) Insert another file into the current one 插入其他的文件到當前的文件,而且查找文件的時候支持tab ^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 語法加亮 這個就是退出了哦 好了nano 的編輯器就說這樣多了.另外補充一點,如果你實在用不慣nano編輯器,你還可以轉回VI的。 用如下命令即可: #update-alternatives --config editor 出現如下所示的界面: There are 3 alternatives which provide `editor'. Selection Alternative ----------------------------------------------- 1 /bin/ed + 2 /bin/nano * 3 /usr/bin/vim.tiny Press enter to keep the default[*], or type selection number: 然後選擇3使用/usr/bin/vim就可以了。
Copyright © Linux教程網 All Rights Reserved