freeCodeCamp/guide/chinese/vim/basic-usage/index.md

47 lines
853 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
title: Basic Usage
localeTitle: 基本用法
---
## VIM基本用法
### 打开文件
* 运行vim或vi并打开给定的文件名。
### 插入模式
* 打开页面后输入I您将在屏幕底部看到“插入模式”文本。从这里您可以对文件的文本进行任何更改。
### 保存存档
* W
### 保存并退出
* X
* SHIFT ZZ
* WQ
### 如果没有更改,则退出文件
* q
### 退出文件并撤消所做的任何更改
* Q
### 显示行号
* 设nu
### 不显示行号
* 设置nonu
### 根据使用的编程语言添加语法颜色
* :语法上
## 关于Vim
Vim是基本上在CLI模式下使用的文本编辑器。但现在编辑器也有各种版本。有 还有GVIM它是VIM的图形版本。 vi是主编然后改进并命名为VI改进了Vim。