document/文档/linux/nano.md
2024-06-30 04:47:39 +08:00

35 lines
815 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# nano文本编辑
## 安装
```sh
apt-get install -y nano
```
## 使用语法
```sh
nano <文件名或文件绝对路径>
# 使用示例
nano vvhan.com.txt
nano /root/vvhan.com.txt
```
当你打开一个不存在的文件,那么即为新建文件。打开文件后,就可以直接编辑了。
## 使用教程
```sh
Ctrl+G显示帮助文本
Ctrl+O保存当前文件
Ctrl+R读取其他文件并插入光标位置
Ctrl+Y跳至上一屏幕
Ctrl+K剪切当前一行
Ctrl+C显示光标位置
Ctrl+X退出编辑文本
Ctrl+J对其当前段落以空格为分隔符
Ctrl+W搜索文本位置
Ctrl+V跳至下一屏幕
Ctrl+U粘贴文本至光标处
Ctrl+T运行拼写检查
Ctrl+_跳转到某一行
ALT+U撤销
ALT+E重做
ALT+Y, 语法高亮
ALT+#,显示行号
```