Add Vim exercises, cheatsheet, and project polish

Add code golf challenges for Vim practice, a weekly review template, and
extend the cheatsheet with high-frequency commands. Fix the calculator
`multiply` implementation and correct a logger import path.
This commit is contained in:
2026-05-31 23:01:37 +08:00
parent 03f3114503
commit e8dfa0e2f1
14 changed files with 274 additions and 7 deletions
+43
View File
@@ -0,0 +1,43 @@
// ============================================================
// Code Golf 场景 3:批量加注释
// ============================================================
//
// 目标:给三个函数上面各加一行注释 "// Arithmetic operation: <函数名>"
//
// 💡 提示:用宏!q a 开始录制 → 在第一行编辑 → j → q 停止 → @a 回放
// ============================================================
function add(a: number, b: number): number {
return a + b;
}
function subtract(a: number, b: number): number {
return a - b;
}
function multiply(a: number, b: number): number {
return a * b;
}
// === 目标代码 ===
//
// // Arithmetic operation: add
// function add(a: number, b: number): number {
// return a + b;
// }
//
// // Arithmetic operation: subtract
// function subtract(a: number, b: number): number {
// return a - b;
// }
//
// // Arithmetic operation: multiply
// function multiply(a: number, b: number): number {
// return a * b;
// }
//
// ============================================================
// 我的最佳成绩:
// 日期: ________ 按键数: ________
// 操作日志: ________________________________
// ============================================================