From 49d52503a60b2e26930f88f8d853a981e80ec5c0 Mon Sep 17 00:00:00 2001 From: zjh <3228734291@qq.com> Date: Wed, 5 Jun 2024 23:57:32 +0800 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 --- .../20240605 vim\347\273\203\344\271\240.md" | 120 ++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 "\345\274\240\344\277\212\350\261\252/20240605 vim\347\273\203\344\271\240.md" diff --git "a/\345\274\240\344\277\212\350\261\252/20240605 vim\347\273\203\344\271\240.md" "b/\345\274\240\344\277\212\350\261\252/20240605 vim\347\273\203\344\271\240.md" new file mode 100644 index 0000000..1fc5e4c --- /dev/null +++ "b/\345\274\240\344\277\212\350\261\252/20240605 vim\347\273\203\344\271\240.md" @@ -0,0 +1,120 @@ +1. vi 编辑器有几种模式? + + ``` + 命令模式 编辑模式 输入模式 + ``` + +2. 如何进入 vi 编辑器的插入模式 + + ``` + 在命令模式下,按下 i 就进入了输入模式 + ``` + +3. 如何进入 vi 编辑器的可视化模式 + + ``` + 字符模式,在命令模式中按v键进入 + 行模式,在命令模式中按V键进入 + 块模式,在命令模式中按Ctrl+ v键进入 + ``` + +4. 在 vi 编辑器中如何复制一行 + + ``` + yy -- 复制当前行 + 可以鼠标拖动选择复制 按y复制选中的 + ``` + +5. 在 vi 编辑器中如何进行粘贴 + + ``` + p 在当前位置后粘贴 + P 在当前位置前粘贴 + ``` + +6. 如何删除从 3 行到 15 行的所有数据 + + ``` + esc :3,15d + ``` + +7. vim练习: + + - 光标移动练习,命令模式下: + + - 单位级 h j k l + - 单词级 w e b + - 块级 gg G 0 ^ $ H M L ngg nj nk + + 把下列句子按照第一句的正确顺序修改好并把多余的空行删除 + + ``` + this is a simple easy vim tutorial + + this is a simple easy vim tutorial + this is a simple easy vim tutorial + + + this is a simple easy vim tutorial + this is a simple easy vim tutorial + this is a simple easy vim tutorial + + this is a simple easy vim tutorial + + + this is a simple easy vim tutorial + this is a simple easy vim tutorial + + + this is a simple easy vim tutorial + this is a simple easy vim tutorial + this is a simple easy vim tutorial + this is a simple easy vim tutorial + + + dd yy p + ``` + + 先敲出以下代码,然后修正以下代码中的错误单词、重复单词、错误格式、多余行,修改函数名为 typing 并为定时器添加 300 毫秒延迟 + + ``` + const bbb = typing() => { + // this is a description + // another description + const timer = setTimeout(( ) => { + console.log(that) alert('cool!',300) + // awosome man ! + }) + } + ``` + + 尝试在下面的文本中进行复制粘贴练习 + + ``` + 删除这一行 //dd + 粘贴到这一行下面 //p + 剪切 ABC 并把它粘贴到 XYZ 前面,使这部分内容看起来像 //d P + 剪切 并把它粘贴到 ABC XYZ 前面。 + ``` + + 尝试修改下列文本的大小写 + + ``` + Change this line to UPPERCASE, THEN TO lowercase. + ``` + + 按下面的说明进行操作 + + ``` + #按dd删除本行 + #按.重复删除操作再删除两行 + #按p 把刚才删掉的粘回来 + #又多出 6 行 + ``` + + 左缩进、右缩进练习 + + ``` + 在这一行上依次按 3>>,<< 和