• In doing atcoder, I’ve been designing vscode project snippets for frequently occurring code, but some snippets are useful for other general projects as well, so I wanted to use them.
    • https://github.com/nishio/atcoder
    • I create a boiler plate full of things in main, but in other general projects, I want to use a part of it, like “Oh, I want to output debugging” or “I want to create test cases for doc test”.
    • I’d rather just cut out the generic ones rather than try to do the same code base.
      • I made it a separate project.
      • https://github.com/nishio/vscode_python_snippets
      • I know atcoder has a “must be in one file” restriction for submission, but for general projects, there isn’t one, so it might be better to put them in a pip.

https://code.visualstudio.com/docs/editor/userdefinedsnippets#_variable-transforms

  • Selections can also be multiplied by regular expression replacements.

This page is auto-translated from [/nishio/VSCode Python Snippets](https://scrapbox.io/nishio/VSCode Python Snippets) using DeepL. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. I’m very happy to spread my thought to non-Japanese readers.