The GNU nano text editor {文本编辑器}
The GNU nano homepage
https://www.nano-editor.org/
GNU nano is a small and friendly text editor.
1. GNU nano
The GNU nano text editor
https://www.nano-editor.org/dist/latest/nano.html
Source Code
https://git.savannah.gnu.org/cgit/nano.git/
^ 表示键盘上的 Ctrl 键,M 表示键盘上的 Alt 键。

2. Overview of nano’s shortcuts
https://www.nano-editor.org/dist/latest/cheatsheet.html
- File handling
Ctrl+S (^S) Save current file - 保存
Ctrl+O (^O) Offer to write file (Save as) - 另存为 / 写入当前文件至磁盘
Ctrl+R (^R) Insert a file into current one - 插入另一个文件的内容到当前正在编辑的文件中
Ctrl+X (^X) Close buffer, exit from nano - 关闭当前文件缓冲区 / 离开 nano
- Moving around
←
\leftarrow
← One character backward
→
\rightarrow
→ One character forward
Ctrl+
←
\leftarrow
← One word backward - 向后跳动一个单词
Ctrl+
→
\rightarrow
→ 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+
↑
\uparrow
↑ To previous block
Ctrl+
↓
\downarrow
↓ To next block
Alt+Home To first row in viewport
Alt+End To last row in viewport
Ctrl+Y One page up - 跳到上一页
Ctrl+V One page down - 跳到下一页
Alt+\ To top of buffer
Alt+/ To end of buffer
- Editing
Ctrl+K Cut current line into cutbuffer - 剪切 (当前行或者被标记的区域)
Alt+6 Copy current line into cutbuffer - 复制 (当前行或者被标记的区域)
Ctrl+U Paste contents of cutbuffer - 粘贴
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+B Start backward search
Ctrl+F Start forward search
Alt+B Find next occurrence backward
Alt+F 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
- Special movement
Alt+G Go to a specified line
Alt+] Go to complementary bracket
Alt+< Scroll viewport to the left
Alt+> Scroll viewport to the right
Alt+
↑
\uparrow
↑ Scroll viewport up
Alt+
↓
\downarrow
↓ Scroll viewport down
Ctrl+L Center the current line
Alt+
←
\leftarrow
← Switch to preceding buffer
Alt+
→
\rightarrow
→ Switch to succeeding buffer
- Information
Ctrl+C Report cursor position - 报告光标位置
Alt+D Report line/word/character counts
Ctrl+G Display help text - 查看帮助
- Various
Alt+A Set or unset the mark
Alt+C Turn constant position info on/off
Alt+N Turn line numbers on/off
Alt+P Turn visible whitespace on/off
Alt+S Turn softwrapping on/off
Alt+X Hide/unhide the help lines
Alt+Z Hide/unhide the info bars
- Operations
Ctrl+T Execute some command
Ctrl+T Ctrl+S Run a spell check
Ctrl+T Ctrl+Y Run a syntax check
Ctrl+T Ctrl+O Run a formatter
Tab Indent marked region
Shift+Tab Unindent marked region
Ctrl+J Justify paragraph or region
Alt+J Justify entire buffer
Alt+T Cut until end of buffer
Alt+V Enter next keystroke verbatim
Alt+: Start/stop recording of macro
Alt+; Replay macro
verbatim [vɜː(r)ˈbeɪtɪm]
adj. 一字不差的 (地);逐字的 (地)
adv. 逐字的
n. 逐字报告
References
[1] Yongqiang Cheng (程永强), https://yongqiang.blog.csdn.net/
[2] The GNU nano text editor (文本编辑器), https://mp.weixin.qq.com/s/U1_RwgWPqjyU6eJQKCy_vg
GNUnano是一个小巧且用户友好的GNU文本编辑器,提供了方便的快捷键操作,如Ctrl+S用于保存文件,Ctrl+O进行另存为,而Ctrl+X则用于关闭文件并退出编辑器。其源代码可在GNUSavannah上找到。
4303

被折叠的 条评论
为什么被折叠?



