First time here? Check out the FAQ!
1

How can i Automatically add comment code to new file?
 

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

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
1358506147's avatar
21
1358506147
asked 7 years ago
Wingware Support's avatar
4.3k
Wingware Support
updated 6 years ago

Comments

see more comments

1 Answer

1

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

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Wingware Support's avatar
4.3k
Wingware Support
answered 7 years ago
Wingware Admin's avatar
255
Wingware Admin
updated 6 years ago
link

Comments

see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)