From 78bc0337deac1c194ecbfd97e26081cfa81de02e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=85=88=E9=91=AB?= Date: Wed, 5 Jun 2024 13:31:27 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 徐先鑫 --- ...23\351\241\271\347\273\203\344\271\240.md" | 143 ++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 "11 \345\276\220\345\205\210\351\221\253/2024.06.04 vim\347\274\226\350\276\221\345\231\250\344\270\223\351\241\271\347\273\203\344\271\240.md" diff --git "a/11 \345\276\220\345\205\210\351\221\253/2024.06.04 vim\347\274\226\350\276\221\345\231\250\344\270\223\351\241\271\347\273\203\344\271\240.md" "b/11 \345\276\220\345\205\210\351\221\253/2024.06.04 vim\347\274\226\350\276\221\345\231\250\344\270\223\351\241\271\347\273\203\344\271\240.md" new file mode 100644 index 0000000..6e790d5 --- /dev/null +++ "b/11 \345\276\220\345\205\210\351\221\253/2024.06.04 vim\347\274\226\350\276\221\345\231\250\344\270\223\351\241\271\347\273\203\344\271\240.md" @@ -0,0 +1,143 @@ +1. vi 编辑器有几种模式? + + + +1. 如何进入 vi 编辑器的插入模式 + +```js +进入vi编辑器三种模式:1、命令模式(Normal Mode)2、文本模式:(Inster Mode)用于字符编辑 +3、最后行模式(Last Line Mode) 在命令模式下按":" 进入最后行模式 可以进行文件的保存、退出、查找、替换等 +``` + +1. 如何进入 vi 编辑器的可视化模式 + +```js +vi编辑器并没有可视化模式: vim 有可视化模式 vim进入可视化 i +字符模式,在命令模式中按v键进入 + +行模式,在命令模式中按V键进入 + +块模式,在命令模式中按Ctrl+ v键进入 +``` + +1. 在 vi 编辑器中如何复制一行 + +```bash +vi编辑器没有 使用vim +yy 进行复制一行 +``` + +1. 在 vi 编辑器中如何进行粘贴 + +```bash +p 在当前位置后粘贴 + +P 在当前位置前粘贴 +``` + +1. 如何删除从 3 行到 15 行的所有数据 + +```bash +Esc (如果需要的话,退出其他模式) +: +3,15d +Enter +``` + +1. vim练习: + + - 光标移动练习,命令模式下: + + - 单位级 h j k l + - 单词级 w e b + - 块级 gg G 0 ^ $ H M L ngg nj nk + + 把下列句子按照第一句的正确顺序修改好并把多余的空行删除 + + ``` + this is a simple easy vim tutorial + + tutorial simple a easy this vim is + is this tutorial vim simple a easy + + + ``` + + tutorial vim this is a easy simple + tutorial easy vim simple a this is + simple a vim easy tutorial is this + + tutorial is easy vim a simple this + + + vim simple this tutorial a easy is + a vim tutorial simple easy is this + + + easy a simple vim is tutorial this + vim tutorial is a easy simple this + a this vim tutorial is easy simple + this tutorial simple easy a is vim + + + easy tutorial this simple a is vim + a tutorial easy is this simple vim + + a tutorial vim is easy this simple + simple this easy is vim tutorial a + + this tutorial is a easy simple vim + vim is tutorial simple this easy a + + vim is simple this tutorial easy a + easy a simple is vim this tutorial + vim is tutorial simple a easy this + this vim is tutorial simple easy a + ``` + + 先敲出以下代码,然后修正以下代码中的错误单词、重复单词、错误格式、多余行,修改函数名为 typing 并为定时器添加 300 毫秒延迟 + + ``` + const bbb = () => { + // this is is a description + // + // another descriptttion + const timer = setTimeout(( ) => { + console.log(that) alert('cool!') + // awosome man ! + }) + } + ``` + + 尝试在下面的文本中进行复制粘贴练习 + + ``` + 删除这一行 + 粘贴到这一行下面 + 剪切 ABC 并把它粘贴到 XYZ 前面,使这部分内容看起来像 + 剪切 并把它粘贴到 ABC XYZ 前面。 + ``` + + 尝试修改下列文本的大小写 + + ``` + Change this line to UPPERCASE, THEN TO lowercase. + ``` + + 按下面的说明进行操作 + + ``` + 按 dd 删除本行 + 按 . 重复删除操作 + 2. 再删除两行 + 这行也没了 + p 把刚才删掉的粘回来 + 3. 又多出 6 行 + ``` + + 左缩进、右缩进练习 + + ``` + 在这一行上依次按 3>>,<< 和