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.
31 lines
838 B
TypeScript
31 lines
838 B
TypeScript
// ============================================================
|
|
// Code Golf 场景 2:对象属性重排
|
|
// ============================================================
|
|
//
|
|
// 目标:把 id 属性移到最后,用最少按键。
|
|
//
|
|
// 💡 提示:d d 删除行、p 粘贴、V 行选择、:m 移动
|
|
// ============================================================
|
|
|
|
const user = {
|
|
id: 1,
|
|
name: "Alice",
|
|
email: "alice@example.com",
|
|
age: 30,
|
|
};
|
|
|
|
// === 目标代码 ===
|
|
//
|
|
// const user = {
|
|
// name: "Alice",
|
|
// email: "alice@example.com",
|
|
// age: 30,
|
|
// id: 1,
|
|
// };
|
|
//
|
|
// ============================================================
|
|
// 我的最佳成绩:
|
|
// 日期: ________ 按键数: ________
|
|
// 操作日志: ________________________________
|
|
// ============================================================
|