How can i Automatically add comment code to new file?


98
views
1
10 weeks ago by
I want to do this, When I create a new file, a similar comment code has been added.
like #-*-coding:utf-8 -*-
#autor: xx
#time: xx

1 Answer


2
10 weeks ago by
Use the Snippets tool in Wing Pro.  There is already a 'file' snippet which you can edit to set up a different content than our defaults.  Then to use it, create a file, type 'file' so you get the "file (snippet)" item in the auto-completer and press Tab or another completion key (as set by the Editor > Auto-Completion > Completion Keys preferece).  The same technique (typing snippet name fragment and selecting it for the completer) can be used with any snippet.

Also, you can assign a key binding to the command 'snippet-file(snippet_name="file")' using the User Interface > Keyboard > Custom Key Bindings preference to be able to just bring up a new file with the file snippet already inserted.

Details are at https://wingware.com/doc/edit/snippets
Please login to add an answer/comment or follow this question.

Similar posts:
Search »