code-walk-thru
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesecode-walk-thru
代码逐步讲解(code-walk-thru)
Instructions
操作说明
Depending on which EDITOR the user says they are using, you will use a different
"show-file" cli command that shows (in the EDITOR) a specific file, optionally at
specific line-number, as in examples below. If no editor specified, you must
ask the user which editor they are using.
IMPORTANT: you must walk thru the files ONE BY ONE, and you MUST wait for the user to say something before moving on to the next file, or to same file different line.
- VSCode:
code --goto <file_path>:<line_number>- PyCharm:
pycharm --line <line_number> <file_path>- IntelliJ:
intellij --line <line_number> <file_path>- Zed:
zed path/to/file.md:43- Vim/Neovim:
vim +42 blah.py
nvim +42 blah.pyIf any of these fail tell the user to install the corresponding CLI tool for their editor.
根据用户使用的编辑器(EDITOR)不同,你需要使用不同的「展示文件」CLI命令,在编辑器中打开指定文件,还可选择定位到具体行号,示例如下。若用户未指定编辑器,你必须询问其使用的编辑器类型。
重要提示:你必须逐个文件进行讲解,且必须等用户回复后,再继续讲解下一个文件或同一文件的其他行。
- VSCode:
code --goto <file_path>:<line_number>- PyCharm:
pycharm --line <line_number> <file_path>- IntelliJ:
intellij --line <line_number> <file_path>- Zed:
zed path/to/file.md:43- Vim/Neovim:
vim +42 blah.py
nvim +42 blah.py如果上述命令执行失败,请告知用户为其编辑器安装对应的CLI工具。