X

Linux 編輯器 nano 快速鍵

Nano 是 Linux 現在內建常用的編輯器,通常都是看到後,就離開去安裝 Vim 來用~

看到 Nano 的 shortcut (快速鍵),原來 Nano 功能這麼強大~~ 來收藏 Nano 快速鍵~

Linux 編輯器 Nano 快速鍵

Nano 快速鍵,這邊有些常用的:

  • Ctrl+K 剪下整列或選取範圍
  • Alt+6 複製整列或選取範圍
  • Ctrl+6 開始選取
  • Ctrl+U 貼上剪貼簿內容
  • Alt+U Undo
  • Alt+E Redo
  • Alt+Del 刪除整行
  • Alt+3 Comment/Uncomment
  • Alt+/ || Alt+G 跳到指定行數
  • Ctrl+G Help
  • Alt+W || F6 尋找
  • Alt+Q 尋找下一個
  • Alt+W 尋找上一個
  • Alt+R 尋找並置換
  • Alt+X 關閉下方 Help 提示
  • Ctrl+S 存檔
  • Ctrl+O 另存新檔
  • Ctrl+X 退出

上述取自此篇:Linux 文字編譯器 nano 快捷鍵小抄

完整 GNU nano 的快速鍵列表可見:Cheatsheet for GNU nano

File handling

Ctrl+S Save current file
Ctrl+O Offer to write file ("Save as")
Ctrl+R Insert a file into current one
Ctrl+X Close buffer, exit from nano

Editing

Ctrl+K Cut current line into cutbuffer
Alt+6 Copy current line into cutbuffer
Ctrl+U Paste contents of cutbuffer
Alt+T Cut until end of buffer
Ctrl+] Complete current word
Alt+3 Comment/uncomment line/region
Alt+U Undo last action
Alt+E Redo last undone action

Search and replace

Ctrl+Q Start backward search
Ctrl+W Start forward search
Alt+Q Find next occurrence backward
Alt+W Find next occurrence forward
Alt+R Start a replacing session

Deletion

Ctrl+H Delete character before cursor
Ctrl+D Delete character under cursor
Alt+Bsp Delete word to the left
Ctrl+Del Delete word to the right
Alt+Del Delete current line

Operations

Ctrl+T Execute some command
Ctrl+J Justify paragraph or region
Alt+J Justify entire buffer
Alt+B Run a syntax check
Alt+F Run a formatter/fixer/arranger
Alt+: Start/stop recording of macro
Alt+; Replay macro

Moving around

Ctrl+B One character backward
Ctrl+F One character forward
Ctrl+ One word backward
Ctrl+ One word forward
Ctrl+A To start of line
Ctrl+E To end of line
Ctrl+P One line up
Ctrl+N One line down
Ctrl+ To previous block
Ctrl+ To next block
Ctrl+Y One page up
Ctrl+V One page down
Alt+\ To top of buffer
Alt+/ To end of buffer

Special movement

Alt+G Go to specified line
Alt+] Go to complementary bracket
Alt+ Scroll viewport up
Alt+ Scroll viewport down
Alt+< Switch to preceding buffer
Alt+> Switch to succeeding buffer

Information

Ctrl+C Report cursor position
Alt+D Report line/word/character count
Ctrl+G Display help text

Various

Alt+A Turn the mark on/off
Tab Indent marked region
Shift+Tab Unindent marked region
Alt+V Enter next keystroke verbatim
Alt+N Turn line numbers on/off
Alt+P Turn visible whitespace on/off
Alt+X Hide or unhide the help lines
Ctrl+L Refresh the screen
Tsung: 對新奇的事物都很有興趣, 喜歡簡單的東西, 過簡單的生活.
Related Post