Skip to content

how to change templates #469

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
zWatch opened this issue Oct 17, 2019 · 3 comments
Open

how to change templates #469

zWatch opened this issue Oct 17, 2019 · 3 comments
Labels
enhancement New feature or request

Comments

@zWatch
Copy link

zWatch commented Oct 17, 2019

在目录 shengchen.vscode-leetcode-0.15.7\node_modules\vsc-leetcode-cli\templates 下
我改变了templates下的detailed.tpl,为了避免重复
像这样

${comment.singleLine} @lc code=start
#include <vector>
#include <list>
#include <iostream>
#include <map>
#include <stack>
#include <bitset>
#include <string>
#include <algorithm>
${code}
${comment.singleLine} @lc code=end

int main(){
    Solution s;
    //std::cout<<s<<std::endl;
    return 0;
}

可是当我再次打开vscode时,它又变回了原样。
(是否可以添加自定义模板功能)
像这样

"leetcode.filePath": {
        ...
        "cpp": {
              ...
              "filetemplate":"my_cpp_template"
        }
    },
@jdneo jdneo added the enhancement New feature or request label Oct 18, 2019
@ti8og32lgd
Copy link

找了半天,这个路径默认在
C:\Users\[UserName]\.vscode\extensions\shengchen.vscode-leetcode-0.16.1\node_modules\vsc-leetcode-cli\templates
有两个模板文件,codeonly对应注释里没有问题描述的模板,detailed对应注释里有问题描述的模板。
建议添加一个可以在vscode设置里设置模板内容的功能

@Z-LL
Copy link

Z-LL commented Aug 1, 2020

找了半天,这个路径默认在
C:\Users[UserName].vscode\extensions\shengchen.vscode-leetcode-0.16.1\node_modules\vsc-leetcode-cli\templates
有两个模板文件,codeonly对应注释里没有问题描述的模板,detailed对应注释里有问题描述的模板。
建议添加一个可以在vscode设置里设置模板内容的功能

这个文件是针对所有语言的吧,要是针对单个语言怎么改呢?

@psucodervn
Copy link

Hi, is there any progress on this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants