First time here? Check out the FAQ!

Revision history  [back]

I think what you're looking for is "every time I create a new python file, populate it with a standard template." That doesn't exist in Wing (AFAICT), but you can get very close.

I'm going to assume you are using Wing Pro, as this does not work on Wing 101 or Wing Personal.

Let's make sure you are set up first.

  1. File->Preferences
  2. in the left column find the "Editor" section, and under there, click on Auto-Completer
  3. Make sure that "show auto completer" is set to True.

Now let's use the auto-completer with a snippet

  1. File->New
  2. Start typing the word "file"
  3. The auto-completer should pop up. About five entries down, you'll see a picture of scissors and the words "file (snippet)". Pick that.
  4. The standard file snippet will be pasted into your file.

To edit the snippet

  1. Click on the "snippets" tab/tool. (It is in the upper right toolbox by default. If you don't see it, look for instructions below on how to add it.)
  2. The system will show you a list of available snippets. One of those snippets will be named "file". Right-click on that.
  3. Choose "Edit Snippet"
  4. Now you can customize the "file" snippet to be whatever you want. (For bonus points, create your own module snippet and use that instead! You have the power!)

If you can't see the snippets tool:

  1. Right click in the blank space on any toolbox window (next to the tabs that say "search", "search in files", etc
  2. Choose "insert tool"
  3. Choose snippets from the list of tools