Skip to content
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

Customize the sub-directory to save the file generated by 'Show Problem' #119

Closed
liuyangc3 opened this issue Feb 12, 2019 · 15 comments
Closed

Comments

@liuyangc3
Copy link

例如把生成文件的目录设置为, 当前打开文件夹下的 任意某个文件夹

@jdneo
Copy link
Member

jdneo commented Feb 13, 2019

Is #120 what you are asking for?

@liuyangc3
Copy link
Author

liuyangc3 commented Feb 13, 2019

@jdneo not quite same,for example is it possiable to generate .java file in somedir by default.

and as same as #120 generate file in spec dir with spec tag will be convenient.

image

@ringcrl
Copy link
Contributor

ringcrl commented Feb 13, 2019

Maybe should add a vscode config like:

"leetcode.outputPath": "tag", // somedir Or other

@jdneo
Copy link
Member

jdneo commented Feb 13, 2019

@ringcrl I'm thinking exactly the same thing.

We need to figure out if it is possible to combine this issue with #120 and give out an overall solution.

@ringcrl
Copy link
Contributor

ringcrl commented Feb 13, 2019

Setting Name Description Default Value
leetcode.outputPath Which path will the problem generate to. root for root directory,tag for create a directory based on the tag of the problem,custom_path for User-defined directory root

@jdneo jdneo changed the title Show Problem 如何自定义生成目录 Customize the sub-directory to save the file generated by 'Show Problem' Feb 13, 2019
@jdneo
Copy link
Member

jdneo commented Feb 13, 2019

@ringcrl LGTM, just some small improvement.

The leetcode.outputPath specifies the relative path to save the problem files. Meanwhile, we have several preserved values for it, which will be resolved according to the actual situation. Those preserved values are:

  • ${tag} - a directory based on the problem's tag. For example, if the problem belongs to: Binary Indexed Tree, then a folder named binary_indexed_tree will be used here.
  • ${language} - a directory based on the language used. For example, java for Java language
  • ${difficulty} - a directory based on the problem's difficulty. For example, easy

If this setting is not set, the files will be generated to the base path of the workspace folder

@ringcrl
Copy link
Contributor

ringcrl commented Feb 13, 2019

OK~I will finish it later

@jdneo
Copy link
Member

jdneo commented Feb 13, 2019

@ringcrl Great! Thank you.

@jdneo jdneo added this to the 0.11.0 milestone Feb 16, 2019
@jdneo
Copy link
Member

jdneo commented Feb 16, 2019

@ALL The PR has been merged and will be released in 0.11.0.

Thank you all for your participation. I'll work on updating the document later.

@jdneo jdneo closed this as completed Feb 16, 2019
@m11y
Copy link

m11y commented Feb 22, 2019

I really need this feature, when will version 0.11.0 release?

@jdneo
Copy link
Member

jdneo commented Feb 22, 2019

@wangjunwei87 It should be released recently

@jdneo
Copy link
Member

jdneo commented Feb 24, 2019

@wangjunwei87 0.11.0 has been released

@m11y
Copy link

m11y commented Feb 24, 2019

@jdneo Thanks for your great work, and I am wondering if it's possible to use preserved value for interpolation, like something-${tag}-${language}-something.

@jdneo
Copy link
Member

jdneo commented Feb 24, 2019

@wangjunwei87 great idea. Would you mind to create an issue for that?

@m11y
Copy link

m11y commented Feb 24, 2019

Sure, my pleasure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants