- Notifications
You must be signed in to change notification settings - Fork668
[Feature] Add a small code snippet before every problem solutions#972
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
HopoZ commentedSep 2, 2024
where add this schema,pls? |
just in preference.. You can find a setting called "leetcode.language.preamble". Then you can edit the setting in vscode. This is only a small utility, not very complete and did not expect it to work for everyone. |
HopoZ commentedSep 2, 2024
I found a more useful method,#469 (comment) |
Thanks! So the cli provide this functionality, but the editor extension did not support it. no wonder I can't find relating configuration in the extension. |
About
Code preamble is a short code snippet adding to the beginning of the program. A typical one is:
This feature is useful. Maybe inserting header files is interesting for the first several times, it is dreadful if we need to add tons of it each time we do the problems, especially for a dreadful language like C/C++
Configuration
To add a preamble for one language, you can follow this schema:
Effect
Now you don't need to
#include <iostream>
everytime if you use cpp.