LeetCode-OpenSource / vscode-leetcode

Solve LeetCode problems in VS Code
https://marketplace.visualstudio.com/items?itemName=shengchen.vscode-leetcode
MIT License
8.22k stars 650 forks source link

Maybe it's better to change the default setting of filename #531

Open doutv opened 4 years ago

doutv commented 4 years ago

🐛 Bug Report

This is the default setting of filename. "filename": "${id}.${kebab-case-name}.${ext}"

    "leetcode.filePath": {
        "default": {
            // 相对路径
            "folder": "",
            // 文件名
            "filename": "${id}.${kebab-case-name}.${ext}"
        }
    }

It will cause some problems because of the dot. between id and kebab-case-name.

if ($?) { g++ 673.最长递增子序列的个数.cpp -o 673.最长递增子序列的个数 } ; if ($?) { .\673. 
最长递增子序列的个数 }
程序“673.最长递增子序列的个数”无法运行: 没有应用程序与此操作的指定文件有关联。所在位置 行:1 字符: 131
+ ... 673.最长递增子序列的个数.cpp -o 673.最长递增子序列的个数 } ; if ($?) { .\673.最长递增子序列的个数 }
+                                                        ~~~~~~~~~~~~~~~~。
所在位置 行:1 字符: 131
+ ... 673.最长递增子序列的个数.cpp -o 673.最长递增子序列的个数 } ; if ($?) { .\673.最长递增子序列的个数 }
+                                                        ~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (:) [], ApplicationFailedException
    + FullyQualifiedErrorId : NativeCommandFailed

Thus, I think it's better to remove . in default setting. "filename": "${id}${kebab-case-name}.${ext}"

doutv commented 4 years ago

I then find a similar problem. Since gdb doesn't support Chinese character in path and filename, I can't debug the .cpp file.

I think it's better to make the filename in English only, but I don't know how to do it when I am using Leetcode-cn. Can the extension generate a filename like 673FindNumberOfLIS.cpp? Adding the question id and class name together.

younger-1 commented 4 years ago

Yes, I encountered the same question.

liuliuliuzy commented 3 years ago

Is there a way to solve this problem? I got the same question...