Nano is a small and simple text editor for use on the terminal. It copied the interface and key bindings of the Pico editor but added several missing features: undo/redo, syntax highlighting, line numbers, softwrapping, multiple buffers, selecting text by holding Shift, search-and-replace with regular expressions, and several other conveniences.
安装
在Windows系统安装:
choco install nano
使用
# 打开并编辑当前目录下的 filename.txt ,如果不存在就新建
nano filename.txt
快捷键
Ctrl+S | 保存当前文件 |
Ctrl+O | “另存为” |
Ctrl+X | 退出编辑器 |
Ctrl+K | 将当前行剪切到剪切板 |
Alt+6 | Copy current line into cutbuffer |
Ctrl+U | 粘贴剪切板里的内容 |
Ctrl+] | Complete current word |
Alt+3 | Comment/uncomment line/region |
Alt+U | Undo last action |
Alt+E | Redo last undone action |
alt \
alt /