Description
I have a few suggestions that I believe would make it significantly more convenient to use.
Current Behavior
At the moment, loading a template replaces the entire contents of the current file.
While this is useful in some situations, it is not ideal when I am already working on a solution. Templates typically contain helper functions, utility macros, fast I/O, data structures, and other reusable code, so I would not want my current solution to be overwritten accidentally.
Proposed Improvements
1. Support platform-specific default templates
Please allow users to configure a default template for each supported platform (e.g., Codeforces, LeetCode etc.).
When a new problem is opened, the plugin should automatically populate the source file using the configured template for that platform instead of a hardcoded template.
For example:
- Codeforces → My Codeforces template
- LeetCode → My LeetCode template
This would eliminate the need to manually load a template for every new problem.
2. Preserve the current "Load Template" behavior separately
The existing template loading feature can still be useful, but it would be nice if users had the option to insert a template or confirm before replacing the entire file, since overwriting an in-progress solution can be unexpected.
3. Handle LeetCode's Solution class automatically
One thing to keep in mind is that LeetCode requires a Solution class.
Even when users provide their own default template, the plugin should still generate or preserve the required Solution class structure so that the submitted code remains compatible with LeetCode's expected format.
Benefits
- Eliminates repetitive setup for every new problem.
- Allows users to maintain different coding templates for different platforms.
- Prevents accidentally overwriting work in progress.
- Makes the workflow much smoother for users who rely on custom helper libraries and competitive programming templates.
Thank you for considering this feature request. I think customizable platform-specific default templates would make the plugin much more flexible while preserving the convenience of the existing template system.
Description
I have a few suggestions that I believe would make it significantly more convenient to use.
Current Behavior
At the moment, loading a template replaces the entire contents of the current file.
While this is useful in some situations, it is not ideal when I am already working on a solution. Templates typically contain helper functions, utility macros, fast I/O, data structures, and other reusable code, so I would not want my current solution to be overwritten accidentally.
Proposed Improvements
1. Support platform-specific default templates
Please allow users to configure a default template for each supported platform (e.g., Codeforces, LeetCode etc.).
When a new problem is opened, the plugin should automatically populate the source file using the configured template for that platform instead of a hardcoded template.
For example:
This would eliminate the need to manually load a template for every new problem.
2. Preserve the current "Load Template" behavior separately
The existing template loading feature can still be useful, but it would be nice if users had the option to insert a template or confirm before replacing the entire file, since overwriting an in-progress solution can be unexpected.
3. Handle LeetCode's
Solutionclass automaticallyOne thing to keep in mind is that LeetCode requires a
Solutionclass.Even when users provide their own default template, the plugin should still generate or preserve the required
Solutionclass structure so that the submitted code remains compatible with LeetCode's expected format.Benefits
Thank you for considering this feature request. I think customizable platform-specific default templates would make the plugin much more flexible while preserving the convenience of the existing template system.