diff --git "a/29 \351\203\255\350\213\245\346\230\225/202400531 sed.md" "b/29 \351\203\255\350\213\245\346\230\225/20240531 sed.md" similarity index 100% rename from "29 \351\203\255\350\213\245\346\230\225/202400531 sed.md" rename to "29 \351\203\255\350\213\245\346\230\225/20240531 sed.md" diff --git "a/29 \351\203\255\350\213\245\346\230\225/20240604 vim\347\274\226\350\276\221\345\231\250.md" "b/29 \351\203\255\350\213\245\346\230\225/20240604 vim\347\274\226\350\276\221\345\231\250.md" new file mode 100644 index 0000000000000000000000000000000000000000..c182a25418b07c0e04f7670213f9ef8bf3530aa6 --- /dev/null +++ "b/29 \351\203\255\350\213\245\346\230\225/20240604 vim\347\274\226\350\276\221\345\231\250.md" @@ -0,0 +1,131 @@ +1. vi 编辑器有几种模式? + + ​ 命令模式 编辑模式 输入模式 + +2. 如何进入 vi 编辑器的插入模式 + + ​ i + +3. 如何进入 vi 编辑器的可视化模式 + + ​ 字符模式,在命令模式中按v键进入 + + ​ 行模式,在命令模式中按V键进入 + + ​ 块模式,在命令模式中按Ctrl+ v键进入 + +4. 在 vi 编辑器中如何复制一行 + + ​ yy + +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 + + + 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 is a description + // another descriptttion + const timer = setTimeout(( ) => { + console.log(that) alert('cool!',300) + // awosome man ! + }) + } + ``` + + 尝试在下面的文本中进行复制粘贴练习 + + ``` + 删除这一行 + dd + 粘贴到这一行下面 + p + 剪切 ABC 并把它粘贴到 XYZ 前面,使这部分内容看起来像 + dP + 剪切 并把它粘贴到 ABC XYZ 前面。 + ``` + + 尝试修改下列文本的大小写 + + ``` + Change this line to UPPERCASE, THEN TO lowercase. + 使用V选中该行,gu小写,gU大写。 + ``` + + 按下面的说明进行操作 + + ``` + 按 dd 删除本行 + 按 . 重复删除操作 + 2. 再删除两行 + 这行也没了 + p 把刚才删掉的粘回来 + 3. 又多出 6 行 + ``` + + 左缩进、右缩进练习 + + ``` + 在这一行上依次按 3>>,<< 和